diff options
author | Alan Modra <amodra@gmail.com> | 2008-01-19 10:07:25 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-01-19 10:07:25 +0000 |
commit | 85f7a9cbe2b487f2e27a126161bdee27e77a05cf (patch) | |
tree | ed6d838e99ae5fbb27962df87828cdce5af5f6af /bfd/elf64-ppc.c | |
parent | 145f4ab500b18cd0d31e7bff54983ded2e45b0cf (diff) | |
download | gdb-85f7a9cbe2b487f2e27a126161bdee27e77a05cf.zip gdb-85f7a9cbe2b487f2e27a126161bdee27e77a05cf.tar.gz gdb-85f7a9cbe2b487f2e27a126161bdee27e77a05cf.tar.bz2 |
PR 5646
* elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
non-NULL before dereferencing.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 4 |
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; |