X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf32-fr30.c;h=94070d8ef266ba97ca40ddc51b021ff02aeb798b;hb=f42f1a1d6ca0cc84e43d7f2b85044a2565ca00f2;hp=9acf1e8a7673d4e7c4f6402f829192755f539015;hpb=5860e3f883597cf6b8a937547015394edc1e8784;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c index 9acf1e8a76..94070d8ef2 100644 --- a/bfd/elf32-fr30.c +++ b/bfd/elf32-fr30.c @@ -1,5 +1,5 @@ /* FR30-specific support for 32-bit ELF. - Copyright (C) 1998-2014 Free Software Foundation, Inc. + Copyright (C) 1998-2017 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -37,11 +37,11 @@ static reloc_howto_type fr30_elf_howto_table [] = /* This reloc does nothing. */ HOWTO (R_FR30_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FR30_NONE", /* name */ FALSE, /* partial_inplace */ @@ -343,7 +343,7 @@ fr30_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, unsigned int i; for (i = sizeof (fr30_reloc_map) / sizeof (fr30_reloc_map[0]); - --i;) + i--;) if (fr30_reloc_map [i].bfd_reloc_val == code) return & fr30_elf_howto_table [fr30_reloc_map[i].fr30_reloc_val]; @@ -377,7 +377,8 @@ fr30_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, r_type = ELF32_R_TYPE (dst->r_info); if (r_type >= (unsigned int) R_FR30_max) { - _bfd_error_handler (_("%A: invalid FR30 reloc number: %d"), abfd, r_type); + /* xgettext:c-format */ + _bfd_error_handler (_("%B: invalid FR30 reloc number: %d"), abfd, r_type); r_type = 0; } cache_ptr->howto = & fr30_elf_howto_table [r_type]; @@ -563,7 +564,7 @@ fr30_elf_relocate_section (bfd *output_bfd, RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, rel, 1, relend, howto, 0, contents); - if (info->relocatable) + if (bfd_link_relocatable (info)) continue; r = fr30_final_link_relocate (howto, input_bfd, input_section, @@ -576,15 +577,14 @@ fr30_elf_relocate_section (bfd *output_bfd, switch (r) { case bfd_reloc_overflow: - r = info->callbacks->reloc_overflow + (*info->callbacks->reloc_overflow) (info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0, input_bfd, input_section, rel->r_offset); break; case bfd_reloc_undefined: - r = info->callbacks->undefined_symbol - (info, name, input_bfd, input_section, rel->r_offset, - TRUE); + (*info->callbacks->undefined_symbol) + (info, name, input_bfd, input_section, rel->r_offset, TRUE); break; case bfd_reloc_outofrange: @@ -605,11 +605,8 @@ fr30_elf_relocate_section (bfd *output_bfd, } if (msg) - r = info->callbacks->warning - (info, msg, name, input_bfd, input_section, rel->r_offset); - - if (! r) - return FALSE; + (*info->callbacks->warning) (info, msg, name, input_bfd, + input_section, rel->r_offset); } } @@ -652,7 +649,7 @@ fr30_elf_check_relocs (bfd *abfd, const Elf_Internal_Rela *rel; const Elf_Internal_Rela *rel_end; - if (info->relocatable) + if (bfd_link_relocatable (info)) return TRUE; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -676,7 +673,7 @@ fr30_elf_check_relocs (bfd *abfd, /* PR15323, ref flags aren't set for references in the same object. */ - h->root.non_ir_ref = 1; + h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info))