/* BFD back-end for National Semiconductor's CR16C ELF
- Copyright (C) 2004-2014 Free Software Foundation, Inc.
+ Copyright (C) 2004-2015 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
{
unsigned int r_type = ELF32_R_TYPE (dst->r_info);
- BFD_ASSERT (r_type < (unsigned int) RINDEX_16C_MAX);
+ if (r_type >= RINDEX_16C_MAX)
+ {
+ _bfd_error_handler (_("%B: invalid CR16C reloc number: %d"), abfd, r_type);
+ r_type = 0;
+ }
cache_ptr->howto = &elf_howto_table[r_type];
}