criu/compel/arch/aarch64/scripts/compel-pack.lds.S
Pepper Gray 025e2ecc69
compel: keep ELF metadata for ld.lld
Linking on arm64 using lld fails with:
  LINK     criu/pie/parasite.built-in.o
ld: error: discarding .shstrtab section is not allowed

keep the missing sections to enhance portability

Fixes: #2978
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
2026-07-20 11:23:01 +02:00

36 lines
577 B
ArmAsm

OUTPUT_ARCH(aarch64)
EXTERN(__export_parasite_head_start)
SECTIONS
{
.crblob 0x0 : {
*(.head.text)
ASSERT(DEFINED(__export_parasite_head_start),
"Symbol __export_parasite_head_start is missing");
*(.text*)
. = ALIGN(32);
*(.data*)
. = ALIGN(32);
*(.rodata*)
. = ALIGN(32);
*(.bss*)
. = ALIGN(32);
*(.got*)
. = ALIGN(32);
*(.toc*)
. = ALIGN(32);
} =0x00000000
.shstrtab : { *(.shstrtab) }
.strtab : { *(.strtab) }
.symtab : { *(.symtab) }
/DISCARD/ : {
*(.debug*)
*(.comment*)
*(.note*)
*(.group*)
*(.eh_frame*)
*(*)
}
}