binutils-gdb/ld/testsuite/ld-powerpc/pr23937.d
Alan Modra ba85c15dab PR23937, powerpc64le local ifunc IRELATIVE relocs are wrong
IFUNC resolvers must always be called via their global entry point.
They will be called from ld.so rather than from the local executable.

	PR 23937
bfd/
	* elf64-ppc.c (write_plt_relocs_for_local_syms): Don't add local
	entry offset for ifuncs.
ld/
	* testsuite/ld-powerpc/pr23937.d,
	* testsuite/ld-powerpc/pr23937.s: New test.
	* testsuite/ld-powerpc/powerpc.exp: Run it.
2018-11-30 16:18:58 +10:30

11 lines
231 B
Makefile

#as: -a64
#ld: -melf64ppc --defsym puts=0 --defsym _start=0
#readelf: -srW
# Check that the IRELATIVE addend is magic+0, not magic+8
#...
.* R_PPC64_IRELATIVE +10000180
#...
.*: 0+10000180 +20 IFUNC +LOCAL +DEFAULT .* magic
#pass