PR binutils/22875: MIPS: Remove duplicate unsupported relocation processing
authorMaciej W. Rozycki <macro@mips.com>
Thu, 29 Mar 2018 13:09:48 +0000 (14:09 +0100)
committerMaciej W. Rozycki <macro@mips.com>
Thu, 29 Mar 2018 13:10:37 +0000 (14:10 +0100)
Remove a duplicate `unsupported relocation type' message and the setting
of the `bfd_error_bad_value' error from `mips_elf32_rtype_to_howto',
added with commit f3185997ac09 ("PR 22875: Stop strip corrupting unknown
relocs"), <https://sourceware.org/ml/binutils/2018-02/msg00445.html>.
This message is already produced and the `bfd_error_bad_value' error set
by `mips_elf32_rtype_to_howto' before a NULL howto is returned, so there
is no need to repeat these actions here.

bfd/
* elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
`_bfd_error_handler' and to set the `bfd_error_bad_value' error.

bfd/ChangeLog
bfd/elf32-mips.c

index 21545593c747ed800c8307ce0a3d9227b19bfd5b..925310e792793b94f0fee971fd2c4c0b88d69066 100644 (file)
@@ -1,3 +1,8 @@
+2018-03-29  Maciej W. Rozycki  <macro@mips.com>
+
+       * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
+       `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
+
 2018-03-28  Maciej W. Rozycki  <macro@mips.com>
 
        * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
index 37676778e15ceec8bdfecf3aeedf65e78ed98b80..c3c96a4d6ae46a382564dbe7493c092839985e98 100644 (file)
@@ -2239,13 +2239,9 @@ mips_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
 
   r_type = ELF32_R_TYPE (dst->r_info);
   cache_ptr->howto = mips_elf32_rtype_to_howto (abfd, r_type, FALSE);
+
   if (cache_ptr->howto == NULL)
-    {
-      /* xgettext:c-format */
-      _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type);
-      bfd_set_error (bfd_error_bad_value);
-      return FALSE;
-    }
+    return FALSE;
 
   /* The addend for a GPREL16 or LITERAL relocation comes from the GP
      value for the object file.  We get the addend now, rather than
This page took 0.028181 seconds and 4 git commands to generate.