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