/* MeP-specific support for 32-bit ELF.
- Copyright (C) 2001-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2020 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
/* Private relocation functions. */
\f
#define MEPREL(type, size, bits, right, left, pcrel, overflow, mask) \
- {(unsigned)type, right, size, bits, pcrel, left, overflow, bfd_elf_generic_reloc, #type, FALSE, 0, mask, 0 }
+ HOWTO (type, right, size, bits, pcrel, left, overflow, bfd_elf_generic_reloc, #type, FALSE, 0, mask, 0)
#define N complain_overflow_dont
#define S complain_overflow_signed
\f
/* Set the howto pointer for a MEP ELF reloc. */
-static void
-mep_info_to_howto_rela
- (bfd * abfd ATTRIBUTE_UNUSED,
- arelent * cache_ptr,
- Elf_Internal_Rela * dst)
+static bfd_boolean
+mep_info_to_howto_rela (bfd * abfd,
+ arelent * cache_ptr,
+ Elf_Internal_Rela * dst)
{
unsigned int r_type;
if (r_type >= R_MEP_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: invalid MEP reloc number: %d"), abfd, r_type);
- r_type = 0;
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
}
cache_ptr->howto = & mep_elf_howto_table [r_type];
+ return TRUE;
}
\f
/* Relocate a MEP ELF section.
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
- name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
+ name = name == NULL ? bfd_section_name (sec) : name;
}
else
{
}
static bfd_boolean
-mep_elf_section_flags (flagword * flags, const Elf_Internal_Shdr * hdr)
+mep_elf_section_flags (const Elf_Internal_Shdr *hdr)
{
if (hdr->sh_flags & SHF_MEP_VLIW)
- * flags |= SEC_MEP_VLIW;
+ hdr->bfd_section->flags |= SEC_MEP_VLIW;
return TRUE;
}