aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-06-08 04:24:04 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-06-08 04:30:56 -0700
commit9bcc30e4178baac8307a52841ea9fef5cda8846d (patch)
treeb55be2375cd10a5b9a55f5000458b730b8a3bed6 /bfd/elf-bfd.h
parentb37a7714400cdc264ed236f72668b8956477b2ed (diff)
downloadgdb-9bcc30e4178baac8307a52841ea9fef5cda8846d.zip
gdb-9bcc30e4178baac8307a52841ea9fef5cda8846d.tar.gz
gdb-9bcc30e4178baac8307a52841ea9fef5cda8846d.tar.bz2
ELF: Move tlsdesc_plt/tlsdesc_got to elf_link_hash_table
All ELF backends with TLS descriptor support have /* The offset into splt of the PLT entry for the TLS descriptor resolver. Special values are 0, if not necessary (or not found to be necessary yet), and -1 if needed but not determined yet. */ bfd_vma tlsdesc_plt; /* The GOT offset for the lazy trampoline. Communicated to the loader via DT_TLSDESC_GOT. The magic value (bfd_vma) -1 indicates an offset is not allocated. */ bfd_vma tlsdesc_got; in symbol hash entry. Move tlsdesc_plt/tlsdesc_got to elf_link_hash_entry to reduce code duplication. * elf-bfd.h (elf_link_hash_entry): Add tlsdesc_plt and tlsdesc_got. * elf32-arm.c (elf32_arm_link_hash_table): Remove tlsdesc_plt and dt_tlsdesc_got. (elf32_arm_size_dynamic_sections): Updated. Clear root.tlsdesc_plt for DF_BIND_NOW. (elf32_arm_finish_dynamic_sections): Updated. (elf32_arm_output_arch_local_syms): Likewise. * elf32-nds32.c (nds32_elf_size_dynamic_sections): Updated. Clear root.tlsdesc_plt for DF_BIND_NOW. (nds32_elf_finish_dynamic_sections): Updated. * elf32-nds32.h (elf_nds32_link_hash_table): Remove dt_tlsdesc_plt and dt_tlsdesc_got. * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Updated. * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove tlsdesc_plt and dt_tlsdesc_got. (elfNN_aarch64_allocate_dynrelocs): Updated. (elfNN_aarch64_finish_dynamic_sections): Likewise. (elfNN_aarch64_size_dynamic_sections): Updated. Clear root.tlsdesc_plt for DF_BIND_NOW. Don't check DF_BIND_NOW twice. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated. (_bfd_x86_elf_size_dynamic_sections): Likewise. (_bfd_x86_elf_finish_dynamic_sections): Likewise. * elfxx-x86.h (elf_x86_link_hash_table): Remove tlsdesc_plt and tlsdesc_got.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 3736ba6..0e31ed1 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -650,6 +650,17 @@ struct elf_link_hash_table
asection *tls_sec;
bfd_size_type tls_size; /* Bytes. */
+ /* The offset into splt of the PLT entry for the TLS descriptor
+ resolver. Special values are 0, if not necessary (or not found
+ to be necessary yet), and -1 if needed but not determined
+ yet. */
+ bfd_vma tlsdesc_plt;
+
+ /* The GOT offset for the lazy trampoline. Communicated to the
+ loader via DT_TLSDESC_GOT. The magic value (bfd_vma) -1
+ indicates an offset is not allocated. */
+ bfd_vma tlsdesc_got;
+
/* Target OS for linker output. */
enum elf_target_os target_os;