blob: 9b75bc83c71fac9847cd8e0f578183dbfb87115c [file] [log] [blame]
Bryan Wu1394f032007-05-06 14:50:22 -07001/*
2 * File: arch/blackfin/kernel/vmlinux.lds.S
3 * Based on: none - original work
4 * Author:
5 *
6 * Created: Tue Sep 21 2004
7 * Description: Master linker script for blackfin architecture
8 *
9 * Modified:
Mike Frysingerde6a9522007-06-11 17:27:05 +080010 * Copyright 2004-2007 Analog Devices Inc.
Bryan Wu1394f032007-05-06 14:50:22 -070011 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#define VMLINUX_SYMBOL(_sym_) _##_sym_
31
32#include <asm-generic/vmlinux.lds.h>
33#include <asm/mem_map.h>
Mike Frysinger520473b2007-07-12 12:20:20 +080034#include <asm/page.h>
Bernd Schmidt0fa63ad2007-07-25 10:19:59 +080035#include <asm/thread_info.h>
Bryan Wu1394f032007-05-06 14:50:22 -070036
Bryan Wu1394f032007-05-06 14:50:22 -070037OUTPUT_FORMAT("elf32-bfin")
38ENTRY(__start)
39_jiffies = _jiffies_64;
40
Bryan Wu1394f032007-05-06 14:50:22 -070041SECTIONS
42{
43 . = CONFIG_BOOT_LOAD;
Bryan Wu1394f032007-05-06 14:50:22 -070044 .text :
45 {
Mike Frysingerde6a9522007-06-11 17:27:05 +080046 __text = .;
47 _text = .;
48 __stext = .;
Sam Ravnborg76647092007-05-13 00:31:33 +020049 TEXT_TEXT
Bryan Wu1394f032007-05-06 14:50:22 -070050 SCHED_TEXT
Mike Frysingerde6a9522007-06-11 17:27:05 +080051 LOCK_TEXT
Mike Frysinger27d875f2007-08-27 16:08:53 +080052 KPROBES_TEXT
53 *(.text.*)
Bryan Wu1394f032007-05-06 14:50:22 -070054 *(.fixup)
Bryan Wu1394f032007-05-06 14:50:22 -070055
Mike Frysingerde6a9522007-06-11 17:27:05 +080056 . = ALIGN(16);
57 ___start___ex_table = .;
58 *(__ex_table)
59 ___stop___ex_table = .;
60
Bryan Wu1394f032007-05-06 14:50:22 -070061 . = ALIGN(4);
Bryan Wu1394f032007-05-06 14:50:22 -070062 __etext = .;
Mike Frysingerde6a9522007-06-11 17:27:05 +080063 }
Bryan Wu1394f032007-05-06 14:50:22 -070064
Mike Frysinger27d875f2007-08-27 16:08:53 +080065 RO_DATA(PAGE_SIZE)
Mike Frysingerde6a9522007-06-11 17:27:05 +080066
67 .data :
68 {
Bernd Schmidt0fa63ad2007-07-25 10:19:59 +080069 /* make sure the init_task is aligned to the
70 * kernel thread size so we can locate the kernel
71 * stack properly and quickly.
72 */
Mike Frysingerde6a9522007-06-11 17:27:05 +080073 __sdata = .;
Bernd Schmidt0fa63ad2007-07-25 10:19:59 +080074 . = ALIGN(THREAD_SIZE);
Mike Frysingerde6a9522007-06-11 17:27:05 +080075 *(.data.init_task)
Mike Frysingerde6a9522007-06-11 17:27:05 +080076
77 . = ALIGN(32);
78 *(.data.cacheline_aligned)
79
Mike Frysinger27d875f2007-08-27 16:08:53 +080080 DATA_DATA
81 *(.data.*)
82 CONSTRUCTORS
83
Bernd Schmidt0fa63ad2007-07-25 10:19:59 +080084 . = ALIGN(THREAD_SIZE);
Mike Frysingerde6a9522007-06-11 17:27:05 +080085 __edata = .;
86 }
87
88 ___init_begin = .;
Mike Frysinger27d875f2007-08-27 16:08:53 +080089
90 .init.text :
Bryan Wu1394f032007-05-06 14:50:22 -070091 {
Bernd Schmidt0fa63ad2007-07-25 10:19:59 +080092 . = ALIGN(PAGE_SIZE);
Bryan Wu1394f032007-05-06 14:50:22 -070093 __sinittext = .;
94 *(.init.text)
95 __einittext = .;
Mike Frysinger27d875f2007-08-27 16:08:53 +080096 }
97 .init.data :
98 {
99 . = ALIGN(16);
Bryan Wu1394f032007-05-06 14:50:22 -0700100 *(.init.data)
Mike Frysinger27d875f2007-08-27 16:08:53 +0800101 }
102 .init.setup :
103 {
Bryan Wu1394f032007-05-06 14:50:22 -0700104 . = ALIGN(16);
105 ___setup_start = .;
106 *(.init.setup)
107 ___setup_end = .;
Mike Frysinger27d875f2007-08-27 16:08:53 +0800108 }
109 .initcall.init :
110 {
Bryan Wu1394f032007-05-06 14:50:22 -0700111 ___initcall_start = .;
112 INITCALLS
113 ___initcall_end = .;
Mike Frysinger27d875f2007-08-27 16:08:53 +0800114 }
115 .con_initcall.init :
116 {
Bryan Wu1394f032007-05-06 14:50:22 -0700117 ___con_initcall_start = .;
118 *(.con_initcall.init)
119 ___con_initcall_end = .;
Mike Frysinger27d875f2007-08-27 16:08:53 +0800120 }
121 SECURITY_INIT
122 .init.ramfs :
123 {
Bryan Wu1394f032007-05-06 14:50:22 -0700124 . = ALIGN(4);
125 ___initramfs_start = .;
126 *(.init.ramfs)
127 ___initramfs_end = .;
Mike Frysingerde6a9522007-06-11 17:27:05 +0800128 }
Bryan Wu1394f032007-05-06 14:50:22 -0700129
Mike Frysingerde6a9522007-06-11 17:27:05 +0800130 __l1_lma_start = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700131
Mike Frysinger27d875f2007-08-27 16:08:53 +0800132 .text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs))
Bryan Wu1394f032007-05-06 14:50:22 -0700133 {
134 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800135 __stext_l1 = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700136 *(.l1.text)
137
138 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800139 __etext_l1 = .;
140 }
Bryan Wu1394f032007-05-06 14:50:22 -0700141
Mike Frysingerde6a9522007-06-11 17:27:05 +0800142 .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1))
Bryan Wu1394f032007-05-06 14:50:22 -0700143 {
144 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800145 __sdata_l1 = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700146 *(.l1.data)
Mike Frysingerde6a9522007-06-11 17:27:05 +0800147 __edata_l1 = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700148
149 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800150 __sbss_l1 = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700151 *(.l1.bss)
152
153 . = ALIGN(32);
154 *(.data_l1.cacheline_aligned)
155
156 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800157 __ebss_l1 = .;
158 }
159
160 .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
Bryan Wu1394f032007-05-06 14:50:22 -0700161 {
162 . = ALIGN(4);
163 __sdata_b_l1 = .;
164 *(.l1.data.B)
165 __edata_b_l1 = .;
166
167 . = ALIGN(4);
168 __sbss_b_l1 = .;
169 *(.l1.bss.B)
170
171 . = ALIGN(4);
172 __ebss_b_l1 = .;
Mike Frysingerde6a9522007-06-11 17:27:05 +0800173 }
Bryan Wu1394f032007-05-06 14:50:22 -0700174
Mike Frysinger36208052007-10-30 12:00:02 +0800175 /* Force trailing alignment of our init section so that when we
176 * free our init memory, we don't leave behind a partial page.
177 */
178 . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
179 . = ALIGN(PAGE_SIZE);
180 ___init_end = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700181
Mike Frysinger36208052007-10-30 12:00:02 +0800182 .bss :
Bryan Wu1394f032007-05-06 14:50:22 -0700183 {
184 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800185 ___bss_start = .;
Mike Frysingerfbeb7372007-08-27 15:02:20 +0800186 *(.bss .bss.*)
Bryan Wu1394f032007-05-06 14:50:22 -0700187 *(COMMON)
188 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800189 ___bss_stop = .;
190 __end = .;
191 }
192
Mike Frysingerc11b5772007-10-11 00:12:41 +0800193 STABS_DEBUG
194
195 DWARF_DEBUG
196
197 NOTES
198
Mike Frysingerde6a9522007-06-11 17:27:05 +0800199 /DISCARD/ :
200 {
201 *(.exit.text)
202 *(.exit.data)
203 *(.exitcall.exit)
204 }
Bryan Wu1394f032007-05-06 14:50:22 -0700205}