This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PowerPC64 ld segfault with branch in non-executable sections
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 2 Aug 2016 23:53:44 +0930
- Subject: PowerPC64 ld segfault with branch in non-executable sections
- Authentication-results: sourceware.org; auth=none
Applied.
PR ld/20428
* elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group.
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
--
Alan Modra
Australia Development Lab, IBM