Support garbage collection against STT_GNU_IFUNC symbols.
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 13 Jul 2010 16:59:14 +0000 (16:59 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 13 Jul 2010 16:59:14 +0000 (16:59 +0000)
commitbb1cb422aef79013990a3331f837a8dd24d71165
treefeeacaf154cf0e24afcea5451d49e3b400bf94a9
parent9aa1f1e33995b48c94b8d6833d071751aa02f751
Support garbage collection against STT_GNU_IFUNC symbols.

bfd/

2010-07-13  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/11791
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Support
garbage collection against STT_GNU_IFUNC symbols.

* elf32-i386.c (elf_i386_get_local_sym_hash): Don't set
elf.plt.offset/elf.got.offset to -1.
(elf_i386_tls_transition): Skip TLS transition for functions.
(elf_i386_gc_sweep_hook): Support STT_GNU_IFUNC symbols.

* elf64-x86-64.c (elf64_x86_64_get_local_sym_hash): Don't set
elf.plt.offset/elf.got.offset to -1.
(elf64_x86_64_tls_transition): Skip TLS transition for functions.
(elf64_x86_64_gc_sweep_hook): Support STT_GNU_IFUNC symbols.

ld/testsuite/

2010-07-13  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/11791
* ld-ifunc/ifunc-10-i386.d: New.
* ld-ifunc/ifunc-10-i386.s: Likewise.
* ld-ifunc/ifunc-10-x86-64.d: Likewise.
* ld-ifunc/ifunc-10-x86-64.s: Likewise.
* ld-ifunc/ifunc-11-i386.d: Likewise.
* ld-ifunc/ifunc-11-i386.s: Likewise.
* ld-ifunc/ifunc-11-x86-64.d: Likewise.
* ld-ifunc/ifunc-11-x86-64.s: Likewise.
13 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.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-10-i386.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-10-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-10-x86-64.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-11-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-11-i386.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-11-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-11-x86-64.s [new file with mode: 0644]