/* MIPS-specific support for 32-bit ELF
- Copyright (C) 1993-2015 Free Software Foundation, Inc.
+ Copyright (C) 1993-2016 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
/* No relocation. */
HOWTO (R_MIPS_NONE, /* type */
0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 3, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
else
return &elf_mips16_howto_table_rel[r_type - R_MIPS16_min];
}
- BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
+ if (r_type >= R_MIPS_max)
+ {
+ (*_bfd_error_handler) (_("unrecognised MIPS reloc number: %d"), r_type);
+ bfd_set_error (bfd_error_bad_value);
+ r_type = R_MIPS_NONE;
+ }
if (rela_p)
return &elf_mips_howto_table_rela[r_type];
else