RISC-V: Pc-rel to gp-rel relaxation function cleanup.
[deliverable/binutils-gdb.git] / bfd / elf32-moxie.c
index 579aae26e93d437f349a86fd6fb2f54518b254a4..d8b549de248310fe59ddcf9aa7a614550c008d36 100644 (file)
@@ -123,8 +123,8 @@ moxie_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
 
 /* Set the howto pointer for an MOXIE ELF reloc.  */
 
-static void
-moxie_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+static bfd_boolean
+moxie_info_to_howto_rela (bfd *abfd,
                          arelent *cache_ptr,
                          Elf_Internal_Rela *dst)
 {
@@ -134,10 +134,13 @@ moxie_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
   if (r_type >= (unsigned int) R_MOXIE_max)
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%pB: invalid Moxie 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 = & moxie_elf_howto_table [r_type];
+  return TRUE;
 }
 \f
 /* Perform a single relocation.  By default we use the standard BFD
This page took 0.041435 seconds and 4 git commands to generate.