This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed] MIPS/BFD: Unify `bfd_reloc_outofrange' error reporting code
- From: "Maciej W. Rozycki" <macro at imgtec dot com>
- To: <binutils at sourceware dot org>
- Date: Tue, 24 May 2016 20:49:54 +0100
- Subject: [committed] MIPS/BFD: Unify `bfd_reloc_outofrange' error reporting code
- Authentication-results: sourceware.org; auth=none
bfd/
* elfxx-mips.c (_bfd_mips_elf_relocate_section)
<bfd_reloc_outofrange>: Unify error reporting code.
---
I have applied this change.
Maciej
binutils-mips-bfd-reloc-range-msg-unify.diff
Index: binutils/bfd/elfxx-mips.c
===================================================================
--- binutils.orig/bfd/elfxx-mips.c 2016-05-24 18:47:48.000000000 +0100
+++ binutils/bfd/elfxx-mips.c 2016-05-24 19:23:44.176244154 +0100
@@ -10259,16 +10259,13 @@ _bfd_mips_elf_relocate_section (bfd *out
break;
case bfd_reloc_outofrange:
+ msg = NULL;
if (jal_reloc_p (howto->type))
+ msg = _("JALX to a non-word-aligned address");
+ else if (aligned_pcrel_reloc_p (howto->type))
+ msg = _("PC-relative load from unaligned address");
+ if (msg)
{
- msg = _("JALX to a non-word-aligned address");
- info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
- return FALSE;
- }
- if (aligned_pcrel_reloc_p (howto->type))
- {
- msg = _("PC-relative load from unaligned address");
info->callbacks->warning
(info, msg, name, input_bfd, input_section, rel->r_offset);
return FALSE;