mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-03 11:13:56 +08:00
dad2232844
Commite41f501d39
("vmlinux.lds: account for destructor sections") added '.text.exit' to EXIT_TEXT which is discarded at link time by default. This breaks compilation of UML: `.text.exit' referenced in section `.fini_array' of /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libc.a(sdlerror.o): defined in discarded section `.text.exit' of /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libc.a(sdlerror.o) Apparently UML doesn't want to discard exit text, so let's place all EXIT_TEXT sections in .exit.text. Fixes:e41f501d39
("vmlinux.lds: account for destructor sections") Reported-by: Stefan Traby <stefan@hello-penguin.com> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: <stable@vger.kernel.org> Acked-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Richard Weinberger <richard@nod.at>
108 lines
1.7 KiB
ArmAsm
108 lines
1.7 KiB
ArmAsm
#include <asm-generic/vmlinux.lds.h>
|
|
|
|
.fini : { *(.fini) } =0x9090
|
|
_etext = .;
|
|
PROVIDE (etext = .);
|
|
|
|
. = ALIGN(4096);
|
|
_sdata = .;
|
|
PROVIDE (sdata = .);
|
|
|
|
RODATA
|
|
|
|
.unprotected : { *(.unprotected) }
|
|
. = ALIGN(4096);
|
|
PROVIDE (_unprotected_end = .);
|
|
|
|
. = ALIGN(4096);
|
|
.note : { *(.note.*) }
|
|
EXCEPTION_TABLE(0)
|
|
|
|
BUG_TABLE
|
|
|
|
.uml.setup.init : {
|
|
__uml_setup_start = .;
|
|
*(.uml.setup.init)
|
|
__uml_setup_end = .;
|
|
}
|
|
|
|
.uml.help.init : {
|
|
__uml_help_start = .;
|
|
*(.uml.help.init)
|
|
__uml_help_end = .;
|
|
}
|
|
|
|
.uml.postsetup.init : {
|
|
__uml_postsetup_start = .;
|
|
*(.uml.postsetup.init)
|
|
__uml_postsetup_end = .;
|
|
}
|
|
|
|
.init.setup : {
|
|
INIT_SETUP(0)
|
|
}
|
|
|
|
PERCPU_SECTION(32)
|
|
|
|
.initcall.init : {
|
|
INIT_CALLS
|
|
}
|
|
|
|
.con_initcall.init : {
|
|
CON_INITCALL
|
|
}
|
|
|
|
.uml.initcall.init : {
|
|
__uml_initcall_start = .;
|
|
*(.uml.initcall.init)
|
|
__uml_initcall_end = .;
|
|
}
|
|
|
|
SECURITY_INIT
|
|
|
|
.exitcall : {
|
|
__exitcall_begin = .;
|
|
*(.exitcall.exit)
|
|
__exitcall_end = .;
|
|
}
|
|
|
|
.uml.exitcall : {
|
|
__uml_exitcall_begin = .;
|
|
*(.uml.exitcall.exit)
|
|
__uml_exitcall_end = .;
|
|
}
|
|
|
|
. = ALIGN(4);
|
|
.altinstructions : {
|
|
__alt_instructions = .;
|
|
*(.altinstructions)
|
|
__alt_instructions_end = .;
|
|
}
|
|
.altinstr_replacement : { *(.altinstr_replacement) }
|
|
/* .exit.text is discard at runtime, not link time, to deal with references
|
|
from .altinstructions and .eh_frame */
|
|
.exit.text : { EXIT_TEXT }
|
|
.exit.data : { *(.exit.data) }
|
|
|
|
.preinit_array : {
|
|
__preinit_array_start = .;
|
|
*(.preinit_array)
|
|
__preinit_array_end = .;
|
|
}
|
|
.init_array : {
|
|
__init_array_start = .;
|
|
*(.init_array)
|
|
__init_array_end = .;
|
|
}
|
|
.fini_array : {
|
|
__fini_array_start = .;
|
|
*(.fini_array)
|
|
__fini_array_end = .;
|
|
}
|
|
|
|
. = ALIGN(4096);
|
|
.init.ramfs : {
|
|
INIT_RAM_FS
|
|
}
|
|
|