aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 9c5a1ea..44e60e8 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -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. */