This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] MIPS/BFD: Unify `bfd_reloc_outofrange' error reporting code


	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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]