Skip to content

Commit

Permalink
x86, vmlinux.lds: fix relocatable symbols
Browse files Browse the repository at this point in the history
__init_begin/_end symbols should be inside sections as well,
otherwise the relocatable kernel gets confused when freeing
init sections in the wrong place.

[ Impact: fix bootup crash ]

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Tim Abbott <tabbott@MIT.EDU>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <20090429105056.GA28720@uranus.ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Apr 29, 2009
1 parent 91fd7fe commit fd07319
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/x86/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ SECTIONS

/* Init code and data - will be freed after init */
. = ALIGN(PAGE_SIZE);
__init_begin = .; /* paired with __init_end */
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
__init_begin = .; /* paired with __init_end */
_sinittext = .;
INIT_TEXT
_einittext = .;
Expand Down Expand Up @@ -346,8 +346,11 @@ SECTIONS
#endif

. = ALIGN(PAGE_SIZE);

/* freed after init ends here */
__init_end = .;
.init.end : AT(ADDR(.init.end) - LOAD_OFFSET) {
__init_end = .;
}

#ifdef CONFIG_X86_64
.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
Expand Down

0 comments on commit fd07319

Please sign in to comment.