Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
[pandora-kernel.git] / arch / m68knommu / kernel / vmlinux.lds.S
1 /*
2  *      vmlinux.lds.S -- master linker script for m68knommu arch
3  *
4  *      (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com>
5  *
6  *      This linker script is equiped to build either ROM loaded or RAM
7  *      run kernels.
8  */
9
10 #include <asm-generic/vmlinux.lds.h>
11
12 #if defined(CONFIG_RAMKERNEL)
13 #define RAM_START       CONFIG_KERNELBASE
14 #define RAM_LENGTH      (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE)
15 #define TEXT            ram
16 #define DATA            ram
17 #define INIT            ram
18 #define BSS             ram
19 #endif
20 #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
21 #define RAM_START       CONFIG_RAMBASE
22 #define RAM_LENGTH      CONFIG_RAMSIZE
23 #define ROMVEC_START    CONFIG_ROMVEC
24 #define ROMVEC_LENGTH   CONFIG_ROMVECSIZE
25 #define ROM_START       CONFIG_ROMSTART
26 #define ROM_LENGTH      CONFIG_ROMSIZE
27 #define TEXT            rom
28 #define DATA            ram
29 #define INIT            ram
30 #define BSS             ram
31 #endif
32
33 #ifndef DATA_ADDR
34 #define DATA_ADDR
35 #endif
36
37
38 OUTPUT_ARCH(m68k)
39 ENTRY(_start)
40
41 MEMORY {
42         ram     : ORIGIN = RAM_START, LENGTH = RAM_LENGTH
43 #ifdef ROM_START
44         romvec  : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH
45         rom     : ORIGIN = ROM_START, LENGTH = ROM_LENGTH
46 #endif
47 }
48
49 jiffies = jiffies_64 + 4;
50
51 SECTIONS {
52
53 #ifdef ROMVEC_START
54         . = ROMVEC_START ;
55         .romvec : {
56                 __rom_start = . ;
57                 _romvec = .;
58                 *(.data.initvect)
59         } > romvec
60 #endif
61
62         .text : {
63                 _text = .;
64                 _stext = . ;
65                 TEXT_TEXT
66                 SCHED_TEXT
67                 LOCK_TEXT
68                 *(.text.lock)
69
70                 . = ALIGN(16);          /* Exception table              */
71                 __start___ex_table = .;
72                 *(__ex_table)
73                 __stop___ex_table = .;
74
75                 *(.rodata) *(.rodata.*)
76                 *(__vermagic)           /* Kernel version magic */
77                 *(__markers_strings)
78                 *(.rodata1)
79                 *(.rodata.str1.1)
80
81                 /* Kernel symbol table: Normal symbols */
82                 . = ALIGN(4);
83                 __start___ksymtab = .;
84                 *(__ksymtab)
85                 __stop___ksymtab = .;
86
87                 /* Kernel symbol table: GPL-only symbols */
88                 __start___ksymtab_gpl = .;
89                 *(__ksymtab_gpl)
90                 __stop___ksymtab_gpl = .;
91
92                 /* Kernel symbol table: Normal unused symbols */
93                 __start___ksymtab_unused = .;
94                 *(__ksymtab_unused)
95                 __stop___ksymtab_unused = .;
96
97                 /* Kernel symbol table: GPL-only unused symbols */
98                 __start___ksymtab_unused_gpl = .;
99                 *(__ksymtab_unused_gpl)
100                 __stop___ksymtab_unused_gpl = .;
101
102                 /* Kernel symbol table: GPL-future symbols */
103                 __start___ksymtab_gpl_future = .;
104                 *(__ksymtab_gpl_future)
105                 __stop___ksymtab_gpl_future = .;
106
107                 /* Kernel symbol table: Normal symbols */
108                 __start___kcrctab = .;
109                 *(__kcrctab)
110                 __stop___kcrctab = .;
111
112                 /* Kernel symbol table: GPL-only symbols */
113                 __start___kcrctab_gpl = .;
114                 *(__kcrctab_gpl)
115                 __stop___kcrctab_gpl = .;
116
117                 /* Kernel symbol table: GPL-future symbols */
118                 __start___kcrctab_gpl_future = .;
119                 *(__kcrctab_gpl_future)
120                 __stop___kcrctab_gpl_future = .;
121
122                 /* Kernel symbol table: strings */
123                 *(__ksymtab_strings)
124
125                 /* Built-in module parameters */
126                 . = ALIGN(4) ;
127                 __start___param = .;
128                 *(__param)
129                 __stop___param = .;
130
131                 . = ALIGN(4) ;
132                 _etext = . ;
133         } > TEXT
134
135         .data DATA_ADDR : {
136                 . = ALIGN(4);
137                 _sdata = . ;
138                 DATA_DATA
139                 . = ALIGN(8192) ;
140                 *(.data.init_task)
141                 _edata = . ;
142         } > DATA
143
144         .init : {
145                 . = ALIGN(4096);
146                 __init_begin = .;
147                 _sinittext = .;
148                 INIT_TEXT
149                 _einittext = .;
150                 INIT_DATA
151                 . = ALIGN(16);
152                 __setup_start = .;
153                 *(.init.setup)
154                 __setup_end = .;
155                 __initcall_start = .;
156                 INITCALLS
157                 __initcall_end = .;
158                 __con_initcall_start = .;
159                 *(.con_initcall.init)
160                 __con_initcall_end = .;
161                 __security_initcall_start = .;
162                 *(.security_initcall.init)
163                 __security_initcall_end = .;
164 #ifdef CONFIG_BLK_DEV_INITRD
165                 . = ALIGN(4);
166                 __initramfs_start = .;
167                 *(.init.ramfs)
168                 __initramfs_end = .;
169 #endif
170                 . = ALIGN(4096);
171                 __init_end = .;
172         } > INIT
173
174         /DISCARD/ : {
175                 EXIT_TEXT
176                 EXIT_DATA
177                 *(.exitcall.exit)
178         }
179
180         .bss : {
181                 . = ALIGN(4);
182                 _sbss = . ;
183                 *(.bss)
184                 *(COMMON)
185                 . = ALIGN(4) ;
186                 _ebss = . ;
187                 _end = . ;
188         } > BSS
189
190 }
191