]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * vmlinux.lds.S -- master linker script for m68knommu arch | |
3 | * | |
4 | * (C) Copyright 2002-2004, Greg Ungerer <gerg@snapgear.com> | |
5 | * | |
6 | * This ends up looking compilcated, because of the number of | |
7 | * address variations for ram and rom/flash layouts. The real | |
8 | * work of the linker script is all at the end, and reasonably | |
9 | * strait forward. | |
10 | */ | |
11 | ||
12 | #include <linux/config.h> | |
13 | #include <asm-generic/vmlinux.lds.h> | |
14 | ||
15 | /* | |
16 | * Original Palm pilot (same for Xcopilot). | |
17 | * There is really only a rom target for this. | |
18 | */ | |
19 | #ifdef CONFIG_PILOT3 | |
20 | #define ROMVEC_START 0x10c00000 | |
21 | #define ROMVEC_LENGTH 0x10400 | |
22 | #define ROM_START 0x10c10400 | |
23 | #define ROM_LENGTH 0xfec00 | |
24 | #define ROM_END 0x10d00000 | |
25 | #define RAMVEC_START 0x00000000 | |
26 | #define RAMVEC_LENGTH 0x400 | |
27 | #define RAM_START 0x10000400 | |
28 | #define RAM_LENGTH 0xffc00 | |
29 | #define RAM_END 0x10100000 | |
30 | #define _ramend _ram_end_notused | |
31 | #define DATA_ADDR RAM_START | |
32 | #endif | |
33 | ||
34 | /* | |
35 | * Same setup on both the uCsimm and uCdimm. | |
36 | */ | |
37 | #if defined(CONFIG_UCSIMM) || defined(CONFIG_UCDIMM) | |
38 | #ifdef CONFIG_RAMKERNEL | |
39 | #define ROMVEC_START 0x10c10000 | |
40 | #define ROMVEC_LENGTH 0x400 | |
41 | #define ROM_START 0x10c10400 | |
42 | #define ROM_LENGTH 0x1efc00 | |
43 | #define ROM_END 0x10e00000 | |
44 | #define RAMVEC_START 0x00000000 | |
45 | #define RAMVEC_LENGTH 0x400 | |
46 | #define RAM_START 0x00020400 | |
47 | #define RAM_LENGTH 0x7dfc00 | |
48 | #define RAM_END 0x00800000 | |
49 | #endif | |
50 | #ifdef CONFIG_ROMKERNEL | |
51 | #define ROMVEC_START 0x10c10000 | |
52 | #define ROMVEC_LENGTH 0x400 | |
53 | #define ROM_START 0x10c10400 | |
54 | #define ROM_LENGTH 0x1efc00 | |
55 | #define ROM_END 0x10e00000 | |
56 | #define RAMVEC_START 0x00000000 | |
57 | #define RAMVEC_LENGTH 0x400 | |
58 | #define RAM_START 0x00020000 | |
59 | #define RAM_LENGTH 0x600000 | |
60 | #define RAM_END 0x00800000 | |
61 | #endif | |
62 | #ifdef CONFIG_HIMEMKERNEL | |
63 | #define ROMVEC_START 0x00600000 | |
64 | #define ROMVEC_LENGTH 0x400 | |
65 | #define ROM_START 0x00600400 | |
66 | #define ROM_LENGTH 0x1efc00 | |
67 | #define ROM_END 0x007f0000 | |
68 | #define RAMVEC_START 0x00000000 | |
69 | #define RAMVEC_LENGTH 0x400 | |
70 | #define RAM_START 0x00020000 | |
71 | #define RAM_LENGTH 0x5e0000 | |
72 | #define RAM_END 0x00600000 | |
73 | #endif | |
74 | #endif | |
75 | ||
76 | #ifdef CONFIG_DRAGEN2 | |
77 | #define RAM_START 0x10000 | |
78 | #define RAM_LENGTH 0x7f0000 | |
79 | #endif | |
80 | ||
81 | #ifdef CONFIG_UCQUICC | |
82 | #define ROMVEC_START 0x00000000 | |
83 | #define ROMVEC_LENGTH 0x404 | |
84 | #define ROM_START 0x00000404 | |
85 | #define ROM_LENGTH 0x1ff6fc | |
86 | #define ROM_END 0x00200000 | |
87 | #define RAMVEC_START 0x00200000 | |
88 | #define RAMVEC_LENGTH 0x404 | |
89 | #define RAM_START 0x00200404 | |
90 | #define RAM_LENGTH 0x1ff6fc | |
91 | #define RAM_END 0x00400000 | |
92 | #endif | |
93 | ||
94 | /* | |
95 | * The standard Arnewsh 5206 board only has 1MiB of ram. Not normally | |
96 | * enough to be useful. Assume the user has fitted something larger, | |
97 | * at least 4MiB in size. No point in not letting the kernel completely | |
98 | * link, it will be obvious if it is too big when they go to load it. | |
99 | */ | |
100 | #if defined(CONFIG_ARN5206) | |
101 | #define RAM_START 0x10000 | |
102 | #define RAM_LENGTH 0x3f0000 | |
103 | #endif | |
104 | ||
105 | /* | |
106 | * The Motorola 5206eLITE board only has 1MiB of static RAM. | |
107 | */ | |
108 | #if defined(CONFIG_ELITE) | |
109 | #define RAM_START 0x30020000 | |
4945b302 | 110 | #define RAM_LENGTH 0xe0000 |
1da177e4 LT |
111 | #endif |
112 | ||
113 | /* | |
114 | * All the Motorola eval boards have the same basic arrangement. | |
115 | * The end of RAM will vary depending on how much ram is fitted, | |
116 | * but this isn't important here, we assume at least 4MiB. | |
117 | */ | |
118 | #if defined(CONFIG_M5206eC3) || defined(CONFIG_M5249C3) || \ | |
119 | defined(CONFIG_M5272C3) || defined(CONFIG_M5307C3) || \ | |
120 | defined(CONFIG_ARN5307) || defined(CONFIG_M5407C3) || \ | |
4945b302 GU |
121 | defined(CONFIG_M5271EVB) || defined(CONFIG_M5275EVB) || \ |
122 | defined(CONFIG_M5235EVB) | |
1da177e4 LT |
123 | #define RAM_START 0x20000 |
124 | #define RAM_LENGTH 0x3e0000 | |
125 | #endif | |
126 | ||
127 | /* | |
128 | * The senTec COBRA5272 board has nearly the same memory layout as | |
129 | * the M5272C3. We assume 16MiB ram. | |
130 | */ | |
131 | #if defined(CONFIG_COBRA5272) | |
132 | #define RAM_START 0x20000 | |
133 | #define RAM_LENGTH 0xfe0000 | |
134 | #endif | |
135 | ||
136 | #if defined(CONFIG_M5282EVB) | |
137 | #define RAM_START 0x10000 | |
138 | #define RAM_LENGTH 0x3f0000 | |
139 | #endif | |
140 | ||
141 | /* | |
142 | * The senTec COBRA5282 board has the same memory layout as the M5282EVB. | |
143 | */ | |
144 | #if defined(CONFIG_COBRA5282) | |
145 | #define RAM_START 0x10000 | |
146 | #define RAM_LENGTH 0x3f0000 | |
147 | #endif | |
148 | ||
4945b302 GU |
149 | |
150 | /* | |
151 | * The EMAC SoM-5282EM module. | |
152 | */ | |
153 | #if defined(CONFIG_SOM5282EM) | |
154 | #define RAM_START 0x10000 | |
155 | #define RAM_LENGTH 0xff0000 | |
156 | #endif | |
157 | ||
158 | ||
1da177e4 LT |
159 | /* |
160 | * These flash boot boards use all of ram for operation. Again the | |
161 | * actual memory size is not important here, assume at least 4MiB. | |
162 | * They currently have no support for running in flash. | |
163 | */ | |
164 | #if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \ | |
165 | defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \ | |
166 | defined(CONFIG_HW_FEITH) | |
167 | #define RAM_START 0x400 | |
168 | #define RAM_LENGTH 0x3ffc00 | |
169 | #endif | |
170 | ||
171 | /* | |
4945b302 | 172 | * Sneha Boards mimimun memory |
1da177e4 LT |
173 | * The end of RAM will vary depending on how much ram is fitted, |
174 | * but this isn't important here, we assume at least 4MiB. | |
175 | */ | |
176 | #if defined(CONFIG_CPU16B) | |
177 | #define RAM_START 0x20000 | |
178 | #define RAM_LENGTH 0x3e0000 | |
179 | #endif | |
180 | ||
4945b302 GU |
181 | #if defined(CONFIG_MOD5272) |
182 | #define RAM_START 0x02000000 | |
183 | #define RAM_LENGTH 0x00800000 | |
184 | #define RAMVEC_START 0x20000000 | |
185 | #define RAMVEC_LENGTH 0x00000400 | |
186 | #endif | |
1da177e4 LT |
187 | |
188 | #if defined(CONFIG_RAMKERNEL) | |
189 | #define TEXT ram | |
190 | #define DATA ram | |
191 | #define INIT ram | |
192 | #define BSS ram | |
193 | #endif | |
194 | #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL) | |
195 | #define TEXT rom | |
196 | #define DATA ram | |
197 | #define INIT ram | |
198 | #define BSS ram | |
199 | #endif | |
200 | ||
201 | #ifndef DATA_ADDR | |
202 | #define DATA_ADDR | |
203 | #endif | |
204 | ||
205 | ||
206 | OUTPUT_ARCH(m68k) | |
207 | ENTRY(_start) | |
208 | ||
209 | MEMORY { | |
210 | #ifdef RAMVEC_START | |
211 | ramvec : ORIGIN = RAMVEC_START, LENGTH = RAMVEC_LENGTH | |
212 | #endif | |
213 | ram : ORIGIN = RAM_START, LENGTH = RAM_LENGTH | |
214 | #ifdef RAM_END | |
215 | eram : ORIGIN = RAM_END, LENGTH = 0 | |
216 | #endif | |
217 | #ifdef ROM_START | |
218 | romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH | |
219 | rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH | |
220 | erom : ORIGIN = ROM_END, LENGTH = 0 | |
221 | #endif | |
222 | } | |
223 | ||
224 | jiffies = jiffies_64 + 4; | |
225 | ||
226 | SECTIONS { | |
227 | ||
228 | #ifdef ROMVEC_START | |
229 | . = ROMVEC_START ; | |
230 | .romvec : { | |
231 | __rom_start = . ; | |
232 | _romvec = .; | |
233 | *(.data.initvect) | |
234 | } > romvec | |
235 | #endif | |
236 | ||
237 | .text : { | |
238 | _stext = . ; | |
239 | *(.text) | |
240 | SCHED_TEXT | |
241 | *(.text.lock) | |
242 | ||
243 | . = ALIGN(16); /* Exception table */ | |
244 | __start___ex_table = .; | |
245 | *(__ex_table) | |
246 | __stop___ex_table = .; | |
247 | ||
248 | *(.rodata) *(.rodata.*) | |
249 | *(__vermagic) /* Kernel version magic */ | |
250 | *(.rodata1) | |
251 | *(.rodata.str1.1) | |
252 | ||
253 | /* Kernel symbol table: Normal symbols */ | |
254 | . = ALIGN(4); | |
255 | __start___ksymtab = .; | |
256 | *(__ksymtab) | |
257 | __stop___ksymtab = .; | |
258 | ||
259 | /* Kernel symbol table: GPL-only symbols */ | |
260 | __start___ksymtab_gpl = .; | |
261 | *(__ksymtab_gpl) | |
262 | __stop___ksymtab_gpl = .; | |
263 | ||
264 | /* Kernel symbol table: Normal symbols */ | |
265 | __start___kcrctab = .; | |
266 | *(__kcrctab) | |
267 | __stop___kcrctab = .; | |
268 | ||
269 | /* Kernel symbol table: GPL-only symbols */ | |
270 | __start___kcrctab_gpl = .; | |
271 | *(__kcrctab_gpl) | |
272 | __stop___kcrctab_gpl = .; | |
273 | ||
274 | /* Kernel symbol table: strings */ | |
275 | *(__ksymtab_strings) | |
276 | ||
277 | /* Built-in module parameters */ | |
278 | __start___param = .; | |
279 | *(__param) | |
280 | __stop___param = .; | |
281 | ||
282 | . = ALIGN(4) ; | |
283 | _etext = . ; | |
284 | } > TEXT | |
285 | ||
286 | #ifdef ROM_END | |
287 | . = ROM_END ; | |
288 | .erom : { | |
289 | __rom_end = . ; | |
290 | } > erom | |
291 | #endif | |
292 | #ifdef RAMVEC_START | |
293 | . = RAMVEC_START ; | |
294 | .ramvec : { | |
295 | __ramvec = .; | |
296 | } > ramvec | |
297 | #endif | |
298 | ||
299 | .data DATA_ADDR : { | |
300 | . = ALIGN(4); | |
301 | _sdata = . ; | |
302 | *(.data) | |
303 | . = ALIGN(8192) ; | |
304 | *(.data.init_task) | |
305 | _edata = . ; | |
306 | } > DATA | |
307 | ||
308 | .init : { | |
309 | . = ALIGN(4096); | |
310 | __init_begin = .; | |
311 | _sinittext = .; | |
312 | *(.init.text) | |
313 | _einittext = .; | |
314 | *(.init.data) | |
315 | . = ALIGN(16); | |
316 | __setup_start = .; | |
317 | *(.init.setup) | |
318 | __setup_end = .; | |
319 | __initcall_start = .; | |
320 | *(.initcall1.init) | |
321 | *(.initcall2.init) | |
322 | *(.initcall3.init) | |
323 | *(.initcall4.init) | |
324 | *(.initcall5.init) | |
325 | *(.initcall6.init) | |
326 | *(.initcall7.init) | |
327 | __initcall_end = .; | |
328 | __con_initcall_start = .; | |
329 | *(.con_initcall.init) | |
330 | __con_initcall_end = .; | |
331 | __security_initcall_start = .; | |
332 | *(.security_initcall.init) | |
333 | __security_initcall_end = .; | |
334 | . = ALIGN(4); | |
335 | __initramfs_start = .; | |
336 | *(.init.ramfs) | |
337 | __initramfs_end = .; | |
338 | . = ALIGN(4096); | |
339 | __init_end = .; | |
340 | } > INIT | |
341 | ||
342 | /DISCARD/ : { | |
343 | *(.exit.text) | |
344 | *(.exit.data) | |
345 | *(.exitcall.exit) | |
346 | } | |
347 | ||
348 | .bss : { | |
349 | . = ALIGN(4); | |
350 | _sbss = . ; | |
351 | *(.bss) | |
352 | *(COMMON) | |
353 | . = ALIGN(4) ; | |
354 | _ebss = . ; | |
355 | } > BSS | |
356 | ||
357 | #ifdef RAM_END | |
358 | . = RAM_END ; | |
359 | .eram : { | |
360 | __ramend = . ; | |
361 | _ramend = . ; | |
362 | } > eram | |
363 | #endif | |
364 | } | |
365 |