diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-04-29 03:47:29 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-29 04:20:35 -0400 |
commit | 091e52c3551d3031343df24b573b770b4c6c72b6 (patch) | |
tree | 84bbe9f7a240798f623dfd9ec2a4639608601721 | |
parent | 9d16e78318f174fd4b07916a93e41749d5199267 (diff) |
x86, vmlinux.lds: unify remaining parts
32 bit:
- explicit page align .bss
- move ALING() out of .brk output section
- discard *(.eh_frame)
64 bit:
- move ALIGN() out of .bss output section
- move ALIGN() out of .brk output section
- use a dedicated section to define _end
[ Impact: unify and fix section alignments in 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-13-git-send-email-sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 32 | ||||
-rw-r--r-- | arch/x86/kernel/vmlinux_32.lds.S | 26 | ||||
-rw-r--r-- | arch/x86/kernel/vmlinux_64.lds.S | 24 |
3 files changed, 27 insertions, 55 deletions
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 1ea2b8571e1a..ef3e4f1042b5 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
@@ -359,12 +359,34 @@ SECTIONS | |||
359 | /* use another section data.init2, see PERCPU_VADDR() above */ | 359 | /* use another section data.init2, see PERCPU_VADDR() above */ |
360 | #endif | 360 | #endif |
361 | 361 | ||
362 | /* BSS */ | ||
363 | . = ALIGN(PAGE_SIZE); | ||
364 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { | ||
365 | __bss_start = .; | ||
366 | *(.bss.page_aligned) | ||
367 | *(.bss) | ||
368 | . = ALIGN(4); | ||
369 | __bss_stop = .; | ||
370 | } | ||
362 | 371 | ||
363 | #ifdef CONFIG_X86_32 | 372 | . = ALIGN(PAGE_SIZE); |
364 | # include "vmlinux_32.lds.S" | 373 | .brk : AT(ADDR(.brk) - LOAD_OFFSET) { |
365 | #else | 374 | __brk_base = .; |
366 | # include "vmlinux_64.lds.S" | 375 | . += 64 * 1024; /* 64k alignment slop space */ |
367 | #endif | 376 | *(.brk_reservation) /* areas brk users have reserved */ |
377 | __brk_limit = .; | ||
378 | } | ||
379 | |||
380 | .end : AT(ADDR(.end) - LOAD_OFFSET) { | ||
381 | _end = .; | ||
382 | } | ||
383 | |||
384 | /* Sections to be discarded */ | ||
385 | /DISCARD/ : { | ||
386 | *(.exitcall.exit) | ||
387 | *(.eh_frame) | ||
388 | *(.discard) | ||
389 | } | ||
368 | 390 | ||
369 | STABS_DEBUG | 391 | STABS_DEBUG |
370 | DWARF_DEBUG | 392 | DWARF_DEBUG |
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S deleted file mode 100644 index d23ee2c15c28..000000000000 --- a/arch/x86/kernel/vmlinux_32.lds.S +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* BSS */ | ||
2 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { | ||
3 | __bss_start = .; | ||
4 | *(.bss.page_aligned) | ||
5 | *(.bss) | ||
6 | . = ALIGN(4); | ||
7 | __bss_stop = .; | ||
8 | } | ||
9 | |||
10 | .brk : AT(ADDR(.brk) - LOAD_OFFSET) { | ||
11 | . = ALIGN(PAGE_SIZE); | ||
12 | __brk_base = .; | ||
13 | . += 64 * 1024; /* 64k alignment slop space */ | ||
14 | *(.brk_reservation) /* areas brk users have reserved */ | ||
15 | __brk_limit = .; | ||
16 | } | ||
17 | |||
18 | .end : AT(ADDR(.end) - LOAD_OFFSET) { | ||
19 | _end = . ; | ||
20 | } | ||
21 | |||
22 | /* Sections to be discarded */ | ||
23 | /DISCARD/ : { | ||
24 | *(.exitcall.exit) | ||
25 | *(.discard) | ||
26 | } | ||
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S deleted file mode 100644 index a53936696a08..000000000000 --- a/arch/x86/kernel/vmlinux_64.lds.S +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { | ||
2 | . = ALIGN(PAGE_SIZE); | ||
3 | __bss_start = .; /* BSS */ | ||
4 | *(.bss.page_aligned) | ||
5 | *(.bss) | ||
6 | __bss_stop = .; | ||
7 | } | ||
8 | |||
9 | .brk : AT(ADDR(.brk) - LOAD_OFFSET) { | ||
10 | . = ALIGN(PAGE_SIZE); | ||
11 | __brk_base = .; | ||
12 | . += 64 * 1024; /* 64k alignment slop space */ | ||
13 | *(.brk_reservation) /* areas brk users have reserved */ | ||
14 | __brk_limit = .; | ||
15 | } | ||
16 | |||
17 | _end = . ; | ||
18 | |||
19 | /* Sections to be discarded */ | ||
20 | /DISCARD/ : { | ||
21 | *(.exitcall.exit) | ||
22 | *(.eh_frame) | ||
23 | *(.discard) | ||
24 | } | ||