correct ft32 reloc range test
[deliverable/binutils-gdb.git] / bfd / elf32-fr30.c
index 679322a6e8ec9503c6f0b7c01ce904fd2de84547..7b0fc88ce7093d529ee7674e3910fea7ba9753e2 100644 (file)
@@ -367,7 +367,7 @@ fr30_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
 
 /* Set the howto pointer for an FR30 ELF reloc.  */
 
-static void
+static bfd_boolean
 fr30_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
                         arelent *cache_ptr,
                         Elf_Internal_Rela *dst)
@@ -378,10 +378,13 @@ fr30_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
   if (r_type >= (unsigned int) R_FR30_max)
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B: invalid FR30 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 = & fr30_elf_howto_table [r_type];
+  return TRUE;
 }
 \f
 /* Perform a single relocation.  By default we use the standard BFD
This page took 0.022802 seconds and 4 git commands to generate.