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.
This commit is contained in:
Alan Modra 2016-08-02 23:28:47 +09:30
parent fa3fcee7b8
commit 89d77b8a52
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2016-08-02 Alan Modra <amodra@gmail.com>
PR ld/20428
* elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group.
2016-08-02 Nick Clifton <nickc@redhat.com>
PR ld/17739

View File

@ -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