]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * vmlinux.lds.S -- master linker script for m68knommu arch | |
3 | * | |
73e2fba8 | 4 | * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com> |
1da177e4 | 5 | * |
1c952af5 GU |
6 | * This linker script is equiped to build either ROM loaded or RAM |
7 | * run kernels. | |
1da177e4 LT |
8 | */ |
9 | ||
1da177e4 LT |
10 | #include <asm-generic/vmlinux.lds.h> |
11 | ||
1da177e4 | 12 | #if defined(CONFIG_RAMKERNEL) |
73e2fba8 GU |
13 | #define RAM_START CONFIG_KERNELBASE |
14 | #define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE) | |
1da177e4 LT |
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) | |
73e2fba8 GU |
21 | #define RAM_START CONFIG_RAMBASE |
22 | #define RAM_LENGTH CONFIG_RAMSIZE | |
1c952af5 GU |
23 | #define ROMVEC_START CONFIG_ROMVEC |
24 | #define ROMVEC_LENGTH CONFIG_ROMVECSIZE | |
25 | #define ROM_START CONFIG_ROMSTART | |
26 | #define ROM_LENGTH CONFIG_ROMSIZE | |
1da177e4 LT |
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 { | |
1da177e4 | 42 | ram : ORIGIN = RAM_START, LENGTH = RAM_LENGTH |
1da177e4 LT |
43 | #ifdef ROM_START |
44 | romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH | |
45 | rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH | |
1da177e4 LT |
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 : { | |
fd593d12 | 63 | _text = .; |
1da177e4 | 64 | _stext = . ; |
9b0e7410 | 65 | HEAD_TEXT |
7664709b | 66 | TEXT_TEXT |
1da177e4 | 67 | SCHED_TEXT |
779125c2 | 68 | LOCK_TEXT |
1da177e4 LT |
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 */ | |
779125c2 | 78 | *(__markers_strings) |
1da177e4 LT |
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 | ||
56591b99 GU |
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 | ||
9f28bb7e GKH |
103 | /* Kernel symbol table: GPL-future symbols */ |
104 | __start___ksymtab_gpl_future = .; | |
105 | *(__ksymtab_gpl_future) | |
106 | __stop___ksymtab_gpl_future = .; | |
107 | ||
1da177e4 LT |
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 | ||
f38c8431 GU |
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 | ||
9f28bb7e GKH |
128 | /* Kernel symbol table: GPL-future symbols */ |
129 | __start___kcrctab_gpl_future = .; | |
130 | *(__kcrctab_gpl_future) | |
131 | __stop___kcrctab_gpl_future = .; | |
132 | ||
1da177e4 LT |
133 | /* Kernel symbol table: strings */ |
134 | *(__ksymtab_strings) | |
135 | ||
136 | /* Built-in module parameters */ | |
124df2df | 137 | . = ALIGN(4) ; |
1da177e4 LT |
138 | __start___param = .; |
139 | *(__param) | |
140 | __stop___param = .; | |
141 | ||
142 | . = ALIGN(4) ; | |
143 | _etext = . ; | |
144 | } > TEXT | |
145 | ||
1da177e4 LT |
146 | .data DATA_ADDR : { |
147 | . = ALIGN(4); | |
148 | _sdata = . ; | |
ca967258 | 149 | DATA_DATA |
a14f5e4f GU |
150 | . = ALIGN(32); |
151 | *(.data.cacheline_aligned) | |
1da177e4 LT |
152 | . = ALIGN(8192) ; |
153 | *(.data.init_task) | |
154 | _edata = . ; | |
155 | } > DATA | |
156 | ||
157 | .init : { | |
158 | . = ALIGN(4096); | |
159 | __init_begin = .; | |
160 | _sinittext = .; | |
01ba2bdc | 161 | INIT_TEXT |
1da177e4 | 162 | _einittext = .; |
01ba2bdc | 163 | INIT_DATA |
1da177e4 LT |
164 | . = ALIGN(16); |
165 | __setup_start = .; | |
166 | *(.init.setup) | |
167 | __setup_end = .; | |
168 | __initcall_start = .; | |
61ce1efe | 169 | INITCALLS |
1da177e4 LT |
170 | __initcall_end = .; |
171 | __con_initcall_start = .; | |
172 | *(.con_initcall.init) | |
173 | __con_initcall_end = .; | |
174 | __security_initcall_start = .; | |
175 | *(.security_initcall.init) | |
176 | __security_initcall_end = .; | |
67d38229 | 177 | #ifdef CONFIG_BLK_DEV_INITRD |
1da177e4 LT |
178 | . = ALIGN(4); |
179 | __initramfs_start = .; | |
180 | *(.init.ramfs) | |
181 | __initramfs_end = .; | |
67d38229 | 182 | #endif |
1da177e4 LT |
183 | . = ALIGN(4096); |
184 | __init_end = .; | |
185 | } > INIT | |
186 | ||
187 | /DISCARD/ : { | |
01ba2bdc SR |
188 | EXIT_TEXT |
189 | EXIT_DATA | |
1da177e4 | 190 | *(.exitcall.exit) |
405d967d | 191 | *(.discard) |
1da177e4 LT |
192 | } |
193 | ||
194 | .bss : { | |
195 | . = ALIGN(4); | |
196 | _sbss = . ; | |
197 | *(.bss) | |
198 | *(COMMON) | |
199 | . = ALIGN(4) ; | |
200 | _ebss = . ; | |
779125c2 | 201 | _end = . ; |
1da177e4 LT |
202 | } > BSS |
203 | ||
1da177e4 LT |
204 | } |
205 |