mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
BaseTools/Scripts/ClangBase.lds: Move .entry into .text section
The GccBase.lds and ClangBase.lds ELF linker scripts have been laid out very carefully to ensure that the memory mappings of .text and .data are such that they can be preserved in the PE/COFF memory image. This removes the need to update any place-relative ELF relocations when generating the PE/COFF image, making its job much easier, and potentially allowing it to disregard static ELF relocations altogether, and rely solely on dynamic ELF relocations. Adding an arbitrary .entry section before .text breaks those assumptions, so instead of emitting it as a separate section, move its payload to the start of .text. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
parent
7fd3c89ff4
commit
f5d585b46b
@ -20,11 +20,8 @@ SECTIONS {
|
||||
*/
|
||||
. = PECOFF_HEADER_SIZE;
|
||||
|
||||
.entry ALIGN(CONSTANT(COMMONPAGESIZE)) : {
|
||||
KEEP(*(.entry))
|
||||
}
|
||||
|
||||
.text : ALIGN(CONSTANT(COMMONPAGESIZE)) {
|
||||
KEEP(*(.entry))
|
||||
*(.text .text.* .stub .gnu.linkonce.t.*)
|
||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||
*(.got .got.*)
|
||||
|
Loading…
x
Reference in New Issue
Block a user