opcodes/ChangeLog
[deliverable/binutils-gdb.git] / bfd / elf32-spu.c
index ae3ed10c4ed1b066d7f1d21f17c755abc201046c..28628f83adde7f43e1be1a8c9d715ecb1fce1004 100644 (file)
@@ -1,6 +1,7 @@
 /* SPU specific support for 32-bit ELF
 
-   Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -1425,7 +1426,7 @@ build_stub (struct bfd_link_info *info,
        add = (int) irela->r_addend & 0xffffffff;
       if (add != 0)
        len += 1 + 8;
-      name = bfd_malloc (len);
+      name = bfd_malloc (len + 1);
       if (name == NULL)
        return FALSE;
 
@@ -4895,9 +4896,9 @@ spu_elf_relocate_section (bfd *output_bfd,
          sym_name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
-                                        rel, relend, howto, contents);
+                                        rel, 1, relend, howto, 0, contents);
 
       if (info->relocatable)
        continue;
@@ -5000,7 +5001,9 @@ spu_elf_relocate_section (bfd *output_bfd,
       else if (is_ea_sym)
        unresolved_reloc = TRUE;
 
-      if (unresolved_reloc)
+      if (unresolved_reloc
+         && _bfd_elf_section_offset (output_bfd, info, input_section,
+                                     rel->r_offset) != (bfd_vma) -1)
        {
          (*_bfd_error_handler)
            (_("%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"),
This page took 0.02434 seconds and 4 git commands to generate.