X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=bfd%2Felf32-v850.c;fp=bfd%2Felf32-v850.c;h=922698f61a6c217cd5e0a81afe3caaeb68724519;hp=a5bdc0c873406b42cc4efd20e382115b1fb8e5ac;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index a5bdc0c..922698f 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -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