From: Alan Modra Date: Mon, 17 Dec 2018 22:29:59 +0000 (+1030) Subject: PR23980, powerpc64 ld segfault X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87469ba2d2fc953796c7bb64e535d3f283756048;p=binutils-gdb.git 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 --git a/bfd/ChangeLog b/bfd/ChangeLog index 9e5717e89fb..f8e936f92b8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2018-12-18 Alan Modra + + 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 PR 23994 diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index a2d3ea067c3..31a3edfdae7 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) {