binutils-gdb/ld/testsuite/ld-loongarch-elf/relr-text-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

14 lines
496 B
Makefile

#source: relr-text.s
#ld: -pie -z pack-relative-relocs -T relr-relocs.ld
#readelf: -drW
#...
0x0000000000000016 \(TEXTREL\) 0x0
#...
0x0000000000000024 \(RELR\) .*
0x0000000000000023 \(RELRSZ\) 8 \(bytes\)
0x0000000000000025 \(RELRENT\) 8 \(bytes\)
#...
Relocation section '\.relr\.dyn' .* contains 1 entry which relocates 1 location:
Index: Entry Address Symbolic Address
0000: 0000000000010000 0000000000010000 _start