aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-ifunc.c
AgeCommit message (Collapse)AuthorFilesLines
2011-01-07Optimize _bfd_elf_allocate_ifunc_dyn_relocs.H.J. Lu1-18/+24
2011-01-06 H.J. Lu <hongjiu.lu@intel.com> * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
2011-01-06Handle STT_GNU_IFUNC symols when building shared library.H.J. Lu1-4/+23
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.
2010-07-13Support garbage collection against STT_GNU_IFUNC symbols.H.J. Lu1-0/+9
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.
2009-08-032009-08-03 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-3/+4
PR ld/10433 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got to htab->init_got_offset and plt to htab->init_plt_offset when discarding space for dynamic relocations.
2009-06-182009-06-17 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-0/+182
* elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New. * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise. * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it. * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise. 2009-06-17 H.J. Lu <hongjiu.lu@intel.com> * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New. * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise. * elf32-i386.c (elf_i386_check_relocs): Use it. * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise. 2009-06-17 H.J. Lu <hongjiu.lu@intel.com> * elf-bfd.h (elf_dyn_relocs): New. * elf32-i386.c (elf_i386_dyn_relocs): Removed. (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with elf_dyn_relocs. (elf_i386_copy_indirect_symbol): Likewise. (elf_i386_check_relocs): Likewise. (elf_i386_gc_sweep_hook): Likewise. (elf_i386_allocate_dynrelocs): Likewise. (elf_i386_readonly_dynrelocs): Likewise. (elf_i386_size_dynamic_sections): Likewise. * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed. (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs with elf_dyn_relocs. (elf64_x86_64_copy_indirect_symbol): Updated. (elf64_x86_64_check_relocs): Likewise. (elf64_x86_64_gc_sweep_hook): Likewise. (elf64_x86_64_adjust_dynamic_symbol): Likewise. (elf64_x86_64_allocate_dynrelocs): Likewise. (elf64_x86_64_readonly_dynrelocs): Likewise. (elf64_x86_64_size_dynamic_sections): Likewise.
2009-06-162009-06-16 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-0/+105
* configure.in (elf): Add elf-ifunc.lo. * configure: Regenerated. * Makefile.in: Likewise. * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc. * elf32-i386.c (elf_i386_link_hash_table): Remove sgot, sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc. (elf_i386_link_hash_table_create): Likewise. (elf_i386_create_dynamic_sections): Likewise. (elf_i386_check_relocs): Likewise. (elf_i386_allocate_dynrelocs): Likewise. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_finish_dynamic_symbol): Likewise. (elf_i386_finish_dynamic_sections): Likewise. (elf_i386_create_got_section): Removed. * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot, sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc. (elf64_x86_64_compute_jump_table_size): Updated. (elf64_x86_64_link_hash_table_create): Likewise. (elf64_x86_64_create_dynamic_sections): Likewise. (elf64_x86_64_check_relocs): Likewise. (elf64_x86_64_allocate_dynrelocs): Likewise. (elf64_x86_64_size_dynamic_sections): Likewise. (elf64_x86_64_relocate_section): Likewise. (elf64_x86_64_finish_dynamic_symbol): Likewise. (elf64_x86_64_finish_dynamic_sections): Likewise. (elf64_x86_64_create_got_section): Removed. * elflink.c (_bfd_elf_create_got_section): Use log_file_align for pointer alignment. Set up section pointers. (_bfd_elf_create_dynamic_sections): Likewise. (_bfd_elf_create_ifunc_sections): Moved to ... * elf-ifunc.c: Here. New. * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo. (BFD32_BACKENDS_CFILES): Add elf-ifunc.c. Run "make dep-am".