This is the mail archive of the binutils-cvs@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]

[binutils-gdb] PR23980, powerpc64 ld segfault


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=87469ba2d2fc953796c7bb64e535d3f283756048

commit 87469ba2d2fc953796c7bb64e535d3f283756048
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Dec 18 08:59:59 2018 +1030

    PR23980, powerpc64 ld segfault
    
    	PR 23980
    	* elf64-ppc.c (ppc64_elf_hide_symbol): Check hash table type
    	before referencing ppc64-only fields of hash entries.

Diff:
---
 bfd/ChangeLog   | 6 ++++++
 bfd/elf64-ppc.c | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9e5717e..f8e936f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2018-12-18  Alan Modra  <amodra@gmail.com>
+
+	PR 23980
+	* elf64-ppc.c (ppc64_elf_hide_symbol): Check hash table type
+	before referencing ppc64-only fields of hash entries.
+
 2018-12-17  Alan Modra  <amodra@gmail.com>
 
 	PR 23994
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index a2d3ea0..31a3edf 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -6193,6 +6193,9 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info,
   struct ppc_link_hash_entry *eh;
   _bfd_elf_link_hash_hide_symbol (info, h, force_local);
 
+  if (ppc_hash_table (info) == NULL)
+    return;
+
   eh = (struct ppc_link_hash_entry *) h;
   if (eh->is_func_descriptor)
     {


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