gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / bfd / elf32-d30v.c
index d78221652d7becb0ad4b267fe4623508382a4a4f..0a6e057411bfdffa595d2eaba81037b60879b388 100644 (file)
@@ -1,5 +1,5 @@
 /* D30V-specific support for 32-bit ELF
-   Copyright (C) 1997-2017 Free Software Foundation, Inc.
+   Copyright (C) 1997-2020 Free Software Foundation, Inc.
    Contributed by Martin Hunt (hunt@cygnus.com).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -508,8 +508,8 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 
 /* Set the howto pointer for an D30V ELF reloc (type REL).  */
 
-static void
-d30v_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+static bfd_boolean
+d30v_info_to_howto_rel (bfd *abfd,
                        arelent *cache_ptr,
                        Elf_Internal_Rela *dst)
 {
@@ -519,16 +519,19 @@ d30v_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
   if (r_type >= (unsigned int) R_D30V_max)
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B: invalid D30V 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 = &elf_d30v_howto_table[r_type];
+  return TRUE;
 }
 
 /* Set the howto pointer for an D30V ELF reloc (type RELA).  */
 
-static void
-d30v_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+static bfd_boolean
+d30v_info_to_howto_rela (bfd *abfd,
                         arelent *cache_ptr,
                         Elf_Internal_Rela *dst)
 {
@@ -538,10 +541,13 @@ d30v_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
   if (r_type >= (unsigned int) R_D30V_max)
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B: invalid D30V 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 = &elf_d30v_howto_table[r_type];
+  return TRUE;
 }
 
 #define ELF_ARCH               bfd_arch_d30v
@@ -555,6 +561,5 @@ d30v_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
 #define elf_info_to_howto      d30v_info_to_howto_rela
 #define elf_info_to_howto_rel  d30v_info_to_howto_rel
 #define elf_backend_object_p   0
-#define elf_backend_final_write_processing     0
 
 #include "elf32-target.h"
This page took 0.024357 seconds and 4 git commands to generate.