This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]