Skip to content

Commit

Permalink
x86, vmlinux.lds: unify remaining parts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sam Ravnborg authored and Ingo Molnar committed Apr 29, 2009
1 parent 9d16e78 commit 091e52c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 55 deletions.
32 changes: 27 additions & 5 deletions arch/x86/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,34 @@ SECTIONS
/* use another section data.init2, see PERCPU_VADDR() above */
#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
# include "vmlinux_32.lds.S"
#else
# include "vmlinux_64.lds.S"
#endif
. = ALIGN(PAGE_SIZE);
.brk : AT(ADDR(.brk) - LOAD_OFFSET) {
__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)
*(.eh_frame)
*(.discard)
}

STABS_DEBUG
DWARF_DEBUG
Expand Down
26 changes: 0 additions & 26 deletions arch/x86/kernel/vmlinux_32.lds.S

This file was deleted.

24 changes: 0 additions & 24 deletions arch/x86/kernel/vmlinux_64.lds.S

This file was deleted.

0 comments on commit 091e52c

Please sign in to comment.