binutils-gdb/ld/testsuite/ld-x86-64/pr22929.d
H.J. Lu 347a87745e x86: Treat relocation against IFUNC symbol as FUNC
When resolving a relocation against IFUNC symbol in a SHT_NOTE section
without SHF_ALLOC, we treat it as relocation against FUNC symbol since
it needs the address of IFUNC symbol, not the address returned by IFUNC
function.

bfd/

	PR ld/22929
	* elf32-i386.c (elf_i386_relocate_section): Treat relocation
	against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
	relocation against FUNC symbol.
	* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.

ld/

	PR ld/22929
	* testsuite/ld-i386/i386.exp: Run PR ld/22929 test.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.
	* testsuite/ld-i386/pr22929.d: New file.
	* testsuite/ld-i386/pr22929.s: Likewise.
	* testsuite/ld-x86-64/pr22929.d: Likewise.
	* testsuite/ld-x86-64/pr22929.s: Likewise.
2018-03-08 06:36:52 -08:00

12 lines
294 B
Makefile

#as: --64
#ld: -melf_x86_64 -shared
#readelf: -r --wide -s
There are no relocations in this file.
#...
Symbol table '.symtab' contains [0-9]+ entries:
Num: Value Size Type Bind Vis Ndx Name
#...
[ \t]+[a-f0-9]+: [a-f0-9]+ +1 IFUNC +GLOBAL DEFAULT +[a-f0-9]+ +foo
#...