public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Linker error message output formatting clean-ups
@ 2017-02-07  2:04 Maciej W. Rozycki
  2017-02-07  2:06 ` [PATCH 1/3] LD: vfinfo: Remove static NULL initializers Maciej W. Rozycki
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2017-02-07  2:04 UTC (permalink / raw)
  To: binutils

Hi,

 I have made these in the course of earlier unrelated work, where I have 
noticed some issues with error message processing in the linker, mainly 
output formatting inconsistencies.  See individual patch descriptions for 
details.

  Maciej

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] LD: vfinfo: Remove static NULL initializers
  2017-02-07  2:04 [PATCH 0/3] Linker error message output formatting clean-ups Maciej W. Rozycki
@ 2017-02-07  2:06 ` Maciej W. Rozycki
  2017-02-07  2:07 ` [PATCH 2/3] PowerPC/BFD: Convert `%P: %H:' to `%H:' in error messages Maciej W. Rozycki
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2017-02-07  2:06 UTC (permalink / raw)
  To: binutils

Remove static NULL initializers, moving the respective variables from 
data to BSS and saving some storage space.

	ld/
	* ldmisc.c (vfinfo) <'H'>: Remove static NULL initializers.
---
 This seems so obvious I find it hard to believe there is no hidden 
purpose here.  Especially as `last_bfd' placed next doesn't have an 
initializer.  But maybe there isn't a purpose really.  OK to apply?

  Maciej

binutils-ld-vfinfo-static-init.diff
Index: binutils/ld/ldmisc.c
===================================================================
--- binutils.orig/ld/ldmisc.c	2017-02-02 01:09:23.000000000 +0000
+++ binutils/ld/ldmisc.c	2017-02-02 01:15:02.206819597 +0000
@@ -280,8 +280,8 @@ vfinfo (FILE *fp, const char *fmt, va_li
 		 The arguments are a BFD, a section, and an offset.  */
 	      {
 		static bfd *last_bfd;
-		static char *last_file = NULL;
-		static char *last_function = NULL;
+		static char *last_file;
+		static char *last_function;
 		bfd *abfd;
 		asection *section;
 		bfd_vma offset;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/3] PowerPC/BFD: Convert `%P: %H:' to `%H:' in error messages
  2017-02-07  2:04 [PATCH 0/3] Linker error message output formatting clean-ups Maciej W. Rozycki
  2017-02-07  2:06 ` [PATCH 1/3] LD: vfinfo: Remove static NULL initializers Maciej W. Rozycki
@ 2017-02-07  2:07 ` Maciej W. Rozycki
  2017-02-07  2:09 ` [PATCH 3/3] LD: vfinfo: Make clever formatters consistent WRT function name reporting Maciej W. Rozycki
  2017-02-15  2:27 ` [PATCH 0/3] Linker error message output formatting clean-ups Alan Modra
  3 siblings, 0 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2017-02-07  2:07 UTC (permalink / raw)
  To: binutils

Remove an inconsistency in BFD linker error messages across the PowerPC 
backends, where in the presence of line information the `%P: %H:' format 
sequence makes the first error message produced for any given function 
different from subsequent ones.

Taking the `ld/testsuite/ld-powerpc/tocopt7.s' test case source as an 
example and the `powerpc-linux' target we have:

$ as -gdwarf2 -o tocopt.o -a64 tocopt.s
$ ld -o tocopt -melf64ppc tocopt.o
ld: tocopt.o: In function `_start':
tocopt.s:35:(.text+0x14): toc optimization is not supported for 0x3fa00000 instruction.
ld: tocopt.s:49:(.text+0x34): toc optimization is not supported for 0x3fa00000 instruction.
$ 

where the first error message does not have the source file name 
prefixed with the linker program executable's name, i.e. `ld:', whereas 
the second error message does, as would any subsequent.

This is because with a multiple-line error message such as `%H' produces 
`%P' only prints the program executable's name on the first line and not 
any later ones.  Also the PowerPC backend is the only part of BFD which 
uses `%P' along with one of the clever `%C', `%D', `%G', `%H' format 
specifiers.  And last but not least this breaks a GNU Coding Standard's 
requirement that error messages from compilers should look like this:

source-file-name:lineno: message

also quoted in `vfinfo' code handling these specifiers.

Convert `%P: %H:' to `%H:' in error messages across the PowerPC backends 
then, yielding:

$ as -gdwarf2 -o tocopt.o -a64 tocopt.s
$ ld -o tocopt -melf64ppc tocopt.o
tocopt.o: In function `_start':
tocopt.s:35:(.text+0x14): toc optimization is not supported for 0x3fa00000 instruction.
tocopt.s:49:(.text+0x34): toc optimization is not supported for 0x3fa00000 instruction.
$ 

instead, making it consistent and matching the GNU Coding Standard's 
requirement.

	bfd/
	* elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than 
	`%P: %H:' with `info->callbacks->einfo'.
	(ppc_elf_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
	(ppc64_elf_edit_toc): Likewise.
	(ppc64_elf_relocate_section): Likewise.
---
 I hope the explanation is clear and the justification reasonable.

 OK to apply?

  Maciej

binutils-ld-vfinfo-file-null-ppc.diff
Index: binutils/bfd/elf32-ppc.c
===================================================================
--- binutils.orig/bfd/elf32-ppc.c	2017-02-02 15:28:26.443668675 +0000
+++ binutils/bfd/elf32-ppc.c	2017-02-02 15:29:54.291787959 +0000
@@ -4298,7 +4298,7 @@ ppc_elf_check_relocs (bfd *abfd,
 		     table entry for a non-ifunc local symbol.  */
 		  info->callbacks->einfo
 		    /* xgettext:c-format */
-		    (_("%P: %H: %s reloc against local symbol\n"),
+		    (_("%H: %s reloc against local symbol\n"),
 		     abfd, sec, rel->r_offset,
 		     ppc_elf_howto_table[r_type]->name);
 		  bfd_set_error (bfd_error_bad_value);
@@ -8221,7 +8221,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		  off = (p - contents) - (rel->r_offset - d_offset);
 		  if (off > 0x1fffffc || (off & 3) != 0)
 		    info->callbacks->einfo
-		      (_("%P: %H: fixup branch overflow\n"),
+		      (_("%H: fixup branch overflow\n"),
 		       input_bfd, input_section, rel->r_offset);
 
 		  bfd_put_32 (input_bfd, B | off,
@@ -8261,7 +8261,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	      else
 		info->callbacks->einfo
 		  /* xgettext:c-format */
-		  (_("%P: %H: error: %s with unexpected instruction %x\n"),
+		  (_("%H: error: %s with unexpected instruction %x\n"),
 		   input_bfd, input_section, rel->r_offset,
 		   "R_PPC_ADDR16_HA", insn);
 	    }
@@ -8296,7 +8296,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	      else
 		info->callbacks->einfo
 		  /* xgettext:c-format */
-		  (_("%P: %H: error: %s with unexpected instruction %x\n"),
+		  (_("%H: error: %s with unexpected instruction %x\n"),
 		   input_bfd, input_section, rel->r_offset,
 		   "R_PPC_ADDR16_LO", insn);
 	    }
@@ -8352,7 +8352,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		     into .got2).  */
 		    info->callbacks->einfo
 		      /* xgettext:c-format */
-		      (_("%X%P: %H: unsupported bss-plt -fPIC ifunc %s\n"),
+		      (_("%X%H: unsupported bss-plt -fPIC ifunc %s\n"),
 		       input_bfd, input_section, rel->r_offset, sym_name);
 		}
 	      if (h == NULL && (ent->plt.offset & 1) == 0)
@@ -8690,7 +8690,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	    if (addend != 0)
 	      info->callbacks->einfo
 		/* xgettext:c-format */
-		(_("%P: %H: non-zero addend on %s reloc against `%s'\n"),
+		(_("%H: non-zero addend on %s reloc against `%s'\n"),
 		 input_bfd, input_section, rel->r_offset,
 		 howto->name,
 		 sym_name);
@@ -8722,7 +8722,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		 -fPIC code, so the linker won't know whether r30 is
 		 _GLOBAL_OFFSET_TABLE_ or pointing into a .got2 section.  */
 	      /* xgettext:c-format */
-	      info->callbacks->einfo (_("%X%P: %H: @local call to ifunc %s\n"),
+	      info->callbacks->einfo (_("%X%H: @local call to ifunc %s\n"),
 				      input_bfd, input_section, rel->r_offset,
 				      h->root.root.string);
 	    }
@@ -8912,7 +8912,7 @@ ppc_elf_relocate_section (bfd *output_bf
 			     indirection function to resolve the reloc.  */
 			  info->callbacks->einfo
 			    /* xgettext:c-format */
-			    (_("%P: %H: relocation %s for indirect "
+			    (_("%H: relocation %s for indirect "
 			       "function %s unsupported\n"),
 			     input_bfd, input_section, rel->r_offset,
 			     howto->name,
@@ -9609,7 +9609,7 @@ ppc_elf_relocate_section (bfd *output_bf
 		relocation ^= lobit;
 		info->callbacks->einfo
 		  /* xgettext:c-format */
-		  (_("%P: %H: error: %s against `%s' not a multiple of %u\n"),
+		  (_("%H: error: %s against `%s' not a multiple of %u\n"),
 		   input_bfd, input_section, rel->r_offset,
 		   howto->name, sym_name, mask + 1);
 		bfd_set_error (bfd_error_bad_value);
@@ -9638,7 +9638,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	{
 	  info->callbacks->einfo
 	    /* xgettext:c-format */
-	    (_("%P: %H: unresolvable %s relocation against symbol `%s'\n"),
+	    (_("%H: unresolvable %s relocation against symbol `%s'\n"),
 	     input_bfd, input_section, rel->r_offset,
 	     howto->name,
 	     sym_name);
@@ -9719,7 +9719,7 @@ ppc_elf_relocate_section (bfd *output_bf
 	    {
 	      info->callbacks->einfo
 		/* xgettext:c-format */
-		(_("%P: %H: %s reloc against `%s': error %d\n"),
+		(_("%H: %s reloc against `%s': error %d\n"),
 		 input_bfd, input_section, rel->r_offset,
 		 howto->name, sym_name, (int) r);
 	      ret = FALSE;
Index: binutils/bfd/elf64-ppc.c
===================================================================
--- binutils.orig/bfd/elf64-ppc.c	2017-02-02 15:28:26.667181466 +0000
+++ binutils/bfd/elf64-ppc.c	2017-02-02 15:29:54.382044729 +0000
@@ -5554,7 +5554,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 		 table entry for a non-ifunc local symbol.  */
 	      info->callbacks->einfo
 		/* xgettext:c-format */
-		(_("%P: %H: %s reloc against local symbol\n"),
+		(_("%H: %s reloc against local symbol\n"),
 		 abfd, sec, rel->r_offset,
 		 ppc64_elf_howto_table[r_type]->name);
 	      bfd_set_error (bfd_error_bad_value);
@@ -5602,7 +5602,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
 	      if (!ppc64_elf_howto_table[R_PPC64_ADDR32])
 		ppc_howto_init ();
 	      /* xgettext:c-format */
-	      info->callbacks->einfo (_("%P: %H: %s reloc unsupported "
+	      info->callbacks->einfo (_("%H: %s reloc unsupported "
 					"in shared libraries and PIEs.\n"),
 				      abfd, sec, rel->r_offset,
 				      ppc64_elf_howto_table[r_type]->name);
@@ -9233,7 +9233,7 @@ ppc64_elf_edit_toc (struct bfd_link_info
 			  sprintf (str, "%#08x", insn);
 			  info->callbacks->einfo
 			    /* xgettext:c-format */
-			    (_("%P: %H: toc optimization is not supported for"
+			    (_("%H: toc optimization is not supported for"
 			       " %s instruction.\n"),
 			     ibfd, sec, rel->r_offset & ~3, str);
 			}
@@ -9462,7 +9462,7 @@ ppc64_elf_edit_toc (struct bfd_link_info
 			    ppc_howto_init ();
 			  info->callbacks->einfo
 			    /* xgettext:c-format */
-			    (_("%P: %H: %s references "
+			    (_("%H: %s references "
 			       "optimized away TOC entry\n"),
 			     ibfd, sec, rel->r_offset,
 			     ppc64_elf_howto_table[r_type]->name);
@@ -13571,9 +13571,9 @@ ppc64_elf_relocate_section (bfd *output_
 	    info->callbacks->einfo
 	      (!IS_PPC64_TLS_RELOC (r_type)
 	       /* xgettext:c-format */
-	       ? _("%P: %H: %s used with TLS symbol `%T'\n")
+	       ? _("%H: %s used with TLS symbol `%T'\n")
 	       /* xgettext:c-format */
-	       : _("%P: %H: %s used with non-TLS symbol `%T'\n"),
+	       : _("%H: %s used with non-TLS symbol `%T'\n"),
 	       input_bfd, input_section, rel->r_offset,
 	       ppc64_elf_howto_table[r_type]->name,
 	       sym_name);
@@ -14203,13 +14203,13 @@ ppc64_elf_relocate_section (bfd *output_
 		      || stub_entry->stub_type == ppc_stub_plt_call_r2save)
 		    info->callbacks->einfo
 		      /* xgettext:c-format */
-		      (_("%P: %H: call to `%T' lacks nop, can't restore toc; "
+		      (_("%H: call to `%T' lacks nop, can't restore toc; "
 			 "recompile with -fPIC\n"),
 		       input_bfd, input_section, rel->r_offset, sym_name);
 		  else
 		    info->callbacks->einfo
 		      /* xgettext:c-format */
-		      (_("%P: %H: call to `%T' lacks nop, can't restore toc; "
+		      (_("%H: call to `%T' lacks nop, can't restore toc; "
 			 "(-mcmodel=small toc adjust stub)\n"),
 		       input_bfd, input_section, rel->r_offset, sym_name);
 
@@ -14886,7 +14886,7 @@ ppc64_elf_relocate_section (bfd *output_
 			{
 			  info->callbacks->einfo
 			    /* xgettext:c-format */
-			    (_("%P: %H: %s for indirect "
+			    (_("%H: %s for indirect "
 			       "function `%T' unsupported\n"),
 			     input_bfd, input_section, rel->r_offset,
 			     ppc64_elf_howto_table[r_type]->name,
@@ -15173,7 +15173,7 @@ ppc64_elf_relocate_section (bfd *output_
 	      relocation ^= relocation & mask;
 	      info->callbacks->einfo
 		/* xgettext:c-format */
-		(_("%P: %H: error: %s not a multiple of %u\n"),
+		(_("%H: error: %s not a multiple of %u\n"),
 		 input_bfd, input_section, rel->r_offset,
 		 howto->name,
 		 mask + 1);
@@ -15195,7 +15195,7 @@ ppc64_elf_relocate_section (bfd *output_
 	{
 	  info->callbacks->einfo
 	    /* xgettext:c-format */
-	    (_("%P: %H: unresolvable %s against `%T'\n"),
+	    (_("%H: unresolvable %s against `%T'\n"),
 	     input_bfd, input_section, rel->r_offset,
 	     howto->name,
 	     h->elf.root.root.string);
@@ -15292,7 +15292,7 @@ ppc64_elf_relocate_section (bfd *output_
 	    {
 	      info->callbacks->einfo
 		/* xgettext:c-format */
-		(_("%P: %H: %s against `%T': error %d\n"),
+		(_("%H: %s against `%T': error %d\n"),
 		 input_bfd, input_section, rel->r_offset,
 		 reloc_name, sym_name, (int) r);
 	      ret = FALSE;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/3] LD: vfinfo: Make clever formatters consistent WRT function name reporting
  2017-02-07  2:04 [PATCH 0/3] Linker error message output formatting clean-ups Maciej W. Rozycki
  2017-02-07  2:06 ` [PATCH 1/3] LD: vfinfo: Remove static NULL initializers Maciej W. Rozycki
  2017-02-07  2:07 ` [PATCH 2/3] PowerPC/BFD: Convert `%P: %H:' to `%H:' in error messages Maciej W. Rozycki
@ 2017-02-07  2:09 ` Maciej W. Rozycki
  2017-02-15  2:27 ` [PATCH 0/3] Linker error message output formatting clean-ups Alan Modra
  3 siblings, 0 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2017-02-07  2:09 UTC (permalink / raw)
  To: binutils

Remove an inconsistency in linker error message processing causing that 
it depends on the ability to infer the name of the originating source 
file whether or not the name of the offending function is repeated by 
clever formatters for each issue reported within the function.

Taking the `ld/testsuite/ld-powerpc/tocopt7.s' test case source as an 
example and the `powerpc-linux' target we have:

$ as -gdwarf2 -o tocopt.o -a64 tocopt.s
$ ld -o tocopt -melf64ppc tocopt.o
tocopt.o: In function `_start':
tocopt.s:35:(.text+0x14): toc optimization is not supported for 0x3fa00000 instruction.
tocopt.s:49:(.text+0x34): toc optimization is not supported for 0x3fa00000 instruction.
$ 

vs:

$ as -o tocopt.o -a64 tocopt.s
$ ld -o tocopt -melf64ppc tocopt.o
tocopt.o: In function `_start':
(.text+0x14): toc optimization is not supported for 0x3fa00000 instruction.
tocopt.o: In function `_start':
(.text+0x34): toc optimization is not supported for 0x3fa00000 instruction.
$ 

Similarly with the `mips-linux' target and this source:

$ cat jal-global-multi-overflow.s
	.text
	.set	noreorder
	.space	0x2000

	.align	4
	.globl	foo
	.ent	foo
foo:
	jal	bar
	 nor	$0, $0
	jal	bar
	 nor	$0, $0
	.end	foo

	.space	0x1ff0

	.align	4
	.globl	bar
	.ent	bar
bar:
	jal	foo
	 nor	$0, $0
	jal	foo
	 nor	$0, $0
	.end	bar
$ as -o jal-global-multi-overflow.o jal-global-multi-overflow.s
$ ld -Ttext 0x1fffd000 -e foo -o jal-global-multi-overflow jal-global-multi-overflow.o
jal-global-multi-overflow.o: In function `foo':
(.text+0x2000): relocation truncated to fit: R_MIPS_26 against `bar'
jal-global-multi-overflow.o: In function `foo':
(.text+0x2008): relocation truncated to fit: R_MIPS_26 against `bar'
jal-global-multi-overflow.o: In function `bar':
(.text+0x4000): relocation truncated to fit: R_MIPS_26 against `foo'
jal-global-multi-overflow.o: In function `bar':
(.text+0x4008): relocation truncated to fit: R_MIPS_26 against `foo'
$ 

Not only this is inconsistent, but it causes output clutter as well with 
redundant information.

The cause for this is a check in `vfinfo' the intent of which is to 
print the function heading whenever (among others) the name of the 
source file has changed, which however does not take into account a 
situation where the name couldn't have been established both now and 
previously.

Adjust the check then for this situation, yielding:

$ as -o tocopt.o -a64 tocopt.s
$ ld -o tocopt -melf64ppc tocopt.o
tocopt.o: In function `_start':
(.text+0x14): toc optimization is not supported for 0x3fa00000 instruction.
(.text+0x34): toc optimization is not supported for 0x3fa00000 instruction.
$ 

and:

$ as -o jal-global-multi-overflow.o jal-global-multi-overflow.s
$ ld -Ttext 0x1fffd000 -e foo -o jal-global-multi-overflow jal-global-multi-overflow.o
jal-global-multi-overflow.o: In function `foo':
(.text+0x2000): relocation truncated to fit: R_MIPS_26 against `bar'
(.text+0x2008): relocation truncated to fit: R_MIPS_26 against `bar'
jal-global-multi-overflow.o: In function `bar':
(.text+0x4000): relocation truncated to fit: R_MIPS_26 against `foo'
(.text+0x4008): relocation truncated to fit: R_MIPS_26 against `foo'
$ 

respectively instead.  Adjust the test suite accordingly.

	ld/
	* ldmisc.c (vfinfo): Don't print the function name again either 
	if no source file name has been found both now and previously.
	* testsuite/ld-cris/tls-err-20x.d: Adjust accordingly.
	* testsuite/ld-mips-elf/mode-change-error-1.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-branch.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-branch-mips16.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-branch-micromips.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-branch-r6-1.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-branch-2.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-branch-r6-2.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-branch-ignore-2.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-branch-ignore-mips16.d: 
	Likewise.
	* testsuite/ld-mips-elf/unaligned-branch-ignore-micromips.d: 
	Likewise.
	* testsuite/ld-mips-elf/unaligned-branch-ignore-r6-1.d: 
	Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-addend-1.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-1.d: 
	Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-1.d: 
	Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-addend-3.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jump.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jump-mips16.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jump-micromips.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-lwpc-1.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-ldpc-1.d: Likewise.
	* testsuite/ld-powerpc/tocopt.out: Likewise.
	* testsuite/ld-powerpc/tocopt7.out: Likewise.
---
 I hope this change is clearly advantageous.  OK to apply?

  Maciej

binutils-ld-vfinfo-file-null.diff
Index: binutils/ld/ldmisc.c
===================================================================
--- binutils.orig/ld/ldmisc.c	2017-02-01 15:00:20.711939192 +0000
+++ binutils/ld/ldmisc.c	2017-02-02 00:57:08.844385136 +0000
@@ -331,9 +331,9 @@ vfinfo (FILE *fp, const char *fmt, va_li
 			   (eg emacs) to correctly locate multiple
 			   errors in the same source file.  */
 			if (last_bfd == NULL
-			    || last_file == NULL
 			    || last_function == NULL
 			    || last_bfd != abfd
+			    || (last_file == NULL) != (filename == NULL)
 			    || (filename != NULL
 				&& filename_cmp (last_file, filename) != 0)
 			    || strcmp (last_function, functionname) != 0)
Index: binutils/ld/testsuite/ld-cris/tls-err-20x.d
===================================================================
--- binutils.orig/ld/testsuite/ld-cris/tls-err-20x.d	2017-02-03 21:50:21.026317360 +0000
+++ binutils/ld/testsuite/ld-cris/tls-err-20x.d	2017-02-03 21:51:00.517679504 +0000
@@ -5,7 +5,7 @@
 #source: tls-hx.s --pic
 #as: --no-underscore --em=criself
 #ld: -m crislinux
-#error: \A[^\n]*: warning: cannot find entry symbol _start; defaulting to [0-9a-f]*\n[^\n]*: In function `tlsdsofn9':\n[^\n]*: undefined reference to `x1'\n[^\n]*: In function `tlsdsofn9':\n[^\n]*: undefined reference to `x2'\Z
+#error: \A[^\n]*: warning: cannot find entry symbol _start; defaulting to [0-9a-f]*\n[^\n]*: In function `tlsdsofn9':\n[^\n]*: undefined reference to `x1'\n[^\n]*: undefined reference to `x2'\Z
 
 # Code coverage case similar to tls-e-20.d, except with an undefined
 # reference.
Index: binutils/ld/testsuite/ld-mips-elf/mode-change-error-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/mode-change-error-1.d	2017-02-03 21:50:21.036374402 +0000
+++ binutils/ld/testsuite/ld-mips-elf/mode-change-error-1.d	2017-02-03 21:51:00.542131878 +0000
@@ -4,5 +4,4 @@
 #ld: -e 0x8000000
 #error: \A[^\n]*: In function `main':\n
 #error:   \(\.text\+0x0\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `main':\n
 #error:   \(\.text\+0x8\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-branch-2.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-branch-2.d	2017-02-03 21:50:21.060728321 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-branch-2.d	2017-02-03 21:51:00.551310086 +0000
@@ -4,89 +4,46 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-branch-2.s
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1024\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1034\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x103c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1044\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1054\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x105c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x107c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1084\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1094\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x109c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a4\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ac\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b4\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10bc\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10e4\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ec\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f4\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10fc\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10fc\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1104\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1104\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1114\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x111c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1124\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x112c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x112c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1134\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1134\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x113c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1144\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1144\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1154\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1164\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1164\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1174\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x117c\): Unsupported branch between ISA modes\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-2.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-2.d	2017-02-03 21:50:21.101332752 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-2.d	2017-02-03 21:51:00.568587210 +0000
@@ -4,61 +4,32 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-branch-2.s
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1024\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1034\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x103c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1044\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1054\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x105c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x107c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1084\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1094\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x109c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a4\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ac\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b4\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10bc\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f4\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10fc\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1104\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1124\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x112c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1134\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x113c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1144\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1154\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1164\): Cannot convert a branch to JALX for a non-word-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-micromips.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-micromips.d	2017-02-03 21:50:21.119626168 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-micromips.d	2017-02-03 21:51:00.582844208 +0000
@@ -4,81 +4,42 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-branch-micromips-2.s
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x100a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1012\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1032\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x103a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1062\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1072\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1088\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1094\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a0\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a6\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ac\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ca\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10d6\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10e8\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ee\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f4\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1100\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1106\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x110c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x112a\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1136\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1146\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1156\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1172\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x117a\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1186\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x118a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x118e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1196\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x119a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x119e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x11b2\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x11ba\): Branch to a non-instruction-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-mips16.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-mips16.d	2017-02-03 21:50:21.137704951 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-mips16.d	2017-02-03 21:51:00.603047093 +0000
@@ -4,33 +4,18 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-branch-mips16-2.s
 #error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1008\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x100e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1014\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1020\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1026\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104a\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1056\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1068\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x106e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1074\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1080\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1086\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10aa\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b6\): Branch to a non-instruction-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-r6-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-r6-1.d	2017-02-03 21:50:21.151759417 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-branch-ignore-r6-1.d	2017-02-03 21:51:00.626323531 +0000
@@ -4,69 +4,36 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-branch-r6-3.s
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1024\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1034\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x103c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1044\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1054\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x105c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x107c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1084\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1094\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x109c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a4\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ac\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b4\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10bc\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10dc\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10e4\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f4\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10fc\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1104\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x110c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1114\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1124\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x112c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1134\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x113c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1144\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1164\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x116c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1174\): Cannot convert a branch to JALX for a non-word-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-branch-micromips.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-branch-micromips.d	2017-02-03 21:50:21.161823479 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-branch-micromips.d	2017-02-03 21:51:00.641475307 +0000
@@ -4,153 +4,78 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-branch-micromips-2.s
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x100a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1012\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1032\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x103a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1062\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1072\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1082\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1088\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1088\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108e\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1094\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1094\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x109a\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a0\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a0\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a6\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a6\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ac\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ac\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b2\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ca\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10d6\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10e2\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10e8\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10e8\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ee\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ee\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f4\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f4\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10fa\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1100\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1100\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1106\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1106\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x110c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x110c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1112\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x112a\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1136\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1142\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1146\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1146\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114a\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114e\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1152\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1156\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1156\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115a\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115e\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1162\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1172\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x117a\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1182\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1186\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1186\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x118a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x118a\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x118e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x118e\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1192\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1196\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1196\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x119a\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x119a\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x119e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x119e\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x11a2\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x11b2\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x11ba\): Branch to a non-instruction-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-branch-mips16.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-branch-mips16.d	2017-02-03 21:50:21.177032134 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-branch-mips16.d	2017-02-03 21:51:00.645509254 +0000
@@ -4,69 +4,36 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-branch-mips16-2.s
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1002\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1008\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1008\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x100e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x100e\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1014\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1014\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101a\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1020\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1020\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1026\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1026\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1032\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104a\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1056\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1062\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1068\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1068\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x106e\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x106e\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1074\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1074\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x107a\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1080\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1080\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1086\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1086\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1092\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10aa\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b6\): Branch to a non-instruction-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-branch-r6-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-branch-r6-1.d	2017-02-03 21:50:21.186135217 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-branch-r6-1.d	2017-02-03 21:51:00.669704258 +0000
@@ -4,111 +4,57 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-branch-r6-3.s
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1024\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1034\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x103c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1044\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1054\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x105c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x107c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1084\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1094\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x109c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a4\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ac\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b4\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10bc\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10dc\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10dc\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10e4\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10e4\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ec\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f4\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f4\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10fc\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10fc\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1104\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1104\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x110c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x110c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1114\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1114\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x111c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1124\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1124\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x112c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x112c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1134\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1134\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x113c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x113c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1144\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1144\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1154\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1164\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1164\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x116c\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x116c\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1174\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1174\): Unsupported branch between ISA modes\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x117c\): Unsupported branch between ISA modes\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-branch-r6-2.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-branch-r6-2.d	2017-02-03 21:50:21.190209162 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-branch-r6-2.d	2017-02-03 21:51:00.693066641 +0000
@@ -4,61 +4,32 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-branch-r6-4.s
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1024\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1034\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x103c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1044\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1054\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x105c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x107c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1084\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1094\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x109c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a4\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ac\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b4\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10bc\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f4\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10fc\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1104\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1124\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x112c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1134\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x113c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1144\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1154\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1164\): Branch to a non-instruction-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-branch.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-branch.d	2017-02-03 21:50:21.208357033 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-branch.d	2017-02-03 21:51:00.704182984 +0000
@@ -5,19 +5,11 @@
 #ld: -EB -Ttext 0x10000000 -e 0x10000000
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x14\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x24\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x28\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x30\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x38\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x3c\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x44\): Branch to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x4c\): Branch to a non-instruction-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-1.d	2017-02-03 21:50:21.221470743 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-1.d	2017-02-03 21:51:00.721388251 +0000
@@ -5,25 +5,14 @@
 #ld: -EB -Ttext 0x1c000000 -e 0x1c000000
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-3.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-3.d	2017-02-03 21:50:21.246800219 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-3.d	2017-02-03 21:51:00.729493967 +0000
@@ -5,25 +5,14 @@
 #ld: -EB -Ttext 0x1c000000 -e 0x1c000000
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x0\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x8\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x18\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x20\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x28\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x30\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x38\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x40\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x48\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x50\): Cannot convert a branch to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x58\): Cannot convert a branch to JALX for a non-word-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-1.d	2017-02-03 21:50:21.260984919 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-1.d	2017-02-03 21:51:00.753692058 +0000
@@ -6,25 +6,14 @@
 #objdump: -dr --prefix-addresses --show-raw-insn
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-1.d	2017-02-03 21:50:21.312359957 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-1.d	2017-02-03 21:51:00.766881336 +0000
@@ -6,25 +6,14 @@
 #objdump: -dr --prefix-addresses --show-raw-insn
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): Cannot convert a jump to JALX for a non-word-aligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jump-micromips.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jump-micromips.d	2017-02-03 21:50:21.329487110 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jump-micromips.d	2017-02-03 21:51:00.785244863 +0000
@@ -4,115 +4,59 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-jump-micromips-2.s
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1012\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1018\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101e\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1026\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102e\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102e\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1034\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1034\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x103a\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1042\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104a\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104a\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1050\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1050\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1056\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x105e\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1066\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1066\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x106c\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x106c\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1082\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1088\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108e\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1096\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x109e\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x109e\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a4\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a4\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10aa\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b2\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ba\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ba\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10c0\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10c0\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10c6\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ce\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10d6\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10d6\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10dc\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10dc\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f2\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f8\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10fe\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x111a\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1136\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1152\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1152\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115a\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1162\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1168\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x116e\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x118a\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x118a\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1192\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x119a\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x11a0\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x11a6\): Unsupported JALX to the same ISA mode\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jump-mips16.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jump-mips16.d	2017-02-03 21:50:21.368856576 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jump-mips16.d	2017-02-03 21:51:00.796340794 +0000
@@ -4,55 +4,29 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-jump-mips16-2.s
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x100e\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1014\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101a\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1020\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1026\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102c\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x103e\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1044\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104a\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1050\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1056\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x105c\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x106e\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x107a\): Jump to a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x107a\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1080\): Jump to a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1086\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1092\): Jump to a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1092\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1098\): Jump to a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x109e\): Jump to a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x109e\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a4\): Jump to a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10aa\): Jump to a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10aa\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b0\): Jump to a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b6\): Unsupported JALX to the same ISA mode\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-jump.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-jump.d	2017-02-03 21:50:21.381962651 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-jump.d	2017-02-03 21:51:00.828893659 +0000
@@ -4,93 +4,48 @@
 #source: ../../../gas/testsuite/gas/mips/unaligned-jump-2.s
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1004\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101c\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x101c\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1024\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x102c\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1034\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1034\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x103c\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1044\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104c\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x104c\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1054\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x105c\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1064\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x107c\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x107c\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1084\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x108c\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1094\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1094\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x109c\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10a4\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ac\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ac\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10b4\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10bc\): Jump to a non-instruction-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10c4\): Unsupported JALX to the same ISA mode\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10ec\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10f4\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x10fc\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1104\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1104\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x111c\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1124\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x112c\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1134\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1134\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x113c\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1144\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114c\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x114c\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1154\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x115c\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1164\): Cannot convert a jump to JALX for a non-word-aligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x1164\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x117c\): Unsupported jump between ISA modes; consider recompiling with interlinking enabled\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.d	2017-02-03 21:50:21.406201835 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-ldpc-1.d	2017-02-03 21:51:00.842015146 +0000
@@ -5,7 +5,5 @@
 #ld: -EB -Ttext 0x1c000000 -Tdata 0x1c080000 -e 0x1c000000
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\Z
Index: binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.d	2017-02-03 21:50:21.427340373 +0000
+++ binutils/ld/testsuite/ld-mips-elf/unaligned-lwpc-1.d	2017-02-03 21:51:00.854099271 +0000
@@ -5,5 +5,4 @@
 #ld: -EB -Ttext 0x1c000000 -Tdata 0x1c080000 -e 0x1c000000
 #error: \A[^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\n
-#error:   [^\n]*: In function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): PC-relative load from unaligned address\Z
Index: binutils/ld/testsuite/ld-powerpc/tocopt.out
===================================================================
--- binutils.orig/ld/testsuite/ld-powerpc/tocopt.out	2017-02-02 16:11:00.170643299 +0000
+++ binutils/ld/testsuite/ld-powerpc/tocopt.out	2017-02-03 21:51:00.892301170 +0000
@@ -1,4 +1,3 @@
 .*
 \(\.text\+0x14\): .*
-.*
 \(\.text\+0x34\): .*
Index: binutils/ld/testsuite/ld-powerpc/tocopt7.out
===================================================================
--- binutils.orig/ld/testsuite/ld-powerpc/tocopt7.out	2017-02-02 16:11:00.219452921 +0000
+++ binutils/ld/testsuite/ld-powerpc/tocopt7.out	2017-02-03 21:51:00.909405580 +0000
@@ -1,26 +1,14 @@
 .*
 \(\.text\+0x18\): .*
-.*
 \(\.text\+0x34\): .*
-.*
 \(\.text\+0x5c\): .*
-.*
 \(\.text\+0xa4\): .*
-.*
 \(\.text\+0xec\): .*
-.*
 \(\.text\+0x114\): .*
-.*
 \(\.text\+0x13c\): .*
-.*
 \(\.text\+0x1b8\): .*
-.*
 \(\.text\+0x1d4\): .*
-.*
 \(\.text\+0x1f0\): .*
-.*
 \(\.text\+0x20c\): .*
-.*
 \(\.text\+0x228\): .*
-.*
 \(\.text\+0x244\): .*

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] Linker error message output formatting clean-ups
  2017-02-07  2:04 [PATCH 0/3] Linker error message output formatting clean-ups Maciej W. Rozycki
                   ` (2 preceding siblings ...)
  2017-02-07  2:09 ` [PATCH 3/3] LD: vfinfo: Make clever formatters consistent WRT function name reporting Maciej W. Rozycki
@ 2017-02-15  2:27 ` Alan Modra
  2017-02-15 13:44   ` Maciej W. Rozycki
  3 siblings, 1 reply; 6+ messages in thread
From: Alan Modra @ 2017-02-15  2:27 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: binutils

On Tue, Feb 07, 2017 at 02:04:15AM +0000, Maciej W. Rozycki wrote:
>  I have made these in the course of earlier unrelated work, where I have 
> noticed some issues with error message processing in the linker, mainly 
> output formatting inconsistencies.  See individual patch descriptions for 
> details.

Thanks, these are all OK to apply.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] Linker error message output formatting clean-ups
  2017-02-15  2:27 ` [PATCH 0/3] Linker error message output formatting clean-ups Alan Modra
@ 2017-02-15 13:44   ` Maciej W. Rozycki
  0 siblings, 0 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2017-02-15 13:44 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

On Wed, 15 Feb 2017, Alan Modra wrote:

> >  I have made these in the course of earlier unrelated work, where I have 
> > noticed some issues with error message processing in the linker, mainly 
> > output formatting inconsistencies.  See individual patch descriptions for 
> > details.
> 
> Thanks, these are all OK to apply.

 Committed, thanks for your review.

  Maciej

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-15 13:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07  2:04 [PATCH 0/3] Linker error message output formatting clean-ups Maciej W. Rozycki
2017-02-07  2:06 ` [PATCH 1/3] LD: vfinfo: Remove static NULL initializers Maciej W. Rozycki
2017-02-07  2:07 ` [PATCH 2/3] PowerPC/BFD: Convert `%P: %H:' to `%H:' in error messages Maciej W. Rozycki
2017-02-07  2:09 ` [PATCH 3/3] LD: vfinfo: Make clever formatters consistent WRT function name reporting Maciej W. Rozycki
2017-02-15  2:27 ` [PATCH 0/3] Linker error message output formatting clean-ups Alan Modra
2017-02-15 13:44   ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).