aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-04-29 12:56:58 +0200
committerIngo Molnar <mingo@elte.hu>2009-04-29 13:01:18 +0200
commitfd0731944333db6e9e91b6954c6ef95f4b71ab04 (patch)
tree81e2e58f2d00157ff5f37beb1c34effdb258f8d8 /arch/x86/kernel/vmlinux.lds.S
parentx86, vmlinux.lds: add copyright (diff)
downloadlinux-dev-fd0731944333db6e9e91b6954c6ef95f4b71ab04.tar.xz
linux-dev-fd0731944333db6e9e91b6954c6ef95f4b71ab04.zip
x86, vmlinux.lds: fix relocatable symbols
__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>
Diffstat (limited to 'arch/x86/kernel/vmlinux.lds.S')
-rw-r--r--arch/x86/kernel/vmlinux.lds.S7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 0bdbaa579696..4c85b2e2bb65 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -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 = .;
@@ -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) {