From: Alan Modra Date: Tue, 28 Jun 2016 11:16:31 +0000 (+0930) Subject: Fix ppc64le S-record test fail X-Git-Tag: binutils-2_26_1~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a01d012a5d3ed82cbe83b521298197e6ba59b590;p=thirdparty%2Fbinutils-gdb.git Fix ppc64le S-record test fail Segfaults on --defsym symbol (__stack_chk_fail in this instance). * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner before dereferencing. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f88580c5ea8..5430f0da8a8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2016-06-28 Alan Modra + + Apply from master + 2016-05-19 Alan Modra + * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner + before dereferencing. + 2016-06-28 Alan Modra PR ld/19264 diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 8c6a14b7308..aa6fe08c826 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -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;