binutils-gdb/ld/emulparams/elf64loongarch.sh
Xi Ruoyao d89ecf33ab LoongArch: Add DT_RELR support
The logic is same as a71d876801 ("aarch64: Add DT_RELR support").

As LoongArch does not have -z dynamic-undefined-weak, we don't need to
consider UNDEFWEAK_NO_DYNAMIC_RELOC.

The linker relaxation adds another layer of complexity.  When we delete
bytes in a section during relaxation, we need to fix up the offset in
the to-be-packed relative relocations against this section.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
2024-07-05 12:11:11 +08:00

13 lines
256 B
Bash

source_sh ${srcdir}/emulparams/elf64loongarch-defs.sh
source_sh ${srcdir}/emulparams/dt-relr.sh
OUTPUT_FORMAT="elf64-loongarch"
case "$target" in
loongarch64*-linux*)
case "$EMULATION_NAME" in
*64*)
LIBPATH_SUFFIX="64";;
esac
;;
esac