binutils-gdb/ld/testsuite/ld-loongarch-elf/relr-discard-pie.d
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

8 lines
396 B
Makefile

#source: relr-discard.s
#ld: -pie -z pack-relative-relocs -T relr-discard.ld
#readelf: -rW
Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries which relocate 2 locations:
Index: Entry Address Symbolic Address
0000: 0000000000020008 0000000000020008 _GLOBAL_OFFSET_TABLE_ \+ 0x8
0001: 0000000000000003 0000000000020010 _GLOBAL_OFFSET_TABLE_ \+ 0x10