aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-12-18 08:59:59 +1030
committerAlan Modra <amodra@gmail.com>2018-12-18 09:03:45 +1030
commit87469ba2d2fc953796c7bb64e535d3f283756048 (patch)
tree817ffebe0e273928629c3e7044e6e5c0ca9f0151 /bfd/elf64-ppc.c
parent51b4f73a37c2e7eec31e932fc3c8dae879735f63 (diff)
downloadgdb-87469ba2d2fc953796c7bb64e535d3f283756048.zip
gdb-87469ba2d2fc953796c7bb64e535d3f283756048.tar.gz
gdb-87469ba2d2fc953796c7bb64e535d3f283756048.tar.bz2
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.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c3
1 files changed, 3 insertions, 0 deletions
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)
{