Add the GOT base for GOT32 relocs against IFUNC
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Jun 2016 18:06:10 +0000 (11:06 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Jun 2016 18:11:23 +0000 (11:11 -0700)
commit712ec27916b5604d29d928dec060fd1ba0fd9edb
tree221a14aa497e282aad40ccacf3bd8abbe30a9de8
parentca8c86efe7765262e25ebb08004012ba2fdadf52
Add the GOT base for GOT32 relocs against IFUNC

Add the GOT base for R_386_GOT32/R_386_GOT32X relocations against IFUNC
symbols if there is no base register and disallow them for PIC.

bfd/

PR ld/20244
* elf32-i386.c (elf_i386_relocate_section): Add the .got.plt
section address for R_386_GOT32/R_386_GOT32X relocations against
IFUNC symbols if there is no base register and return error for
PIC.

ld/

PR ld/20244
* testsuite/ld-i386/i386.exp: Run pr20244-2a, pr20244-2b,
pr20244-2c and pr20244-2d.
* testsuite/ld-i386/no-plt.exp: Run pr20244-3a and pr20244-3b.
* testsuite/ld-i386/pr20244-2.s: New file.
* testsuite/ld-i386/pr20244-2a.d: Likewise.
* testsuite/ld-i386/pr20244-2b.d: Likewise.
* testsuite/ld-i386/pr20244-2c.d: Likewise.
* testsuite/ld-i386/pr20244-2d.d: Likewise.
* testsuite/ld-i386/pr20244-3a.c: Likewise.
* testsuite/ld-i386/pr20244-3b.S: Likewise.
* testsuite/ld-i386/pr20244-3c.S: Likewise.
* testsuite/ld-i386/pr20244-3d.S: Likewise.
14 files changed:
bfd/ChangeLog
bfd/elf32-i386.c
ld/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/no-plt.exp
ld/testsuite/ld-i386/pr20244-2.s [new file with mode: 0644]
ld/testsuite/ld-i386/pr20244-2a.d [new file with mode: 0644]
ld/testsuite/ld-i386/pr20244-2b.d [new file with mode: 0644]
ld/testsuite/ld-i386/pr20244-2c.d [new file with mode: 0644]
ld/testsuite/ld-i386/pr20244-2d.d [new file with mode: 0644]
ld/testsuite/ld-i386/pr20244-3a.c [new file with mode: 0644]
ld/testsuite/ld-i386/pr20244-3b.S [new file with mode: 0644]
ld/testsuite/ld-i386/pr20244-3c.S [new file with mode: 0644]
ld/testsuite/ld-i386/pr20244-3d.S [new file with mode: 0644]