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

Maciej W. Rozycki macro@imgtec.com
Tue May 24 19:50:00 GMT 2016


	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;



More information about the Binutils mailing list