Have info_to_howto functions return a success/fail status. Check this result. Stop...
[deliverable/binutils-gdb.git] / bfd / elf32-m68hc11.c
index 4c57fe8235477f6a9b6df1023472c7d0b3de738c..95d271f65aa0fce3a0362933971e7414829b3418 100644 (file)
@@ -32,7 +32,7 @@
 /* Relocation functions.  */
 static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
   (bfd *, bfd_reloc_code_real_type);
-static void m68hc11_info_to_howto_rel
+static bfd_boolean m68hc11_info_to_howto_rel
   (bfd *, arelent *, Elf_Internal_Rela *);
 
 /* Trampoline generation.  */
@@ -377,7 +377,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 
 /* Set the howto pointer for an M68HC11 ELF reloc.  */
 
-static void
+static bfd_boolean
 m68hc11_info_to_howto_rel (bfd *abfd,
                           arelent *cache_ptr, Elf_Internal_Rela *dst)
 {
@@ -389,9 +389,11 @@ m68hc11_info_to_howto_rel (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 = &elf_m68hc11_howto_table[r_type];
+  return TRUE;
 }
 
 \f
@@ -1297,7 +1299,7 @@ static const struct bfd_elf_special_section elf32_m68hc11_special_sections[] =
 #define TARGET_BIG_SYM         m68hc11_elf32_vec
 #define TARGET_BIG_NAME                "elf32-m68hc11"
 
-#define elf_info_to_howto      0
+#define elf_info_to_howto      NULL
 #define elf_info_to_howto_rel  m68hc11_info_to_howto_rel
 #define bfd_elf32_bfd_relax_section  m68hc11_elf_relax_section
 #define elf_backend_check_relocs     elf32_m68hc11_check_relocs
This page took 0.024948 seconds and 4 git commands to generate.