gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / bfd / elf32-mcore.c
index c48ddcbc36b7fafbfaa86f25c0fbe285a90d28f4..faed590a0d36856c99fb6ea2524a95f41e8b1bd9 100644 (file)
@@ -1,5 +1,5 @@
 /* Motorola MCore specific support for 32-bit ELF
-   Copyright (C) 1994-2017 Free Software Foundation, Inc.
+   Copyright (C) 1994-2020 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -97,10 +97,9 @@ mcore_elf_unsupported_reloc (bfd * abfd,
   BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
 
   /* xgettext:c-format */
-  _bfd_error_handler (_("%B: Relocation %s (%d) is not currently supported.\n"),
+  _bfd_error_handler (_("%pB: %s unsupported"),
                      abfd,
-                     reloc_entry->howto->name,
-                     reloc_entry->howto->type);
+                     reloc_entry->howto->name);
 
   return bfd_reloc_notsupported;
 }
@@ -337,8 +336,8 @@ mcore_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 
 /* Set the howto pointer for a RCE ELF reloc.  */
 
-static void
-mcore_elf_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED,
+static bfd_boolean
+mcore_elf_info_to_howto (bfd * abfd,
                         arelent * cache_ptr,
                         Elf_Internal_Rela * dst)
 {
@@ -352,13 +351,14 @@ mcore_elf_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED,
   if (r_type >= R_MCORE_max)
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B: unrecognised MCore reloc number: %d"),
+      _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
                          abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
-      r_type = R_MCORE_NONE;
+      return FALSE;
     }
 
   cache_ptr->howto = mcore_elf_howto_table [r_type];
+  return TRUE;
 }
 \f
 /* The RELOCATE_SECTION function is called by the ELF backend linker
@@ -408,7 +408,7 @@ mcore_elf_relocate_section (bfd * output_bfd,
 
 #ifdef DEBUG
   _bfd_error_handler
-    ("mcore_elf_relocate_section called for %B section %A, %u relocations%s",
+    ("mcore_elf_relocate_section called for %pB section %pA, %u relocations%s",
      input_bfd,
      input_section,
      input_section->reloc_count,
@@ -437,7 +437,7 @@ mcore_elf_relocate_section (bfd * output_bfd,
          || ! mcore_elf_howto_table [(int)r_type])
        {
          /* xgettext:c-format */
-         _bfd_error_handler (_("%B: Unknown relocation type %d\n"),
+         _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
                              input_bfd, (int) r_type);
 
          bfd_set_error (bfd_error_bad_value);
@@ -452,10 +452,9 @@ mcore_elf_relocate_section (bfd * output_bfd,
       if (howto->special_function == mcore_elf_unsupported_reloc)
        {
          /* xgettext:c-format */
-         _bfd_error_handler (_("%B: Relocation %s (%d) is not currently supported.\n"),
+         _bfd_error_handler (_("%pB: %s unsupported"),
                              input_bfd,
-                             howto->name,
-                             (int)r_type);
+                             howto->name);
 
          bfd_set_error (bfd_error_bad_value);
          ret = FALSE;
@@ -537,7 +536,7 @@ mcore_elf_relocate_section (bfd * output_bfd,
                      break;
 
                    if (* name == '\0')
-                     name = bfd_section_name (input_bfd, sec);
+                     name = bfd_section_name (sec);
                  }
 
                (*info->callbacks->reloc_overflow)
@@ -629,9 +628,7 @@ mcore_elf_check_relocs (bfd * abfd,
        /* This relocation describes which C++ vtable entries are actually
           used.  Record for later use during GC.  */
        case R_MCORE_GNU_VTENTRY:
-         BFD_ASSERT (h != NULL);
-         if (h != NULL
-             && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+         if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
            return FALSE;
          break;
        }
This page took 0.0278 seconds and 4 git commands to generate.