]> oss.titaniummirror.com Git - msp430-binutils.git/blobdiff - bfd/elf32-v850.c
Imported binutils-2.20
[msp430-binutils.git] / bfd / elf32-v850.c
index a5bdc0c873406b42cc4efd20e382115b1fb8e5ac..922698f61a6c217cd5e0a81afe3caaeb68724519 100644 (file)
@@ -1,6 +1,6 @@
 /* V850-specific support for 32-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007 Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -52,7 +52,6 @@ v850_elf_check_relocs (bfd *abfd,
   struct elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
-  asection *sreloc;
   enum v850_reloc_type r_type;
   int other = 0;
   const char *common = NULL;
@@ -68,7 +67,6 @@ v850_elf_check_relocs (bfd *abfd,
   dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  sreloc = NULL;
 
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
@@ -116,7 +114,9 @@ v850_elf_check_relocs (bfd *abfd,
         /* This relocation describes which C++ vtable entries
           are actually used.  Record for later use during GC.  */
         case R_V850_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
 
@@ -1680,7 +1680,7 @@ v850_elf_relocate_section (bfd *output_bfd,
                name = bfd_section_name (input_bfd, sec);
            }
 
-         switch (r)
+         switch ((int) r)
            {
            case bfd_reloc_overflow:
              if (! ((*info->callbacks->reloc_overflow)
@@ -2095,7 +2095,7 @@ v850_elf_add_symbol_hook (bfd *abfd,
   return TRUE;
 }
 
-static bfd_boolean
+static int
 v850_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED,
                                  const char *name ATTRIBUTE_UNUSED,
                                  Elf_Internal_Sym *sym,
@@ -2122,7 +2122,7 @@ v850_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED,
   sym->st_other &= ~(V850_OTHER_SDA | V850_OTHER_ZDA | V850_OTHER_TDA
                     | V850_OTHER_ERROR);
 
-  return TRUE;
+  return 1;
 }
 
 static bfd_boolean