Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
[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: Normal unused symbols */
118                 __start___kcrctab_unused = .;
119                 *(__kcrctab_unused)
120                 __stop___kcrctab_unused = .;
121
122                 /* Kernel symbol table: GPL-only unused symbols */
123                 __start___kcrctab_unused_gpl = .;
124                 *(__kcrctab_unused_gpl)
125                 __stop___kcrctab_unused_gpl = .;
126
127                 /* Kernel symbol table: GPL-future symbols */
128                 __start___kcrctab_gpl_future = .;
129                 *(__kcrctab_gpl_future)
130                 __stop___kcrctab_gpl_future = .;
131
132                 /* Kernel symbol table: strings */
133                 *(__ksymtab_strings)
134
135                 /* Built-in module parameters */
136                 . = ALIGN(4) ;
137                 __start___param = .;
138                 *(__param)
139                 __stop___param = .;
140
141                 . = ALIGN(4) ;
142                 _etext = . ;
143         } > TEXT
144
145         .data DATA_ADDR : {
146                 . = ALIGN(4);
147                 _sdata = . ;
148                 DATA_DATA
149                 . = ALIGN(8192) ;
150                 *(.data.init_task)
151                 _edata = . ;
152         } > DATA
153
154         .init : {
155                 . = ALIGN(4096);
156                 __init_begin = .;
157                 _sinittext = .;
158                 INIT_TEXT
159                 _einittext = .;
160                 INIT_DATA
161                 . = ALIGN(16);
162                 __setup_start = .;
163                 *(.init.setup)
164                 __setup_end = .;
165                 __initcall_start = .;
166                 INITCALLS
167                 __initcall_end = .;
168                 __con_initcall_start = .;
169                 *(.con_initcall.init)
170                 __con_initcall_end = .;
171                 __security_initcall_start = .;
172                 *(.security_initcall.init)
173                 __security_initcall_end = .;
174 #ifdef CONFIG_BLK_DEV_INITRD
175                 . = ALIGN(4);
176                 __initramfs_start = .;
177                 *(.init.ramfs)
178                 __initramfs_end = .;
179 #endif
180                 . = ALIGN(4096);
181                 __init_end = .;
182         } > INIT
183
184         /DISCARD/ : {
185                 EXIT_TEXT
186                 EXIT_DATA
187                 *(.exitcall.exit)
188         }
189
190         .bss : {
191                 . = ALIGN(4);
192                 _sbss = . ;
193                 *(.bss)
194                 *(COMMON)
195                 . = ALIGN(4) ;
196                 _ebss = . ;
197                 _end = . ;
198         } > BSS
199
200 }
201