diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-09-30 02:16:52 -0400 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-10-01 04:52:10 -0400 |
commit | cabb558714945e92000f627dda562aa5e86a31af (patch) | |
tree | 595cd75dad072224041260afb220d7fce3164e53 /arch/powerpc/kernel/vmlinux.lds.S | |
parent | bd142b70a6bd5522f7d95f0cec06091b93bb0715 (diff) |
powerpc: make iSeries build
Merge vmlinux.lds.S.
Also remove arch/powerpc/kernel/vmlinux.lds which is a
generated file.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/powerpc/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/powerpc/kernel/vmlinux.lds.S | 190 |
1 files changed, 176 insertions, 14 deletions
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 09c6525cfa6..0587d9c4609 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -1,10 +1,29 @@ | |||
1 | #include <linux/config.h> | ||
2 | #ifdef CONFIG_PPC64 | ||
3 | #include <asm/page.h> | ||
4 | #endif | ||
1 | #include <asm-generic/vmlinux.lds.h> | 5 | #include <asm-generic/vmlinux.lds.h> |
2 | 6 | ||
7 | #ifdef CONFIG_PPC64 | ||
8 | OUTPUT_ARCH(powerpc:common64) | ||
9 | jiffies = jiffies_64; | ||
10 | #else | ||
3 | OUTPUT_ARCH(powerpc:common) | 11 | OUTPUT_ARCH(powerpc:common) |
4 | jiffies = jiffies_64 + 4; | 12 | jiffies = jiffies_64 + 4; |
13 | #endif | ||
5 | SECTIONS | 14 | SECTIONS |
6 | { | 15 | { |
16 | /* Sections to be discarded. */ | ||
17 | /DISCARD/ : { | ||
18 | *(.exitcall.exit) | ||
19 | #ifdef CONFIG_PPC32 | ||
20 | *(.exit.data) | ||
21 | #endif | ||
22 | } | ||
23 | |||
24 | |||
7 | /* Read-only sections, merged into text segment: */ | 25 | /* Read-only sections, merged into text segment: */ |
26 | #ifdef CONFIG_PPC32 | ||
8 | . = + SIZEOF_HEADERS; | 27 | . = + SIZEOF_HEADERS; |
9 | .interp : { *(.interp) } | 28 | .interp : { *(.interp) } |
10 | .hash : { *(.hash) } | 29 | .hash : { *(.hash) } |
@@ -28,17 +47,30 @@ SECTIONS | |||
28 | .rela.plt : { *(.rela.plt) } | 47 | .rela.plt : { *(.rela.plt) } |
29 | /* .init : { *(.init) } =0*/ | 48 | /* .init : { *(.init) } =0*/ |
30 | .plt : { *(.plt) } | 49 | .plt : { *(.plt) } |
31 | .text : | 50 | #endif |
32 | { | 51 | .text : { |
52 | #ifdef CONFIG_PPC64 | ||
53 | *(.text .text.*) | ||
54 | #else | ||
33 | *(.text) | 55 | *(.text) |
56 | #endif | ||
34 | SCHED_TEXT | 57 | SCHED_TEXT |
35 | LOCK_TEXT | 58 | LOCK_TEXT |
59 | #ifdef CONFIG_PPC64 | ||
60 | KPROBES_TEXT | ||
61 | #endif | ||
36 | *(.fixup) | 62 | *(.fixup) |
63 | #ifdef CONFIG_PPC32 | ||
37 | *(.got1) | 64 | *(.got1) |
38 | __got2_start = .; | 65 | __got2_start = .; |
39 | *(.got2) | 66 | *(.got2) |
40 | __got2_end = .; | 67 | __got2_end = .; |
68 | #else | ||
69 | . = ALIGN(PAGE_SIZE); | ||
70 | _etext = .; | ||
71 | #endif | ||
41 | } | 72 | } |
73 | #ifdef CONFIG_PPC32 | ||
42 | _etext = .; | 74 | _etext = .; |
43 | PROVIDE (etext = .); | 75 | PROVIDE (etext = .); |
44 | 76 | ||
@@ -48,6 +80,7 @@ SECTIONS | |||
48 | .dtors : { *(.dtors) } | 80 | .dtors : { *(.dtors) } |
49 | 81 | ||
50 | .fixup : { *(.fixup) } | 82 | .fixup : { *(.fixup) } |
83 | #endif | ||
51 | 84 | ||
52 | __ex_table : { | 85 | __ex_table : { |
53 | __start___ex_table = .; | 86 | __start___ex_table = .; |
@@ -61,6 +94,17 @@ SECTIONS | |||
61 | __stop___bug_table = .; | 94 | __stop___bug_table = .; |
62 | } | 95 | } |
63 | 96 | ||
97 | #ifdef CONFIG_PPC64 | ||
98 | __ftr_fixup : { | ||
99 | __start___ftr_fixup = .; | ||
100 | *(__ftr_fixup) | ||
101 | __stop___ftr_fixup = .; | ||
102 | } | ||
103 | |||
104 | RODATA | ||
105 | #endif | ||
106 | |||
107 | #ifdef CONFIG_PPC32 | ||
64 | /* Read-write section, merged into data segment: */ | 108 | /* Read-write section, merged into data segment: */ |
65 | . = ALIGN(4096); | 109 | . = ALIGN(4096); |
66 | .data : | 110 | .data : |
@@ -90,16 +134,25 @@ SECTIONS | |||
90 | .data.init_task : { *(.data.init_task) } | 134 | .data.init_task : { *(.data.init_task) } |
91 | 135 | ||
92 | . = ALIGN(4096); | 136 | . = ALIGN(4096); |
137 | #else | ||
138 | /* will be freed after init */ | ||
139 | . = ALIGN(PAGE_SIZE); | ||
140 | #endif | ||
93 | __init_begin = .; | 141 | __init_begin = .; |
94 | .init.text : { | 142 | .init.text : { |
95 | _sinittext = .; | 143 | _sinittext = .; |
96 | *(.init.text) | 144 | *(.init.text) |
97 | _einittext = .; | 145 | _einittext = .; |
98 | } | 146 | } |
147 | #ifdef CONFIG_PPC32 | ||
99 | /* .exit.text is discarded at runtime, not link time, | 148 | /* .exit.text is discarded at runtime, not link time, |
100 | to deal with references from __bug_table */ | 149 | to deal with references from __bug_table */ |
101 | .exit.text : { *(.exit.text) } | 150 | .exit.text : { *(.exit.text) } |
151 | #endif | ||
102 | .init.data : { | 152 | .init.data : { |
153 | #ifdef CONFIG_PPC64 | ||
154 | *(.init.data) | ||
155 | #else | ||
103 | *(.init.data); | 156 | *(.init.data); |
104 | __vtop_table_begin = .; | 157 | __vtop_table_begin = .; |
105 | *(.vtop_fixup); | 158 | *(.vtop_fixup); |
@@ -107,13 +160,31 @@ SECTIONS | |||
107 | __ptov_table_begin = .; | 160 | __ptov_table_begin = .; |
108 | *(.ptov_fixup); | 161 | *(.ptov_fixup); |
109 | __ptov_table_end = .; | 162 | __ptov_table_end = .; |
163 | #endif | ||
110 | } | 164 | } |
165 | |||
111 | . = ALIGN(16); | 166 | . = ALIGN(16); |
167 | #ifdef CONFIG_PPC32 | ||
112 | __setup_start = .; | 168 | __setup_start = .; |
113 | .init.setup : { *(.init.setup) } | 169 | #endif |
170 | .init.setup : { | ||
171 | #ifdef CONFIG_PPC64 | ||
172 | __setup_start = .; | ||
173 | #endif | ||
174 | *(.init.setup) | ||
175 | #ifdef CONFIG_PPC64 | ||
176 | __setup_end = .; | ||
177 | #endif | ||
178 | } | ||
179 | #ifdef CONFIG_PPC32 | ||
114 | __setup_end = .; | 180 | __setup_end = .; |
181 | |||
115 | __initcall_start = .; | 182 | __initcall_start = .; |
183 | #endif | ||
116 | .initcall.init : { | 184 | .initcall.init : { |
185 | #ifdef CONFIG_PPC64 | ||
186 | __initcall_start = .; | ||
187 | #endif | ||
117 | *(.initcall1.init) | 188 | *(.initcall1.init) |
118 | *(.initcall2.init) | 189 | *(.initcall2.init) |
119 | *(.initcall3.init) | 190 | *(.initcall3.init) |
@@ -121,27 +192,109 @@ SECTIONS | |||
121 | *(.initcall5.init) | 192 | *(.initcall5.init) |
122 | *(.initcall6.init) | 193 | *(.initcall6.init) |
123 | *(.initcall7.init) | 194 | *(.initcall7.init) |
195 | #ifdef CONFIG_PPC64 | ||
196 | __initcall_end = .; | ||
197 | #endif | ||
124 | } | 198 | } |
199 | #ifdef CONFIG_PPC32 | ||
125 | __initcall_end = .; | 200 | __initcall_end = .; |
126 | 201 | ||
127 | __con_initcall_start = .; | 202 | __con_initcall_start = .; |
128 | .con_initcall.init : { *(.con_initcall.init) } | 203 | #endif |
204 | .con_initcall.init : { | ||
205 | #ifdef CONFIG_PPC64 | ||
206 | __con_initcall_start = .; | ||
207 | #endif | ||
208 | *(.con_initcall.init) | ||
209 | #ifdef CONFIG_PPC64 | ||
210 | __con_initcall_end = .; | ||
211 | #endif | ||
212 | } | ||
213 | #ifdef CONFIG_PPC32 | ||
129 | __con_initcall_end = .; | 214 | __con_initcall_end = .; |
215 | #endif | ||
130 | 216 | ||
131 | SECURITY_INIT | 217 | SECURITY_INIT |
132 | 218 | ||
219 | #ifdef CONFIG_PPC32 | ||
133 | __start___ftr_fixup = .; | 220 | __start___ftr_fixup = .; |
134 | __ftr_fixup : { *(__ftr_fixup) } | 221 | __ftr_fixup : { *(__ftr_fixup) } |
135 | __stop___ftr_fixup = .; | 222 | __stop___ftr_fixup = .; |
223 | #else | ||
224 | . = ALIGN(PAGE_SIZE); | ||
225 | .init.ramfs : { | ||
226 | __initramfs_start = .; | ||
227 | *(.init.ramfs) | ||
228 | __initramfs_end = .; | ||
229 | } | ||
230 | #endif | ||
136 | 231 | ||
232 | #ifdef CONFIG_PPC32 | ||
137 | . = ALIGN(32); | 233 | . = ALIGN(32); |
138 | __per_cpu_start = .; | 234 | __per_cpu_start = .; |
139 | .data.percpu : { *(.data.percpu) } | 235 | #endif |
236 | .data.percpu : { | ||
237 | #ifdef CONFIG_PPC64 | ||
238 | __per_cpu_start = .; | ||
239 | #endif | ||
240 | *(.data.percpu) | ||
241 | #ifdef CONFIG_PPC64 | ||
242 | __per_cpu_end = .; | ||
243 | #endif | ||
244 | } | ||
245 | #ifdef CONFIG_PPC32 | ||
140 | __per_cpu_end = .; | 246 | __per_cpu_end = .; |
247 | #endif | ||
141 | 248 | ||
249 | #ifdef CONFIG_PPC64 | ||
250 | . = ALIGN(PAGE_SIZE); | ||
251 | . = ALIGN(16384); | ||
252 | __init_end = .; | ||
253 | /* freed after init ends here */ | ||
254 | |||
255 | |||
256 | /* Read/write sections */ | ||
257 | . = ALIGN(PAGE_SIZE); | ||
258 | . = ALIGN(16384); | ||
259 | /* The initial task and kernel stack */ | ||
260 | .data.init_task : { | ||
261 | *(.data.init_task) | ||
262 | } | ||
263 | |||
264 | . = ALIGN(PAGE_SIZE); | ||
265 | .data.page_aligned : { | ||
266 | *(.data.page_aligned) | ||
267 | } | ||
268 | |||
269 | .data.cacheline_aligned : { | ||
270 | *(.data.cacheline_aligned) | ||
271 | } | ||
272 | |||
273 | .data : { | ||
274 | *(.data .data.rel* .toc1) | ||
275 | *(.branch_lt) | ||
276 | } | ||
277 | |||
278 | .opd : { | ||
279 | *(.opd) | ||
280 | } | ||
281 | |||
282 | .got : { | ||
283 | __toc_start = .; | ||
284 | *(.got) | ||
285 | *(.toc) | ||
286 | . = ALIGN(PAGE_SIZE); | ||
287 | _edata = .; | ||
288 | } | ||
289 | |||
290 | |||
291 | . = ALIGN(PAGE_SIZE); | ||
292 | #else | ||
142 | . = ALIGN(4096); | 293 | . = ALIGN(4096); |
143 | __initramfs_start = .; | 294 | __initramfs_start = .; |
144 | .init.ramfs : { *(.init.ramfs) } | 295 | .init.ramfs : { |
296 | *(.init.ramfs) | ||
297 | } | ||
145 | __initramfs_end = .; | 298 | __initramfs_end = .; |
146 | 299 | ||
147 | . = ALIGN(4096); | 300 | . = ALIGN(4096); |
@@ -152,21 +305,30 @@ SECTIONS | |||
152 | _eextratext = .; | 305 | _eextratext = .; |
153 | 306 | ||
154 | __bss_start = .; | 307 | __bss_start = .; |
155 | .bss : | 308 | #endif |
156 | { | 309 | .bss : { |
310 | #ifdef CONFIG_PPC64 | ||
311 | __bss_start = .; | ||
312 | #else | ||
157 | *(.sbss) *(.scommon) | 313 | *(.sbss) *(.scommon) |
158 | *(.dynbss) | 314 | *(.dynbss) |
315 | #endif | ||
159 | *(.bss) | 316 | *(.bss) |
317 | #ifdef CONFIG_PPC32 | ||
160 | *(COMMON) | 318 | *(COMMON) |
319 | #else | ||
320 | __bss_stop = .; | ||
321 | #endif | ||
161 | } | 322 | } |
323 | #ifdef CONFIG_PPC32 | ||
162 | __bss_stop = .; | 324 | __bss_stop = .; |
325 | #endif | ||
163 | 326 | ||
327 | #ifdef CONFIG_PPC64 | ||
328 | . = ALIGN(PAGE_SIZE); | ||
329 | #endif | ||
164 | _end = . ; | 330 | _end = . ; |
331 | #ifdef CONFIG_PPC32 | ||
165 | PROVIDE (end = .); | 332 | PROVIDE (end = .); |
166 | 333 | #endif | |
167 | /* Sections to be discarded. */ | ||
168 | /DISCARD/ : { | ||
169 | *(.exitcall.exit) | ||
170 | *(.exit.data) | ||
171 | } | ||
172 | } | 334 | } |