/* FR30-specific support for 32-bit ELF.
- Copyright (C) 1998-2014 Free Software Foundation, Inc.
+ Copyright (C) 1998-2016 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
/* 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 */
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];
unsigned int r_type;
r_type = ELF32_R_TYPE (dst->r_info);
- BFD_ASSERT (r_type < (unsigned int) R_FR30_max);
+ if (r_type >= (unsigned int) R_FR30_max)
+ {
+ _bfd_error_handler (_("%B: invalid FR30 reloc number: %d"), abfd, r_type);
+ r_type = 0;
+ }
cache_ptr->howto = & fr30_elf_howto_table [r_type];
}
\f
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,
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;
#define ELF_MACHINE_ALT1 EM_CYGNUS_FR30
#define ELF_MAXPAGESIZE 0x1000
-#define TARGET_BIG_SYM bfd_elf32_fr30_vec
+#define TARGET_BIG_SYM fr30_elf32_vec
#define TARGET_BIG_NAME "elf32-fr30"
#define elf_info_to_howto_rel NULL