This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fix ppc64le S-record test fail
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 19 May 2016 14:05:42 +0930
- Subject: Fix ppc64le S-record test fail
- Authentication-results: sourceware.org; auth=none
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/elf64-ppc.c b/bfd/elf64-ppc.c
index 95d98eb..4f610d2 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;
--
Alan Modra
Australia Development Lab, IBM