binutils-gdb/ld/testsuite/ld-loongarch-elf/relr-got.s
Xi Ruoyao 3880820e34 LoongArch: Add DT_RELR tests
Most tests are ported from AArch64.

The relr-addend test is added to make sure the addend (link-time address)
is correctly written into the relocated section.  Doing so is not
strictly needed for RELA, but strictly needed for RELR).

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

28 lines
381 B
ArmAsm

.text
.global _start
_start:
la.got $a0, sym_local
la.got $a1, sym_hidden
la.got $a2, sym_global
la.got $a3, sym_global_abs
la.got $a4, sym_weak_undef
la.got $a5, _DYNAMIC
sym_local:
nop
.global sym_hidden
.hidden sym_hidden
sym_hidden:
nop
.global sym_global
sym_global:
nop
.global sym_global_abs
.set sym_global_abs, 42
.global sym_weak_undef
.weak sym_weak_undef