diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-04-29 03:47:25 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-29 04:20:33 -0400 |
commit | e58bdaa8f810332e5c1760ce496b01e07d51642c (patch) | |
tree | 701dce42e2d33487fe14674c9d9ae31bf157dccb /arch/x86/kernel/vmlinux.lds.S | |
parent | ff6f87e1626e10beef675084c9b5384a9477e3d5 (diff) |
x86, vmlinux.lds: unify first part of initdata
32-bit:
- Move definition of __init_begin outside output_section
because it covers more than one section
- Move ALIGN() for end-of-section inside .smp_locks output section.
Same effect but the intent is better documented that
we need both start and end aligned.
64-bit:
- Move ALIGN() outside output section in .init.setup
- Deleted unused __smp_alt_* symbols
None of the above should result in any functional change.
[ Impact: refactor and unify linker script ]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tim Abbott <tabbott@MIT.EDU>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1240991249-27117-9-git-send-email-sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index b3106c2a0373..8b203c4ced9b 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
@@ -231,6 +231,67 @@ SECTIONS | |||
231 | 231 | ||
232 | #endif /* CONFIG_X86_64 */ | 232 | #endif /* CONFIG_X86_64 */ |
233 | 233 | ||
234 | /* init_task */ | ||
235 | . = ALIGN(THREAD_SIZE); | ||
236 | .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { | ||
237 | *(.data.init_task) | ||
238 | } | ||
239 | #ifdef CONFIG_X86_64 | ||
240 | :data.init | ||
241 | #endif | ||
242 | |||
243 | /* | ||
244 | * smp_locks might be freed after init | ||
245 | * start/end must be page aligned | ||
246 | */ | ||
247 | . = ALIGN(PAGE_SIZE); | ||
248 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { | ||
249 | __smp_locks = .; | ||
250 | *(.smp_locks) | ||
251 | __smp_locks_end = .; | ||
252 | . = ALIGN(PAGE_SIZE); | ||
253 | } | ||
254 | |||
255 | /* Init code and data - will be freed after init */ | ||
256 | . = ALIGN(PAGE_SIZE); | ||
257 | __init_begin = .; /* paired with __init_end */ | ||
258 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { | ||
259 | _sinittext = .; | ||
260 | INIT_TEXT | ||
261 | _einittext = .; | ||
262 | } | ||
263 | |||
264 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { | ||
265 | INIT_DATA | ||
266 | } | ||
267 | |||
268 | . = ALIGN(16); | ||
269 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { | ||
270 | __setup_start = .; | ||
271 | *(.init.setup) | ||
272 | __setup_end = .; | ||
273 | } | ||
274 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { | ||
275 | __initcall_start = .; | ||
276 | INITCALLS | ||
277 | __initcall_end = .; | ||
278 | } | ||
279 | |||
280 | .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { | ||
281 | __con_initcall_start = .; | ||
282 | *(.con_initcall.init) | ||
283 | __con_initcall_end = .; | ||
284 | } | ||
285 | |||
286 | .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) { | ||
287 | __x86_cpu_dev_start = .; | ||
288 | *(.x86_cpu_dev.init) | ||
289 | __x86_cpu_dev_end = .; | ||
290 | } | ||
291 | |||
292 | SECURITY_INIT | ||
293 | |||
294 | |||
234 | #ifdef CONFIG_X86_32 | 295 | #ifdef CONFIG_X86_32 |
235 | # include "vmlinux_32.lds.S" | 296 | # include "vmlinux_32.lds.S" |
236 | #else | 297 | #else |