* elf32-spu.c (needs_ovl_stub): Test that spu_elf_section_data
authorAlan Modra <amodra@gmail.com>
Thu, 12 Apr 2007 07:47:13 +0000 (07:47 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 12 Apr 2007 07:47:13 +0000 (07:47 +0000)
is non-NULL before dereferencing.

bfd/ChangeLog
bfd/elf32-spu.c

index 45269778a7b52e1d4174a23015fcf40c48415bff..26a6f4db0ce9f8face6d0753f90870a882386245 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-12  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-spu.c (needs_ovl_stub): Test that spu_elf_section_data
+       is non-NULL before dereferencing.
+
 2007-04-11  Nathan Sidwell  <nathan@codesourcery.com>
 
        * elf-vxworks.c (elf_vxworks_emit_relocs): Remap weakdef PLT slot
index fac414e85cd7520f945979915aedb05e2d71292e..df0b68ae22d149c7edbfbfe6887b40c77830e4ab 100644 (file)
@@ -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