ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / m68knommu / kernel / vmlinux.lds.S
1 /*
2  *      vmlinux.lds.S -- master linker script for m68knommu arch
3  *
4  *      (C) Copyright 2002-2003, 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
110 #define RAM_END         0xe0000
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)
121 #define RAM_START       0x20000
122 #define RAM_LENGTH      0x3e0000
123 #endif
124
125 /*
126  *   The senTec COBRA5272 board has nearly the same
127  *   memory layout as the M5272C3.
128  *   We assume 16MB ram.
129  */
130 #if defined(CONFIG_COBRA5272)
131 #define RAM_START   0x20000
132 #define RAM_LENGTH  0xfe0000
133 #endif
134
135 #if defined(CONFIG_M5282C3)
136 #define RAM_START       0x10000
137 #define RAM_LENGTH      0x3f0000
138 #endif
139
140 /*
141  *   The senTec COBRA5282 board has the same
142  *   memory layout as the M5282C3.
143  */
144 #if defined(CONFIG_COBRA5282)
145 #define  RAM_START   0x10000
146 #define  RAM_LENGTH  0x3f0000
147 #endif
148
149 /*
150  *      These flash boot boards use all of ram for operation. Again the
151  *      actual memory size is not important here, assume at least 4MiB.
152  *      They currently have no support for running in flash.
153  */
154 #if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
155     defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \
156     defined(CONFIG_CLEOPATRA)
157 #define RAM_START       0x400
158 #define RAM_LENGTH      0x3ffc00
159 #endif
160
161 #if defined(CONFIG_RAMKERNEL)
162 #define TEXT            ram
163 #define DATA            ram
164 #define INIT            ram
165 #define BSS             ram
166 #endif
167 #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
168 #define TEXT            rom
169 #define DATA            ram
170 #define INIT            ram
171 #define BSS             ram
172 #endif
173
174 #ifndef DATA_ADDR
175 #define DATA_ADDR
176 #endif
177
178
179 OUTPUT_ARCH(m68k)
180 ENTRY(_start)
181
182 MEMORY {
183 #ifdef RAMVEC_START
184         ramvec  : ORIGIN = RAMVEC_START, LENGTH = RAMVEC_LENGTH
185 #endif
186         ram     : ORIGIN = RAM_START, LENGTH = RAM_LENGTH
187 #ifdef RAM_END
188         eram    : ORIGIN = RAM_END, LENGTH = 0
189 #endif
190 #ifdef ROM_START
191         romvec  : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH
192         rom     : ORIGIN = ROM_START, LENGTH = ROM_LENGTH
193         erom    : ORIGIN = ROM_END, LENGTH = 0
194 #endif
195 }
196
197 jiffies = jiffies_64 + 4;
198
199 SECTIONS {
200
201 #ifdef ROMVEC_START
202         . = ROMVEC_START ;
203         .romvec : {
204                 __rom_start = . ;
205                 _romvec = .;
206                 *(.data.initvect)
207         } > romvec
208 #endif
209
210         .text : {
211                 _stext = . ;
212                 *(.text)
213                 SCHED_TEXT
214                 *(.text.lock)
215
216                 . = ALIGN(16);          /* Exception table              */
217                 __start___ex_table = .;
218                 *(__ex_table)
219                 __stop___ex_table = .;
220
221                 *(.rodata) *(.rodata.*)
222                 *(__vermagic)           /* Kernel version magic */
223                 *(.rodata1)
224                 *(.rodata.str1.1)
225
226                 /* Kernel symbol table: Normal symbols */
227                 . = ALIGN(4);
228                 __start___ksymtab = .;
229                 *(__ksymtab)
230                 __stop___ksymtab = .;
231
232                 /* Kernel symbol table: GPL-only symbols */
233                 __start___ksymtab_gpl = .;
234                 *(__ksymtab_gpl)
235                 __stop___ksymtab_gpl = .;
236
237                 /* Kernel symbol table: Normal symbols */
238                 __start___kcrctab = .;
239                 *(__kcrctab)
240                 __stop___kcrctab = .;
241
242                 /* Kernel symbol table: GPL-only symbols */
243                 __start___kcrctab_gpl = .;
244                 *(__kcrctab_gpl)
245                 __stop___kcrctab_gpl = .;
246
247                 /* Kernel symbol table: strings */
248                 *(__ksymtab_strings)
249
250                 . = ALIGN(4) ;
251                 _etext = . ;
252         } > TEXT
253
254 #ifdef ROM_END
255         . = ROM_END ;
256         .erom : {
257                 __rom_end = . ;
258         } > erom
259 #endif
260 #ifdef RAMVEC_START
261         . = RAMVEC_START ;
262         .ramvec : {
263                 __ramvec = .;
264         } > ramvec
265 #endif
266
267         .data DATA_ADDR : {
268                 . = ALIGN(4);
269                 _sdata = . ;
270                 *(.data)
271                 . = ALIGN(8192) ;
272                 *(.data.init_task)
273                 _edata = . ;
274         } > DATA
275
276         .init : {
277                 . = ALIGN(4096);
278                 __init_begin = .;
279                 _sinittext = .;
280                 *(.init.text)
281                 _einittext = .;
282                 *(.init.data)
283                 . = ALIGN(16);
284                 __setup_start = .;
285                 *(.init.setup)
286                 __setup_end = .;
287                 __start___param = .;
288                 *(__param)
289                 __stop___param = .;
290                 __initcall_start = .;
291                 *(.initcall1.init)
292                 *(.initcall2.init)
293                 *(.initcall3.init)
294                 *(.initcall4.init)
295                 *(.initcall5.init)
296                 *(.initcall6.init)
297                 *(.initcall7.init)
298                 __initcall_end = .;
299                 __con_initcall_start = .;
300                 *(.con_initcall.init)
301                 __con_initcall_end = .;
302                 __security_initcall_start = .;
303                 *(.security_initcall.init)
304                 __security_initcall_end = .;
305                 . = ALIGN(4);
306                 __initramfs_start = .;
307                 *(.init.ramfs)
308                 __initramfs_end = .;
309                 . = ALIGN(4);
310                 __init_end = .;
311         } > INIT
312
313         /DISCARD/ : {
314                 *(.exit.text)
315                 *(.exit.data)
316                 *(.exitcall.exit)
317         }
318
319         .bss : {
320                 . = ALIGN(4);
321                 _sbss = . ;
322                 *(.bss)
323                 *(COMMON)
324                 . = ALIGN(4) ;
325                 _ebss = . ;
326         } > BSS
327
328 #ifdef RAM_END
329         . = RAM_END ;
330         .eram : {
331                 __ramend = . ;
332                 _ramend = . ;
333         } > eram
334 #endif
335 }
336