Have info_to_howto functions return a success/fail status. Check this result. Stop...
[deliverable/binutils-gdb.git] / bfd / elf32-mep.c
index e03fe5045e7e29d9289f8eb05b2d2f5403d2e505..5224d9abfa0050393a9db1ed6abf740baa142edf 100644 (file)
@@ -375,10 +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,
-                       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;
 
@@ -388,9 +388,11 @@ mep_info_to_howto_rela (bfd *abfd,
       /* xgettext:c-format */
       _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
                          abfd, r_type);
-      r_type = 0;
+      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.
This page took 0.023649 seconds and 4 git commands to generate.