Merge commit 'upstream/master'
[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                 HEAD_TEXT
66                 TEXT_TEXT
67                 SCHED_TEXT
68                 LOCK_TEXT
69                 *(.text.lock)
70
71                 . = ALIGN(16);          /* Exception table              */
72                 __start___ex_table = .;
73                 *(__ex_table)
74                 __stop___ex_table = .;
75
76                 *(.rodata) *(.rodata.*)
77                 *(__vermagic)           /* Kernel version magic */
78                 *(__markers_strings)
79                 *(.rodata1)
80                 *(.rodata.str1.1)
81
82                 /* Kernel symbol table: Normal symbols */
83                 . = ALIGN(4);
84                 __start___ksymtab = .;
85                 *(__ksymtab)
86                 __stop___ksymtab = .;
87
88                 /* Kernel symbol table: GPL-only symbols */
89                 __start___ksymtab_gpl = .;
90                 *(__ksymtab_gpl)
91                 __stop___ksymtab_gpl = .;
92
93                 /* Kernel symbol table: Normal unused symbols */
94                 __start___ksymtab_unused = .;
95                 *(__ksymtab_unused)
96                 __stop___ksymtab_unused = .;
97
98                 /* Kernel symbol table: GPL-only unused symbols */
99                 __start___ksymtab_unused_gpl = .;
100                 *(__ksymtab_unused_gpl)
101                 __stop___ksymtab_unused_gpl = .;
102
103                 /* Kernel symbol table: GPL-future symbols */
104                 __start___ksymtab_gpl_future = .;
105                 *(__ksymtab_gpl_future)
106                 __stop___ksymtab_gpl_future = .;
107
108                 /* Kernel symbol table: Normal symbols */
109                 __start___kcrctab = .;
110                 *(__kcrctab)
111                 __stop___kcrctab = .;
112
113                 /* Kernel symbol table: GPL-only symbols */
114                 __start___kcrctab_gpl = .;
115                 *(__kcrctab_gpl)
116                 __stop___kcrctab_gpl = .;
117
118                 /* Kernel symbol table: Normal unused symbols */
119                 __start___kcrctab_unused = .;
120                 *(__kcrctab_unused)
121                 __stop___kcrctab_unused = .;
122
123                 /* Kernel symbol table: GPL-only unused symbols */
124                 __start___kcrctab_unused_gpl = .;
125                 *(__kcrctab_unused_gpl)
126                 __stop___kcrctab_unused_gpl = .;
127
128                 /* Kernel symbol table: GPL-future symbols */
129                 __start___kcrctab_gpl_future = .;
130                 *(__kcrctab_gpl_future)
131                 __stop___kcrctab_gpl_future = .;
132
133                 /* Kernel symbol table: strings */
134                 *(__ksymtab_strings)
135
136                 /* Built-in module parameters */
137                 . = ALIGN(4) ;
138                 __start___param = .;
139                 *(__param)
140                 __stop___param = .;
141
142                 . = ALIGN(4) ;
143                 _etext = . ;
144         } > TEXT
145
146         .data DATA_ADDR : {
147                 . = ALIGN(4);
148                 _sdata = . ;
149                 DATA_DATA
150                 . = ALIGN(8192) ;
151                 *(.data.init_task)
152                 _edata = . ;
153         } > DATA
154
155         .init : {
156                 . = ALIGN(4096);
157                 __init_begin = .;
158                 _sinittext = .;
159                 INIT_TEXT
160                 _einittext = .;
161                 INIT_DATA
162                 . = ALIGN(16);
163                 __setup_start = .;
164                 *(.init.setup)
165                 __setup_end = .;
166                 __initcall_start = .;
167                 INITCALLS
168                 __initcall_end = .;
169                 __con_initcall_start = .;
170                 *(.con_initcall.init)
171                 __con_initcall_end = .;
172                 __security_initcall_start = .;
173                 *(.security_initcall.init)
174                 __security_initcall_end = .;
175 #ifdef CONFIG_BLK_DEV_INITRD
176                 . = ALIGN(4);
177                 __initramfs_start = .;
178                 *(.init.ramfs)
179                 __initramfs_end = .;
180 #endif
181                 . = ALIGN(4096);
182                 __init_end = .;
183         } > INIT
184
185         /DISCARD/ : {
186                 EXIT_TEXT
187                 EXIT_DATA
188                 *(.exitcall.exit)
189         }
190
191         .bss : {
192                 . = ALIGN(4);
193                 _sbss = . ;
194                 *(.bss)
195                 *(COMMON)
196                 . = ALIGN(4) ;
197                 _ebss = . ;
198                 _end = . ;
199         } > BSS
200
201 }
202