Merge with 2.5.75.
[linux-2.6/linux-mips.git] / arch / m68knommu / vmlinux.lds.S
blob1ab8a31ef9645c2e291b7cb83f3df7af4b80df00
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  */
12 #include <linux/config.h>
13 #include <asm-generic/vmlinux.lds.h>
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
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
76 #ifdef CONFIG_DRAGEN2
77 #define RAM_START       0x10000
78 #define RAM_LENGTH      0x7f0000
79 #endif
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
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
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
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
125 #if defined(CONFIG_M5282C3)
126 #define RAM_START       0x10000
127 #define RAM_LENGTH      0x3f0000
128 #endif
131  *      These flash boot boards use all of ram for operation. Again the
132  *      actual memory size is not important here, assume at least 4MiB.
133  *      They currently have no support for running in flash.
134  */
135 #if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
136     defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \
137     defined(CONFIG_CLEOPATRA)
138 #define RAM_START       0x400
139 #define RAM_LENGTH      0x3ffc00
140 #endif
142 #if defined(CONFIG_RAMKERNEL)
143 #define TEXT            ram
144 #define DATA            ram
145 #define INIT            ram
146 #define BSS             ram
147 #endif
148 #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
149 #define TEXT            rom
150 #define DATA            ram
151 #define INIT            ram
152 #define BSS             ram
153 #endif
155 #ifndef DATA_ADDR
156 #define DATA_ADDR
157 #endif
160 OUTPUT_ARCH(m68k)
161 ENTRY(_start)
163 MEMORY {
164 #ifdef RAMVEC_START
165         ramvec  : ORIGIN = RAMVEC_START, LENGTH = RAMVEC_LENGTH
166 #endif
167         ram     : ORIGIN = RAM_START, LENGTH = RAM_LENGTH
168 #ifdef RAM_END
169         eram    : ORIGIN = RAM_END, LENGTH = 0
170 #endif
171 #ifdef ROM_START
172         romvec  : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH
173         rom     : ORIGIN = ROM_START, LENGTH = ROM_LENGTH
174         erom    : ORIGIN = ROM_END, LENGTH = 0
175 #endif
178 jiffies = jiffies_64 + 4;
180 SECTIONS {
182 #ifdef ROMVEC_START
183         . = ROMVEC_START ;
184         .romvec : {
185                 __rom_start = . ;
186                 _romvec = .;
187                 *(.data.initvect)
188         } > romvec
189 #endif
191         .text : {
192                 _stext = . ;
193                 *(.text)
194                 *(.text.lock)
196                 . = ALIGN(16);          /* Exception table              */
197                 __start___ex_table = .;
198                 *(__ex_table)
199                 __stop___ex_table = .;
201                 *(.rodata) *(.rodata.*)
202                 *(__vermagic)           /* Kernel version magic */
203                 *(.rodata1)
205                 /* Kernel symbol table: Normal symbols */
206                 __start___ksymtab = .;
207                 *(__ksymtab)
208                 __stop___ksymtab = .;
210                 /* Kernel symbol table: GPL-only symbols */
211                 __start___ksymtab_gpl = .;
212                 *(__ksymtab_gpl)
213                 __stop___ksymtab_gpl = .;
215                 /* Kernel symbol table: Normal symbols */
216                 __start___kcrctab = .;
217                 *(__kcrctab)
218                 __stop___kcrctab = .;
220                 /* Kernel symbol table: GPL-only symbols */
221                 __start___kcrctab_gpl = .;
222                 *(__kcrctab_gpl)
223                 __stop___kcrctab_gpl = .;
225                 /* Kernel symbol table: strings */
226                 *(__ksymtab_strings)
228                 . = ALIGN(4) ;
229                 _etext = . ;
230         } > TEXT
232 #ifdef ROM_END
233         . = ROM_END ;
234         .erom : {
235                 __rom_end = . ;
236         } > erom
237 #endif
238 #ifdef RAMVEC_START
239         . = RAMVEC_START ;
240         .ramvec : {
241                 __ramvec = .;
242         } > ramvec
243 #endif
245         .data DATA_ADDR : {
246                 . = ALIGN(4);
247                 _sdata = . ;
248                 *(.data)
249                 . = ALIGN(8192) ;
250                 *(.data.init_task)
251                 _edata = . ;
252         } > DATA
254         .init : {
255                 . = ALIGN(4096);
256                 __init_begin = .;
257                 _sinittext = .;
258                 *(.init.text)
259                 _einittext = .;
260                 *(.init.data)
261                 . = ALIGN(16);
262                 __setup_start = .;
263                 *(.init.setup)
264                 __setup_end = .;
265                 __start___param = .;
266                 *(__param)
267                 __stop___param = .;
268                 __initcall_start = .;
269                 *(.initcall1.init)
270                 *(.initcall2.init)
271                 *(.initcall3.init)
272                 *(.initcall4.init)
273                 *(.initcall5.init)
274                 *(.initcall6.init)
275                 *(.initcall7.init)
276                 __initcall_end = .;
277                 __con_initcall_start = .;
278                 *(.con_initcall.init)
279                 __con_initcall_end = .;
280                 __security_initcall_start = .;
281                 *(.security_initcall.init)
282                 __security_initcall_end = .;
283                 . = ALIGN(4);
284                 __initramfs_start = .;
285                 *(.init.ramfs)
286                 __initramfs_end = .;
287                 . = ALIGN(4);
288                 __init_end = .;
289         } > INIT
291         /DISCARD/ : {
292                 *(.exit.text)
293                 *(.exit.data)
294                 *(.exitcall.exit)
295         }
297         .bss : {
298                 . = ALIGN(4);
299                 _sbss = . ;
300                 *(.bss)
301                 *(COMMON)
302                 . = ALIGN(4) ;
303                 _ebss = . ;
304         } > BSS
306 #ifdef RAM_END
307         . = RAM_END ;
308         .eram : {
309                 __ramend = . ;
310                 _ramend = . ;
311         } > eram
312 #endif