diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-08-30 12:27:17 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-08-30 12:27:30 -0700 |
commit | f493882dab762fb49ecb8685c18a85edfab5e6d3 (patch) | |
tree | d2bcf2441d2f01f84d4f5199e92b7db708cc8ceb /bfd/elfxx-x86.h | |
parent | 5b86dbf4549af98c4428da4764182e03f22c58ab (diff) | |
download | fsf-binutils-gdb-f493882dab762fb49ecb8685c18a85edfab5e6d3.zip fsf-binutils-gdb-f493882dab762fb49ecb8685c18a85edfab5e6d3.tar.gz fsf-binutils-gdb-f493882dab762fb49ecb8685c18a85edfab5e6d3.tar.bz2 |
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.
Diffstat (limited to 'bfd/elfxx-x86.h')
-rw-r--r-- | bfd/elfxx-x86.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h index 21e16a2..45f2458 100644 --- a/bfd/elfxx-x86.h +++ b/bfd/elfxx-x86.h @@ -315,6 +315,27 @@ struct elf_x86_obj_tdata bfd_vma *local_tlsdesc_gotent; }; +enum elf_x86_plt_type +{ + plt_non_lazy = 0, + plt_lazy = 1 << 0, + plt_pic = 1 << 1, + plt_second = 1 << 2, + plt_unknown = -1 +}; + +struct elf_x86_plt +{ + const char *name; + asection *sec; + bfd_byte *contents; + enum elf_x86_plt_type type; + unsigned int plt_got_offset; + unsigned int plt_entry_size; + unsigned int plt_got_insn_size; /* Only used for x86-64. */ + long count; +}; + #define elf_x86_tdata(abfd) \ ((struct elf_x86_obj_tdata *) (abfd)->tdata.any) @@ -372,6 +393,10 @@ extern bfd_boolean _bfd_x86_elf_fixup_symbol extern bfd_boolean _bfd_x86_elf_hash_symbol (struct elf_link_hash_entry *); +extern long _bfd_x86_elf_get_synthetic_symtab + (bfd *, long, long, bfd_vma, struct elf_x86_plt [], asymbol **, + asymbol **); + extern enum elf_property_kind _bfd_x86_elf_parse_gnu_properties (bfd *, unsigned int, bfd_byte *, unsigned int); |