/* Infineon XC16X-specific support for 16-bit ELF.
- Copyright (C) 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 Free Software Foundation, Inc.
Contributed by KPIT Cummins Infosystems
This file is part of BFD, the Binary File Descriptor library.
{
unsigned int i;
- for (i = 0;
- i < sizeof (xc16x_elf_howto_table) / sizeof (xc16x_elf_howto_table[0]);
- i++)
+ for (i = 0; i < ARRAY_SIZE (xc16x_elf_howto_table); i++)
if (xc16x_elf_howto_table[i].name != NULL
&& strcasecmp (xc16x_elf_howto_table[i].name, r_name) == 0)
return &xc16x_elf_howto_table[i];
/* For a particular operand this function is
called to finalise the type of relocation. */
-static void
-elf32_xc16x_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc,
+static bfd_boolean
+elf32_xc16x_info_to_howto (bfd *abfd, arelent *bfd_reloc,
Elf_Internal_Rela *elf_reloc)
{
unsigned int r;
if (xc16x_elf_howto_table[i].type == r)
{
bfd_reloc->howto = &xc16x_elf_howto_table[i];
- return;
+ return TRUE;
}
- abort ();
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
}
static bfd_reloc_status_type