From: Rusty Russell Thanks to Andrew for pointing these out. This patch moves the parvirtprobe section into .init.data: it's only used in very very early boot, and for similar reasons, puts lguest_maybe_init and lguest_memory_setup in init.text. As well as fixing some warnings, this frees up a tiny bit more memory. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton --- arch/i386/kernel/vmlinux.lds.S | 13 ++++++------- arch/i386/lguest/lguest.c | 5 +++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff -puN arch/i386/kernel/vmlinux.lds.S~lguest-clean-up-some-references-inittext-warnings arch/i386/kernel/vmlinux.lds.S --- a/arch/i386/kernel/vmlinux.lds.S~lguest-clean-up-some-references-inittext-warnings +++ a/arch/i386/kernel/vmlinux.lds.S @@ -81,12 +81,6 @@ SECTIONS CONSTRUCTORS } :data - .paravirtprobe : AT(ADDR(.paravirtprobe) - LOAD_OFFSET) { - __start_paravirtprobe = .; - *(.paravirtprobe) - __stop_paravirtprobe = .; - } - . = ALIGN(4096); .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { __nosave_begin = .; @@ -151,7 +145,12 @@ SECTIONS *(.init.text) _einittext = .; } - .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { *(.init.data) } + .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { + *(.init.data) + __start_paravirtprobe = .; + *(.paravirtprobe) + __stop_paravirtprobe = .; + } . = ALIGN(16); .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { __setup_start = .; diff -puN arch/i386/lguest/lguest.c~lguest-clean-up-some-references-inittext-warnings arch/i386/lguest/lguest.c --- a/arch/i386/lguest/lguest.c~lguest-clean-up-some-references-inittext-warnings +++ a/arch/i386/lguest/lguest.c @@ -137,7 +137,7 @@ static struct notifier_block paniced = { .notifier_call = lguest_panic }; -static char *lguest_memory_setup(void) +static __init char *lguest_memory_setup(void) { /* We do this here because lockcheck barfs if before start_kernel */ atomic_notifier_chain_register(&panic_notifier_list, &paniced); @@ -550,7 +550,8 @@ static __attribute_used__ __init void lg start_kernel(); } -asm("lguest_maybe_init:\n" +asm(".section .init.text\n" + "lguest_maybe_init:\n" " cmpl $"__stringify(LGUEST_MAGIC_EBP)", %ebp\n" " jne 1f\n" " cmpl $"__stringify(LGUEST_MAGIC_EDI)", %edi\n" _