binutils-gdb/ld/testsuite/ld-i386/pr27998b.d
H.J. Lu 8f29211c3f i386: Don't allow GOTOFF relocation against IFUNC symbol for PIC
We can't use the PLT entry as the function address for PIC since the PIC
register may not be set up properly for indirect call.

bfd/

	PR ld/27998
	* elf32-i386.c (elf_i386_relocate_section): Don't allow GOTOFF
	relocation against IFUNC symbol for PIC.

ld/

	PR ld/27998
	* testsuite/ld-i386/pr27998a.d: Replace -shared with -e bar.
	* testsuite/ld-i386/pr27998b.d: Expect a linker error.
	* testsuite/ld-ifunc/ifunc-2-i386-now.d: Updated.
	* testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-i386.s: Replace @GOTOFF with @GOT.
	* testsuite/ld-ifunc/ifunc-2-local-i386.s: Likewise.
2022-07-21 11:40:27 -07:00

4 lines
117 B
Makefile

#as: --32
#ld: -shared -melf_i386
#error: relocation R_386_GOTOFF against STT_GNU_IFUNC symbol `foo' isn't supported