aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-x86.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-09-02 07:16:33 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-09-02 07:18:55 -0700
commit9ff114ca5d2c2753f1ac110f8586d0040c27a7a3 (patch)
treef5d17bbdf1bc70f396096e2bdc826dac90ad0b4e /bfd/elfxx-x86.c
parent503294e755498eb6545ca72b338c5037facab7f7 (diff)
downloadgdb-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.c')
-rw-r--r--bfd/elfxx-x86.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index fe5d211..6b7c119 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -278,6 +278,7 @@ _bfd_x86_elf_link_hash_table_create (bfd *abfd)
ret->r_info = elf64_r_info;
ret->r_sym = elf64_r_sym;
ret->sizeof_reloc = sizeof (Elf64_External_Rela);
+ ret->got_entry_size = 8;
ret->pointer_r_type = R_X86_64_64;
ret->dynamic_interpreter = ELF64_DYNAMIC_INTERPRETER;
ret->dynamic_interpreter_size = sizeof ELF64_DYNAMIC_INTERPRETER;
@@ -291,6 +292,7 @@ _bfd_x86_elf_link_hash_table_create (bfd *abfd)
if (bed->target_id == X86_64_ELF_DATA)
{
ret->sizeof_reloc = sizeof (Elf32_External_Rela);
+ ret->got_entry_size = 8;
ret->pointer_r_type = R_X86_64_32;
ret->dynamic_interpreter = ELFX32_DYNAMIC_INTERPRETER;
ret->dynamic_interpreter_size
@@ -300,6 +302,7 @@ _bfd_x86_elf_link_hash_table_create (bfd *abfd)
else
{
ret->sizeof_reloc = sizeof (Elf32_External_Rel);
+ ret->got_entry_size = 4;
ret->pointer_r_type = R_386_32;
ret->dynamic_interpreter = ELF32_DYNAMIC_INTERPRETER;
ret->dynamic_interpreter_size