aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index a41269c..026c52e 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -7074,7 +7074,7 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
break;
}
- if (expecting_tls_get_addr)
+ if (expecting_tls_get_addr && htab->tls_get_addr != NULL)
{
struct plt_entry *ent;
for (ent = htab->tls_get_addr->elf.plt.plist;
@@ -7091,7 +7091,7 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
}
}
- if (expecting_tls_get_addr)
+ if (expecting_tls_get_addr && htab->tls_get_addr_fd != NULL)
{
struct plt_entry *ent;
for (ent = htab->tls_get_addr_fd->elf.plt.plist;