binutils-gdb/ld/testsuite/ld-x86-64/dt-relr-1a-x32.d
H.J. Lu 4d9e2e53b9 ld: Add simple DT_RELR tests
* testsuite/ld-elf/dt-relr-1.s: New file.
	* testsuite/ld-elf/dt-relr-1a.d: Likewise.
	* testsuite/ld-elf/dt-relr-1b.d: Likewise.
	* testsuite/ld-elf/dt-relr-1c.d: Likewise.
	* testsuite/ld-elf/dt-relr-2.s: Likewise.
	* testsuite/ld-elf/dt-relr-2a.d: Likewise.
	* testsuite/ld-elf/dt-relr-2b.d: Likewise.
	* testsuite/ld-elf/dt-relr-2c.d: Likewise.
	* testsuite/ld-elf/dt-relr-2d.d: Likewise.
	* testsuite/ld-elf/dt-relr-2e.d: Likewise.
	* testsuite/ld-elf/dt-relr-2f.d: Likewise.
	* testsuite/ld-elf/dt-relr-2g.d: Likewise.
	* testsuite/ld-elf/dt-relr-2h.d: Likewise.
	* testsuite/ld-elf/dt-relr-3.s: Likewise.
	* testsuite/ld-elf/dt-relr-3a.d: Likewise.
	* testsuite/ld-elf/dt-relr-3b.d: Likewise.
	* testsuite/ld-i386/dt-relr-1.s: Likewise.
	* testsuite/ld-i386/dt-relr-1a.d: Likewise.
	* testsuite/ld-i386/dt-relr-1b.d: Likewise.
	* testsuite/ld-x86-64/dt-relr-1a-x32.d: Likewise.
	* testsuite/ld-x86-64/dt-relr-1a.d: Likewise.
	* testsuite/ld-x86-64/dt-relr-1b-x32.d: Likewise.
	* testsuite/ld-x86-64/dt-relr-1b.d: Likewise.
	* testsuite/ld-x86-64/dt-relr-1.s: Likewise.
	* testsuite/ld-i386/i386.exp: Run dt-relr-1a and dt-relr-1b.
	* testsuite/ld-x86-64/x86-64.exp: Run dt-relr-1a, dt-relr-1a-x32
	dt-relr-1b and dt-relr-1b-x32.
2022-01-12 06:04:52 -08:00

28 lines
841 B
Makefile

#source: dt-relr-1.s
#as: --x32
#ld: -shared -melf32_x86_64 $DT_RELR_LDFLAGS
#readelf: -r -s --wide
#target: x86_64-*-linux*
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
+Offset +Info +Type +Sym. Value +Symbol's Name \+ Addend
[0-9a-f]+ +[0-9a-f]+ +R_X86_64_32 +0+ +data1 \+ 0
[0-9a-f]+ +[0-9a-f]+ +R_X86_64_32 +0+ +data1 \+ 0
Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entry:
+Offset +Info +Type +Sym. Value +Symbol's Name \+ Addend
[0-9a-f]+ +[0-9a-f]+ +R_X86_64_JUMP_SLOT +0+ +func1 \+ 0
Relocation section '.relr.dyn' at offset 0x[a-f0-9]+ contains 2 entries:
+3 offsets
[a-f0-9]+
[a-f0-9]+
[a-f0-9]+
#...
Symbol table '.symtab' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
#...
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__ehdr_start
#pass