This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PowerPC64 PR5646
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Sat, 19 Jan 2008 20:36:39 +1030
- Subject: PowerPC64 PR5646
I must have only tested this with an old glibc. :-(
PR 5646
* elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
non-NULL before dereferencing.
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.273
diff -u -p -r1.273 elf64-ppc.c
--- bfd/elf64-ppc.c 15 Jan 2008 07:25:49 -0000 1.273
+++ bfd/elf64-ppc.c 19 Jan 2008 05:01:23 -0000
@@ -7074,7 +7074,7 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIB
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 ATTRIB
}
}
- 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;
--
Alan Modra
Australia Development Lab, IBM