Files
clang-p2996/bolt/test/AArch64/Inputs/array_end.lld_script
Fangrui Song ce5b371606 [BOLT,test] Make linker scripts less sensitive to lld's orphan placement (#93763)
Then two tests rely on .interp being the first section.
llvm-bolt would crash if lld places .interp after .got
(f639b57f79).

For best portability, when a linker scripts specifies a SECTIONS
command, the first section for each PT_LOAD segment should be specified
with a MAXPAGESIZE alignment. Otherwise, linkers have freedom to decide
how to place orphan sections, which might break intention.
2024-05-30 10:12:41 -07:00

16 lines
315 B
Plaintext

SECTIONS {
.interp : { *(.interp) }
. = ALIGN(CONSTANT(MAXPAGESIZE));
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
PROVIDE_HIDDEN (__fini_array_end = .);
}
. = . + 128;
.text : { *(.text) }
}