]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PowerPC64 ld segfault with code in non-executable sections
authorAlan Modra <amodra@gmail.com>
Tue, 2 Aug 2016 13:58:47 +0000 (23:28 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 3 Aug 2016 05:47:27 +0000 (15:17 +0930)
PR ld/20428
* elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group.

bfd/ChangeLog
bfd/elf64-ppc.c

index 7619ab9c680a1f9deb9753648d30aaf6917432b2..5b84a0b1437b96b334cef5431ea0cbca26ba74ae 100644 (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-06-29  Tristan Gingold  <gingold@adacore.com>
 
        * version.m4: Bump version to 2.26.2
index aa6fe08c8268386db345ae4db36a21a78ae857a0..2b2b9d18e80b2ec8fc82b6027dca5b2c14434857 100644 (file)
@@ -4504,6 +4504,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