]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86: Add _bfd_x86_elf_link_hash_table_create
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 30 Aug 2017 16:10:08 +0000 (09:10 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 30 Aug 2017 16:10:24 +0000 (09:10 -0700)
commit765e526c75506a7d9644bc7c137ac1923fdb1369
tree0b715336c005aa362660a4902e6171788efee461
parent70e65ca8e5d1fc984d58f6137c290e807fe772a5
x86: Add _bfd_x86_elf_link_hash_table_create

Share _bfd_x86_elf_link_hash_table_create in elf32-i386.c and
elf64-x86-64.c by:

1. Replace elf_i386_lazy_plt_layout, elf_i386_non_lazy_plt_layout,
elf_i386_plt_layout, elf_x86_64_lazy_plt_layout,
elf_x86_64_non_lazy_plt_layout and elf_x86_64_plt_layout with
elf_x86_lazy_plt_layout, elf_x86_non_lazy_plt_layout and
elf_x86_plt_layout.
2. Move plt, lazy_plt, non_lazy_plt, srelplt2 and next_tls_desc_index
from elf_i386_link_hash_table to elf_x86_link_hash_table.
3. Remove elf_i386_link_hash_table and elf_x86_64_link_hash_table.

* elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
(elf_i386_lazy_plt_layout): Likewise.
(elf_i386_non_lazy_plt_layout): Likewise.
(elf_i386_plt_layout): Likewise.
(elf_i386_link_hash_table): Likewise.
(elf_i386_next_tls_desc_index): Likewise.
(elf_i386_srelplt2): Likewise.
(elf_i386_plt): Likewise.
(elf_i386_lazy_plt): Likewise.
(elf_i386_non_lazy_plt): Likewise.
(elf_i386_link_hash_table_create): Likewise.
(bfd_elf32_bfd_link_hash_table_create): Likewise.
(elf_i386_lazy_plt): Updated.
(elf_i386_non_lazy_plt): Likewise.
(elf_i386_lazy_ibt_plt): Likewise.
(elf_i386_non_lazy_ibt_plt): 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_get_synthetic_symtab): Likewise.
(elf_i386_link_setup_gnu_properties): Likewise.
(elf_i386_nacl_plt): Likewise.
* elf64-x86-64.c (ABI_64_P): Removed.
(ELF64_DYNAMIC_INTERPRETER): Likewise.
(ELF32_DYNAMIC_INTERPRETER): Likewise.
(elf_x86_64_lazy_plt_layout): Likewise.
(elf_x86_64_non_lazy_plt_layout): Likewise.
(elf_x86_64_plt_layout): Likewise.
(elf_x86_64_link_hash_table): Likewise.
(elf_x86_64_plt): Likewise.
(elf_x86_64_lazy_plt): Likewise.
(elf_x86_64_non_lazy_plt): Likewise.
(elf_x86_64_link_hash_table_create): Likewise.
(bfd_elf64_bfd_link_hash_table_create): Likewise.
(bfd_elf32_bfd_link_hash_table_create): Likewise.
(elf_x86_64_lazy_plt): Updated.
(elf_x86_64_non_lazy_plt): Likewise.
(elf_x86_64_lazy_bnd_plt): Likewise.
(elf_x86_64_non_lazy_bnd_plt): Likewise.
(elf_x86_64_lazy_ibt_plt): Likewise.
(elf_x32_lazy_ibt_plt): Likewise.
(elf_x86_64_non_lazy_ibt_plt): Likewise.
(elf_x32_non_lazy_ibt_plt): Likewise.
(elf_x86_64_allocate_dynrelocs): Likewise.
(elf_x86_64_size_dynamic_sections): Likewise.
(elf_x86_64_relocate_section): Likewise.
(elf_x86_64_finish_dynamic_symbol): Likewise.
(elf_x86_64_finish_dynamic_sections): Likewise.
(elf_x86_64_get_synthetic_symtab): Likewise.
(elf_x86_64_link_setup_gnu_properties): Likewise.
(elf_x86_64_nacl_plt): Likewise.
* elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
"elf/x86-64.h".
(ELF32_DYNAMIC_INTERPRETER): New.
(ELF64_DYNAMIC_INTERPRETER): Likewise.
(ELFX32_DYNAMIC_INTERPRETER): Likewise.
(_bfd_x86_elf_link_hash_table_create): Likewise.
(_bfd_x86_elf_link_hash_table_free): Renamed to ...
(elf_x86_link_hash_table_free): This.  Make it static.
* elfxx-x86.h: Don't include "objalloc.h".
(ABI_64_P): New.
(elf_x86_lazy_plt_layout): Likewise.
(elf_x86_non_lazy_plt_layout): Likewise.
(elf_x86_plt_layout): Likewise.
(_bfd_x86_elf_link_hash_table_create): Likewise.
(bfd_elf64_bfd_link_hash_table_create): Likewise.
(bfd_elf32_bfd_link_hash_table_create): Likewise.
(elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
srelplt2 and next_tls_desc_index.
(_bfd_x86_elf_link_hash_table_free): Removed.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
bfd/elfxx-x86.c
bfd/elfxx-x86.h