Commit 091e52c3 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Ingo Molnar

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: default avatarSam 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: default avatarIngo Molnar <mingo@elte.hu>
parent 9d16e783
...@@ -359,12 +359,34 @@ SECTIONS ...@@ -359,12 +359,34 @@ SECTIONS
/* use another section data.init2, see PERCPU_VADDR() above */ /* use another section data.init2, see PERCPU_VADDR() above */
#endif #endif
/* BSS */
. = ALIGN(PAGE_SIZE);
.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
__bss_start = .;
*(.bss.page_aligned)
*(.bss)
. = ALIGN(4);
__bss_stop = .;
}
#ifdef CONFIG_X86_32 . = ALIGN(PAGE_SIZE);
# include "vmlinux_32.lds.S" .brk : AT(ADDR(.brk) - LOAD_OFFSET) {
#else __brk_base = .;
# include "vmlinux_64.lds.S" . += 64 * 1024; /* 64k alignment slop space */
#endif *(.brk_reservation) /* areas brk users have reserved */
__brk_limit = .;
}
.end : AT(ADDR(.end) - LOAD_OFFSET) {
_end = .;
}
/* Sections to be discarded */
/DISCARD/ : {
*(.exitcall.exit)
*(.eh_frame)
*(.discard)
}
STABS_DEBUG STABS_DEBUG
DWARF_DEBUG DWARF_DEBUG
......
/* BSS */
.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
__bss_start = .;
*(.bss.page_aligned)
*(.bss)
. = ALIGN(4);
__bss_stop = .;
}
.brk : AT(ADDR(.brk) - LOAD_OFFSET) {
. = ALIGN(PAGE_SIZE);
__brk_base = .;
. += 64 * 1024; /* 64k alignment slop space */
*(.brk_reservation) /* areas brk users have reserved */
__brk_limit = .;
}
.end : AT(ADDR(.end) - LOAD_OFFSET) {
_end = . ;
}
/* Sections to be discarded */
/DISCARD/ : {
*(.exitcall.exit)
*(.discard)
}
.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
. = ALIGN(PAGE_SIZE);
__bss_start = .; /* BSS */
*(.bss.page_aligned)
*(.bss)
__bss_stop = .;
}
.brk : AT(ADDR(.brk) - LOAD_OFFSET) {
. = ALIGN(PAGE_SIZE);
__brk_base = .;
. += 64 * 1024; /* 64k alignment slop space */
*(.brk_reservation) /* areas brk users have reserved */
__brk_limit = .;
}
_end = . ;
/* Sections to be discarded */
/DISCARD/ : {
*(.exitcall.exit)
*(.eh_frame)
*(.discard)
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment