x86: Add _bfd_x86_elf_get_synthetic_symtab
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 30 Aug 2017 19:27:17 +0000 (12:27 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 30 Aug 2017 19:27:30 +0000 (12:27 -0700)
commitf493882dab762fb49ecb8685c18a85edfab5e6d3
treed2bcf2441d2f01f84d4f5199e92b7db708cc8ceb
parent5b86dbf4549af98c4428da4764182e03f22c58ab
x86: Add _bfd_x86_elf_get_synthetic_symtab

Move the common codes in elf_i386_get_synthetic_symtab and
elf_x86_64_get_synthetic_symtab to _bfd_x86_elf_get_synthetic_symtab.

* elf32-i386.c (elf_i386_plt_type): Removed.
(elf_i386_plt): Likewise.
(elf_i386_get_synthetic_symtab): Updated.   Call
_bfd_x86_elf_get_synthetic_symtab.
* elf64-x86-64.c (elf_x86_64_plt_type): Removed.
(elf_x86_64_plt): Likewise.
(elf_x86_64_get_synthetic_symtab): Updated.  Call
_bfd_x86_elf_get_synthetic_symtab.
* elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
(elf_x86_64_get_plt_got_vma): Likewise.
(elf_i386_valid_plt_reloc_p): Likewise.
(elf_x86_64_valid_plt_reloc_p): Likewise.
(_bfd_x86_elf_get_synthetic_symtab): Likewise.
* elfxx-x86.h (elf_x86_plt_type): New.
(elf_x86_plt): Likewise.
(_bfd_x86_elf_get_synthetic_symtab): Likewise.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
bfd/elfxx-x86.c
bfd/elfxx-x86.h