binutils-gdb/ld/testsuite/ld-x86-64/pe-x86-64-5.rd
H.J. Lu c2e9a4a3ed elf/x86-64: Adjust R_AMD64_DIR64/R_AMD64_DIR32 for PE/x86-64 inputs
Subtract the value of the section contents for R_AMD64_DIR64 and
R_AMD64_DIR32 relocations when generating ELF output from PE/x86-64
inputs.

bfd/

	PR ld/27171
	* reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
	R_AMD64_DIR32 relocations for PE/x86-64 inputs.

ld/

	PR ld/27171
	* testsuite/ld-x86-64/pe-x86-64-5.obj.bz2: New file.
	* testsuite/ld-x86-64/pe-x86-64-5.od: Likewise.
	* testsuite/ld-x86-64/pe-x86-64-5.rd: Likewise.
	* testsuite/ld-x86-64/pe-x86-64.exp: Run PR ld/27171 test.
2021-01-12 05:19:24 -08:00

20 lines
996 B
R

Symbol table '.symtab' contains 10 entries:
Num: Value Size Type Bind Vis Ndx Name
+[a-f0-9]+: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
+[a-f0-9]+: 0000000000402014 0 NOTYPE GLOBAL DEFAULT 3 non_initdummy
+[a-f0-9]+: 0000000000402010 0 NOTYPE GLOBAL DEFAULT 2 initdummy
+[a-f0-9]+: 0000000000401000 0 NOTYPE GLOBAL DEFAULT 1 begin
+[a-f0-9]+: 0000000000402012 0 NOTYPE GLOBAL DEFAULT 3 __bss_start
+[a-f0-9]+: 0000000000402000 0 NOTYPE GLOBAL DEFAULT 2 Struct
+[a-f0-9]+: 0000000000402011 0 NOTYPE GLOBAL DEFAULT 2 initializedVar
+[a-f0-9]+: 0000000000402012 0 NOTYPE GLOBAL DEFAULT 2 _edata
+[a-f0-9]+: 0000000000402018 0 NOTYPE GLOBAL DEFAULT 3 _end
+[a-f0-9]+: 0000000000402015 0 NOTYPE GLOBAL DEFAULT 3 non_initialVar
Hex dump of section '.data':
0x00402000 11204000 00000000 15204000 00000000 . @...... @.....
0x00402010 aa55 .U
#pass