diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-09-02 07:16:33 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-09-02 07:18:55 -0700 |
commit | 9ff114ca5d2c2753f1ac110f8586d0040c27a7a3 (patch) | |
tree | f5d17bbdf1bc70f396096e2bdc826dac90ad0b4e /bfd/elfxx-x86.h | |
parent | 503294e755498eb6545ca72b338c5037facab7f7 (diff) | |
download | gdb-9ff114ca5d2c2753f1ac110f8586d0040c27a7a3.zip gdb-9ff114ca5d2c2753f1ac110f8586d0040c27a7a3.tar.gz gdb-9ff114ca5d2c2753f1ac110f8586d0040c27a7a3.tar.bz2 |
x86: Add elf_x86_compute_jump_table_size
Share elf_x86_compute_jump_table_size in elf32-i386.c and
elf64-x86-64.c.
* elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
(elf_i386_allocate_dynrelocs): Replace
elf_i386_compute_jump_table_size with
elf_x86_compute_jump_table_size.
(elf_i386_size_dynamic_sections): Likewise.
* elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
(elf_x86_64_allocate_dynrelocs): Replace
elf_x86_64_compute_jump_table_size with
elf_x86_compute_jump_table_size.
(elf_x86_64_size_dynamic_sections): Likewise.
* elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
got_entry_size.
* elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
(elf_x86_compute_jump_table_size): New.
Diffstat (limited to 'bfd/elfxx-x86.h')
-rw-r--r-- | bfd/elfxx-x86.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h index 0c80ca4..a95b5c6 100644 --- a/bfd/elfxx-x86.h +++ b/bfd/elfxx-x86.h @@ -314,6 +314,7 @@ struct elf_x86_link_hash_table bfd_vma (*r_info) (bfd_vma, bfd_vma); bfd_vma (*r_sym) (bfd_vma); unsigned int sizeof_reloc; + unsigned int got_entry_size; unsigned int pointer_r_type; int dynamic_interpreter_size; const char *dynamic_interpreter; @@ -382,6 +383,9 @@ struct elf_x86_plt #define elf_x86_local_tlsdesc_gotent(abfd) \ (elf_x86_tdata (abfd)->local_tlsdesc_gotent) +#define elf_x86_compute_jump_table_size(htab) \ + ((htab)->elf.srelplt->reloc_count * (htab)->got_entry_size) + extern bfd_boolean _bfd_x86_elf_mkobject (bfd *); |