This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
fix spu-ld segfault
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Thu, 12 Apr 2007 17:18:30 +0930
- Subject: fix spu-ld segfault
Fixes a segfault when processing absolute symbols.
* elf32-spu.c (needs_ovl_stub): Test that spu_elf_section_data
is non-NULL before dereferencing.
Index: bfd/elf32-spu.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-spu.c,v
retrieving revision 1.10
diff -u -p -r1.10 elf32-spu.c
--- bfd/elf32-spu.c 5 Apr 2007 07:01:52 -0000 1.10
+++ bfd/elf32-spu.c 12 Apr 2007 07:13:12 -0000
@@ -704,7 +704,8 @@ needs_ovl_stub (const char *sym_name,
return FALSE;
if (sym_sec == NULL
- || sym_sec->output_section == NULL)
+ || sym_sec->output_section == NULL
+ || spu_elf_section_data (sym_sec->output_section) == NULL)
return FALSE;
/* setjmp always goes via an overlay stub, because then the return
--
Alan Modra
IBM OzLabs - Linux Technology Centre