This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed] PR binutils/22875: MIPS: Remove duplicate unsupported relocation processing
- From: "Maciej W. Rozycki" <macro at mips dot com>
- To: <binutils at sourceware dot org>
- Cc: Nick Clifton <nickc at redhat dot com>
- Date: Thu, 29 Mar 2018 14:11:58 +0100
- Subject: [committed] PR binutils/22875: MIPS: Remove duplicate unsupported relocation processing
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/elf32-mips.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
binutils-mips-bfd-unsupp-reloc-dup-msg.diff
Index: binutils/bfd/elf32-mips.c
===================================================================
--- binutils.orig/bfd/elf32-mips.c 2018-03-29 13:30:22.509862160 +0100
+++ binutils/bfd/elf32-mips.c 2018-03-29 13:33:17.911059476 +0100
@@ -2239,13 +2239,9 @@ mips_info_to_howto_rel (bfd *abfd, arele
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