mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-11 13:02:10 +08:00
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.
8 lines
230 B
Makefile
8 lines
230 B
Makefile
#as: --32
|
|
#ld: -e bar -melf_i386
|
|
#readelf: -r --wide
|
|
|
|
Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entry:
|
|
Offset Info Type Sym. Value Symbol's Name
|
|
[0-9a-f]+ +[0-9a-f]+ +R_386_IRELATIVE +
|