]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elf32-mep.c
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / bfd / elf32-mep.c
index 2d6ebb69450394a4a432995adc638d7e5fbae189..414e6f394b7b8615e658751c4b1302b5c401ae75 100644 (file)
@@ -1,5 +1,5 @@
 /* MeP-specific support for 32-bit ELF.
-   Copyright (C) 2001-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2019 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -30,7 +30,7 @@
 /* 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
@@ -375,11 +375,10 @@ mep_final_link_relocate
 \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;
 
@@ -387,10 +386,13 @@ mep_info_to_howto_rela
   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.