Handle STT_GNU_IFUNC symols when building shared library.
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 6 Jan 2011 18:45:05 +0000 (18:45 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 6 Jan 2011 18:45:05 +0000 (18:45 +0000)
commit3db2e7dda697d71311d698f21d7c65b8ec1774ca
tree673b7abbfab3b1b454a5d9677950f0a919ca83d1
parentccfc3d6e06d5b9d2ebd8b8e4239f1313e33f40ac
Handle STT_GNU_IFUNC symols when building shared library.

bfd/

2012-01-06  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/12366
PR ld/12371
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
handle symbols marked with regular reference, but not non-GOT
reference when building shared library.

* elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
local and global STT_GNU_IFUNC symols when building shared
library.
* elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.

ld/testsuite/

2012-01-06  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/12366
PR ld/12371
* ld-ifunc/ifunc-10-i386.s: Add more tests.
* ld-ifunc/ifunc-10-x86-64.s: Likewise.
* ld-ifunc/ifunc-11-i386.s: Likewise.
* ld-ifunc/ifunc-11-x86-64.s: Likewise.

* ld-ifunc/ifunc-12-i386.d: New.
* ld-ifunc/ifunc-12-i386.s: Likewise.
* ld-ifunc/ifunc-12-x86-64.d: Likewise.
* ld-ifunc/ifunc-12-x86-64.s: Likewise.
* ld-ifunc/ifunc-13-i386.d: Likewise.
* ld-ifunc/ifunc-13-x86-64.d: Likewise.
* ld-ifunc/ifunc-13a-i386.s: Likewise.
* ld-ifunc/ifunc-13a-x86-64.s: Likewise.
* ld-ifunc/ifunc-13b-i386.s: Likewise.
* ld-ifunc/ifunc-13b-x86-64.s: Likewise.
19 files changed:
bfd/ChangeLog
bfd/elf-ifunc.c
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/testsuite/ChangeLog
ld/testsuite/ld-ifunc/ifunc-10-i386.s
ld/testsuite/ld-ifunc/ifunc-10-x86-64.s
ld/testsuite/ld-ifunc/ifunc-11-i386.s
ld/testsuite/ld-ifunc/ifunc-11-x86-64.s
ld/testsuite/ld-ifunc/ifunc-12-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-12-i386.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-12-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-12-x86-64.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-13-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-13-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-13a-i386.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-13a-x86-64.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-13b-i386.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-13b-x86-64.s [new file with mode: 0644]