diff options
author | Alan Modra <amodra@gmail.com> | 2016-08-02 23:28:47 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-08-02 23:39:09 +0930 |
commit | 89d77b8a520602832516ce6628ea930b4f0ccff4 (patch) | |
tree | fe47595b2e5badc9a3e14f6b5bafef7a09472f5f /bfd/elf64-ppc.c | |
parent | fa3fcee7b8c73070306ec358e730d1dfcac246bf (diff) | |
download | gdb-89d77b8a520602832516ce6628ea930b4f0ccff4.zip gdb-89d77b8a520602832516ce6628ea930b4f0ccff4.tar.gz gdb-89d77b8a520602832516ce6628ea930b4f0ccff4.tar.bz2 |
PowerPC64 ld segfault with code in non-executable sections
PR ld/20428
* elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 34d4635..f40b35a 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -4505,6 +4505,8 @@ ppc_get_stub_entry (const asection *input_section, more than one stub used to reach say, printf, and we need to distinguish between them. */ group = htab->sec_info[input_section->id].u.group; + if (group == NULL) + return NULL; if (h != NULL && h->u.stub_cache != NULL && h->u.stub_cache->h == h |