Fix ppc64le S-record test fail
authorAlan Modra <amodra@gmail.com>
Thu, 19 May 2016 03:02:40 +0000 (12:32 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 19 May 2016 04:10:12 +0000 (13:40 +0930)
Segfaults on --defsym symbol (__stack_chk_fail in this instance).

* elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
before dereferencing.

bfd/ChangeLog
bfd/elf64-ppc.c

index dac73e77f702da5afc68dc080603976df9c9fad8..b475a139078499a3840509880e0b67ab9e70276c 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-19  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
+       before dereferencing.
+
 2016-05-18  Nick Clifton  <nickc@redhat.com>
 
        * po/sv.po: Updated Swedish translation.
index 95d98eb49c1afd58b9fc96f9b870942fda8aa6eb..4f610d2308d336b6d796cfa46b43d5195e3229e1 100644 (file)
@@ -2570,6 +2570,7 @@ ppc64_elf_branch_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
       elf_symbol_type *elfsym = (elf_symbol_type *) symbol;
 
       if (symbol->section->owner != abfd
+         && symbol->section->owner != NULL
          && abiversion (symbol->section->owner) >= 2)
        {
          unsigned int i;
This page took 0.032367 seconds and 4 git commands to generate.