
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>
15 lines
922 B
Makefile
15 lines
922 B
Makefile
#source: relr-got.s
|
|
#ld: -shared -z pack-relative-relocs -T relr-relocs.ld
|
|
#readelf: -rW
|
|
|
|
Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 3 entries:
|
|
Offset Info Type Symbol's Value Symbol's Name \+ Addend
|
|
0000000000020020 0000000300000002 R_LARCH_64 0000000000010034 sym_global \+ 0
|
|
0000000000020028 0000000500000002 R_LARCH_64 000000000000002a sym_global_abs \+ 0
|
|
0000000000020030 0000000200000002 R_LARCH_64 0000000000000000 sym_weak_undef \+ 0
|
|
|
|
Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries which relocate 3 locations:
|
|
Index: Entry Address Symbolic Address
|
|
0000: 0000000000020008 0000000000020008 _GLOBAL_OFFSET_TABLE_ \+ 0x8
|
|
0001: 0000000000000007 0000000000020010 _GLOBAL_OFFSET_TABLE_ \+ 0x10
|
|
0000000000020018 _GLOBAL_OFFSET_TABLE_ \+ 0x18
|