From 87469ba2d2fc953796c7bb64e535d3f283756048 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 18 Dec 2018 08:59:59 +1030 Subject: [PATCH] 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. --- 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 + + 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 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) { -- 2.7.4