* bfd-in.h (_bfd_elf_tls_setup): Declare.
[deliverable/binutils-gdb.git] / bfd / elf64-x86-64.c
index 9c5a1ea5b95d2d38d19182777a01f1de6837b416..44e60e8997b56529326554311bf3e956e5e108cc 100644 (file)
@@ -1739,10 +1739,10 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 static bfd_vma
 dtpoff_base (struct bfd_link_info *info)
 {
-  /* If tls_segment is NULL, we should have signalled an error already.  */
-  if (elf_hash_table (info)->tls_segment == NULL)
+  /* If tls_sec is NULL, we should have signalled an error already.  */
+  if (elf_hash_table (info)->tls_sec == NULL)
     return 0;
-  return elf_hash_table (info)->tls_segment->start;
+  return elf_hash_table (info)->tls_sec->vma;
 }
 
 /* Return the relocation value for @tpoff relocation
@@ -1751,14 +1751,12 @@ dtpoff_base (struct bfd_link_info *info)
 static bfd_vma
 tpoff (struct bfd_link_info *info, bfd_vma address)
 {
-  struct elf_link_tls_segment *tls_segment
-    = elf_hash_table (info)->tls_segment;
+  struct elf_link_hash_table *htab = elf_hash_table (info);
 
   /* If tls_segment is NULL, we should have signalled an error already.  */
-  if (tls_segment == NULL)
+  if (htab->tls_sec == NULL)
     return 0;
-  return address - align_power (tls_segment->size, tls_segment->align)
-        - tls_segment->start;
+  return address - htab->tls_size - htab->tls_sec->vma;
 }
 
 /* Relocate an x86_64 ELF section.  */
This page took 0.024987 seconds and 4 git commands to generate.