non-contiguous elf test

Message ID 20200314065239.GF23597@bubble.grove.modra.org
State New
Headers show
Series
  • non-contiguous elf test
Related show

Commit Message

Jose E. Marchesi via Binutils March 14, 2020, 6:52 a.m.
This test XPASSes on the generic ELF targets, so adjusting.  I also
made xtensa an xfail instead of a skip, since skip is hiding some
nastiness.

Christophe please do fix that abort.  An abort is appropriate on a
condition that is not supposed to happen, giving "please report this
bug".  It shouldn't be used just for unsupported options.

	* testsuite/ld-elf/non-contiguous.d: Don't xfail generic ELF
	targets.  Don't skip xtensa, xfail instead.


-- 
Alan Modra
Australia Development Lab, IBM

Comments

Jose E. Marchesi via Binutils March 16, 2020, 10:21 a.m. | #1
On Sat, 14 Mar 2020 at 07:52, Alan Modra <amodra@gmail.com> wrote:
>

> This test XPASSes on the generic ELF targets, so adjusting.  I also

> made xtensa an xfail instead of a skip, since skip is hiding some

> nastiness.

>

> Christophe please do fix that abort.  An abort is appropriate on a

> condition that is not supposed to happen, giving "please report this

> bug".  It shouldn't be used just for unsupported options.


OK, sure, but what's the recommended way of issuing a fatal error message?
I'd like to stop processing at that point (and similarly in the other
parts of my patch where I use abort)

Thanks

>

>         * testsuite/ld-elf/non-contiguous.d: Don't xfail generic ELF

>         targets.  Don't skip xtensa, xfail instead.

>

> diff --git a/ld/testsuite/ld-elf/non-contiguous.d b/ld/testsuite/ld-elf/non-contiguous.d

> index 9694bcf933..0c76fcbab6 100644

> --- a/ld/testsuite/ld-elf/non-contiguous.d

> +++ b/ld/testsuite/ld-elf/non-contiguous.d

> @@ -2,8 +2,7 @@

>  #source: non-contiguous.s

>  #ld: --enable-non-contiguous-regions -T non-contiguous.ld

>  #objdump: -rdsh

> -#xfail: [is_generic]

> -#skip: xtensa*

> +#xfail: xtensa*

>

>  .*:     file format .*

>

>

> --

> Alan Modra

> Australia Development Lab, IBM
Jose E. Marchesi via Binutils March 16, 2020, 11:09 a.m. | #2
On Mon, Mar 16, 2020 at 11:21:01AM +0100, Christophe Lyon wrote:
> OK, sure, but what's the recommended way of issuing a fatal error message?

> I'd like to stop processing at that point (and similarly in the other

> parts of my patch where I use abort)


In the linker, use %F in an error message output by einfo.  Lots of
examples in ldelf.c.

-- 
Alan Modra
Australia Development Lab, IBM
Jose E. Marchesi via Binutils March 17, 2020, 10:56 a.m. | #3
On Mon, 16 Mar 2020 at 12:09, Alan Modra <amodra@gmail.com> wrote:
>

> On Mon, Mar 16, 2020 at 11:21:01AM +0100, Christophe Lyon wrote:

> > OK, sure, but what's the recommended way of issuing a fatal error message?

> > I'd like to stop processing at that point (and similarly in the other

> > parts of my patch where I use abort)

>

> In the linker, use %F in an error message output by einfo.  Lots of

> examples in ldelf.c.

>

Thanks, I'd missed that indeed.

But what about the code in elfNN-XXX ?
It uses _bfd_error_handler instead of einfo, which does not support %F AFAICT


> --

> Alan Modra

> Australia Development Lab, IBM
Jose E. Marchesi via Binutils March 17, 2020, 12:37 p.m. | #4
On Tue, Mar 17, 2020 at 11:56:17AM +0100, Christophe Lyon wrote:
> On Mon, 16 Mar 2020 at 12:09, Alan Modra <amodra@gmail.com> wrote:

> >

> > On Mon, Mar 16, 2020 at 11:21:01AM +0100, Christophe Lyon wrote:

> > > OK, sure, but what's the recommended way of issuing a fatal error message?

> > > I'd like to stop processing at that point (and similarly in the other

> > > parts of my patch where I use abort)

> >

> > In the linker, use %F in an error message output by einfo.  Lots of

> > examples in ldelf.c.

> >

> Thanks, I'd missed that indeed.

> 

> But what about the code in elfNN-XXX ?

> It uses _bfd_error_handler instead of einfo, which does not support %F AFAICT


It could use info->callbacks->einfo.

-- 
Alan Modra
Australia Development Lab, IBM
Jose E. Marchesi via Binutils March 17, 2020, 4:17 p.m. | #5
On Tue, 17 Mar 2020 at 13:37, Alan Modra <amodra@gmail.com> wrote:
>

> On Tue, Mar 17, 2020 at 11:56:17AM +0100, Christophe Lyon wrote:

> > On Mon, 16 Mar 2020 at 12:09, Alan Modra <amodra@gmail.com> wrote:

> > >

> > > On Mon, Mar 16, 2020 at 11:21:01AM +0100, Christophe Lyon wrote:

> > > > OK, sure, but what's the recommended way of issuing a fatal error message?

> > > > I'd like to stop processing at that point (and similarly in the other

> > > > parts of my patch where I use abort)

> > >

> > > In the linker, use %F in an error message output by einfo.  Lots of

> > > examples in ldelf.c.

> > >

> > Thanks, I'd missed that indeed.

> >

> > But what about the code in elfNN-XXX ?

> > It uses _bfd_error_handler instead of einfo, which does not support %F AFAICT

>

> It could use info->callbacks->einfo.

>


Ha thanks!
I missed that because almost none of the backends I patched use it
(except for ppc)

The attached patch uses %F and removes the calls to abort introduced
by my main patch.

Use '%F' format when printing error messages to exit cleanly rather
than by calling abort().

2020-03-17  Christophe Lyon  <christophe.lyon@linaro.org>

bfd/
* elf32-arm.c (arm_build_one_stub): Emit a fatal error message
instead of calling abort.
* elf32-csky.c (csky_build_one_stub): Likewise.
* elf32-hppa.c (hppa_build_one_stub): Likewise.
* elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
* elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
* elf32-metag.c (metag_build_one_stub): Likewise.
* elf32-nios2.c (nios2_build_one_stub): Likewise.
* elf64-ppc.c (ppc_build_one_stub): Likewise.
(ppc_size_one_stub): Likewise.
* elfnn-aarch64.c (aarch64_build_one_stub): Likewise.

ld/
* emultempl/xtensaelf.em: Emit a fatal error message
instead of calling abort.
* ldlang.c: Likewise.


OK?

Thanks,

Christophe

> --

> Alan Modra

> Australia Development Lab, IBM
From 019146b23e52f895b833c0b64cd0fc33537dc404 Mon Sep 17 00:00:00 2001
From: Christophe Lyon <christophe.lyon@linaro.org>
Date: Tue, 17 Mar 2020 15:59:01 +0000
Subject: [PATCH 1/1] Non-contiguous memory regions support: Avoid calls to
 abort

Use '%F' format when printing error messages to exit cleanly rather
than by calling abort().

2020-03-17  Christophe Lyon  <christophe.lyon@linaro.org>

	bfd/
	* elf32-arm.c (arm_build_one_stub): Emit a fatal error message
	instead of calling abort.
	* elf32-csky.c (csky_build_one_stub): Likewise.
	* elf32-hppa.c (hppa_build_one_stub): Likewise.
	* elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
	* elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
	* elf32-metag.c (metag_build_one_stub): Likewise.
	* elf32-nios2.c (nios2_build_one_stub): Likewise.
	* elf64-ppc.c (ppc_build_one_stub): Likewise.
	(ppc_size_one_stub): Likewise.
	* elfnn-aarch64.c (aarch64_build_one_stub): Likewise.

	ld/
	* emultempl/xtensaelf.em: Emit a fatal error message
	instead of calling abort.
	* ldlang.c: Likewise.

Change-Id: I60deaeeee59d4e7cab06b8a40a3e51837c43a8ab
---
 bfd/elf32-arm.c           |  9 +++------
 bfd/elf32-csky.c          |  9 +++------
 bfd/elf32-hppa.c          | 32 ++++++++++++++------------------
 bfd/elf32-m68hc11.c       |  9 +++------
 bfd/elf32-m68hc12.c       |  9 +++------
 bfd/elf32-metag.c         |  9 +++------
 bfd/elf32-nios2.c         | 10 ++++------
 bfd/elf64-ppc.c           | 44 ++++++++++++++++----------------------------
 bfd/elfnn-aarch64.c       | 10 ++++------
 ld/emultempl/xtensaelf.em |  6 ++----
 ld/ldlang.c               | 20 +++++++-------------
 11 files changed, 62 insertions(+), 105 deletions(-)

diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index e8b2ac4..56a9ee4 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -5068,12 +5068,9 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
      section.  The user should fix his linker script.  */
   if (stub_entry->target_section->output_section == NULL
       && info->non_contiguous_regions)
-    {
-      _bfd_error_handler (_("Could not assign '%pA' to an output section. "
-			    "Retry without --enable-non-contiguous-regions.\n"),
-			  stub_entry->target_section);
-      abort();
-    }
+    info->callbacks->einfo (_("%FCould not assign '%pA' to an output section. "
+			      "Retry without --enable-non-contiguous-regions.\n"),
+			    stub_entry->target_section);
 
   globals = elf32_arm_hash_table (info);
   if (globals == NULL)
diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c
index 8415f7c..44a491f 100644
--- a/bfd/elf32-csky.c
+++ b/bfd/elf32-csky.c
@@ -3625,12 +3625,9 @@ csky_build_one_stub (struct bfd_hash_entry *gen_entry,
      section.  The user should fix his linker script.  */
   if (stub_entry->target_section->output_section == NULL
       && info->non_contiguous_regions)
-    {
-      _bfd_error_handler (_("Could not assign '%pA' to an output section. "
-			    "Retry without --enable-non-contiguous-regions.\n"),
-			  stub_entry->target_section);
-      abort();
-    }
+    info->callbacks->einfo (_("%FCould not assign '%pA' to an output section. "
+			      "Retry without --enable-non-contiguous-regions.\n"),
+			    stub_entry->target_section);
 
   globals = csky_elf_hash_table (info);
   if (globals == NULL)
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 9760b75..1479f87 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -735,12 +735,10 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
 	 section.  The user should fix his linker script.  */
       if (hsh->target_section->output_section == NULL
 	  && info->non_contiguous_regions)
-	{
-	  _bfd_error_handler (_("Could not assign '%pA' to an output section. "
-				"Retry without --enable-non-contiguous-regions.\n"),
-			      hsh->target_section);
-	  abort();
-    }
+	info->callbacks->einfo (_("%FCould not assign '%pA' to an output "
+				  "section. Retry without "
+				  "--enable-non-contiguous-regions.\n"),
+				hsh->target_section);
 
       /* Create the long branch.  A long branch is formed with "ldil"
 	 loading the upper bits of the target address into a register,
@@ -766,12 +764,11 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
 	 section.  The user should fix his linker script.  */
       if (hsh->target_section->output_section == NULL
 	  && info->non_contiguous_regions)
-	{
-	  _bfd_error_handler (_("Could not assign %pA to an output section. "
-				"Retry without --enable-non-contiguous-regions.\n"),
-			      hsh->target_section);
-	  abort();
-    }
+	info->callbacks->einfo (_("%FCould not assign %pA to an output "
+				  "section. Retry without "
+				  "--enable-non-contiguous-regions.\n"),
+				hsh->target_section);
+
       /* Branches are relative.  This is where we are going to.  */
       sym_value = (hsh->target_value
 		   + hsh->target_section->output_offset
@@ -848,12 +845,11 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
 	 section.  The user should fix his linker script.  */
       if (hsh->target_section->output_section == NULL
 	  && info->non_contiguous_regions)
-	{
-	  _bfd_error_handler (_("Could not assign %pA to an output section. "
-				"Retry without --enable-non-contiguous-regions.\n"),
-			      hsh->target_section);
-	  abort();
-    }
+	info->callbacks->einfo (_("%FCould not assign %pA to an output "
+				  "section. Retry without "
+				  "--enable-non-contiguous-regions.\n"),
+				hsh->target_section);
+
       /* Branches are relative.  This is where we are going to.  */
       sym_value = (hsh->target_value
 		   + hsh->target_section->output_offset
diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c
index 3e12ae5..bfdc780 100644
--- a/bfd/elf32-m68hc11.c
+++ b/bfd/elf32-m68hc11.c
@@ -419,12 +419,9 @@ m68hc11_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
      section.  The user should fix his linker script.  */
   if (stub_entry->target_section->output_section == NULL
       && info->non_contiguous_regions)
-    {
-      _bfd_error_handler (_("Could not assign '%pA' to an output section. "
-			    "Retry without --enable-non-contiguous-regions.\n"),
-			  stub_entry->target_section);
-      abort();
-    }
+    info->callbacks->einfo (_("%FCould not assign '%pA' to an output section. "
+			      "Retry without --enable-non-contiguous-regions.\n"),
+			    stub_entry->target_section);
 
   htab = m68hc11_elf_hash_table (info);
   if (htab == NULL)
diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c
index a04efd8..d4b822f 100644
--- a/bfd/elf32-m68hc12.c
+++ b/bfd/elf32-m68hc12.c
@@ -539,12 +539,9 @@ m68hc12_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
      section.  The user should fix his linker script.  */
   if (stub_entry->target_section->output_section == NULL
       && info->non_contiguous_regions)
-    {
-      _bfd_error_handler (_("Could not assign '%pA' to an output section. "
-			    "Retry without --enable-non-contiguous-regions.\n"),
-			  stub_entry->target_section);
-      abort();
-    }
+    info->callbacks->einfo (_("%FCould not assign '%pA' to an output section. "
+			      "Retry without --enable-non-contiguous-regions.\n"),
+			    stub_entry->target_section);
 
   htab = m68hc11_elf_hash_table (info);
 
diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
index 3f30d6d..12f1313 100644
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
@@ -3477,12 +3477,9 @@ metag_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
      section.  The user should fix his linker script.  */
   if (hsh->target_section->output_section == NULL
       && info->non_contiguous_regions)
-    {
-      _bfd_error_handler (_("Could not assign '%pA' to an output section. "
-			    "Retry without --enable-non-contiguous-regions.\n"),
-			  hsh->target_section);
-      abort();
-    }
+    info->callbacks->einfo (_("%FCould not assign '%pA' to an output section. "
+			      "Retry without --enable-non-contiguous-regions.\n"),
+			    hsh->target_section);
 
   stub_sec = hsh->stub_sec;
 
diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
index 8c8bc0c..8516a27 100644
--- a/bfd/elf32-nios2.c
+++ b/bfd/elf32-nios2.c
@@ -2498,12 +2498,10 @@ nios2_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_U
      section.  The user should fix his linker script.  */
   if (hsh->target_section->output_section == NULL
       && info->non_contiguous_regions)
-    {
-      _bfd_error_handler (_("Could not assign '%pA' to an output section. "
-			    "Retry without --enable-non-contiguous-regions.\n"),
-			  hsh->target_section);
-      abort();
-    }
+    info->callbacks->einfo (_("%FCould not assign '%pA' to an output section. "
+			      "Retry without --enable-non-contiguous-regions.\n"),
+			    hsh->target_section);
+
   /* Make a note of the offset within the stubs for this entry.  */
   hsh->stub_offset = stub_sec->size;
 
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 83eaadf..a540d45 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -11367,25 +11367,19 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
   if (stub_entry->target_section != NULL
       && stub_entry->target_section->output_section == NULL
       && info->non_contiguous_regions)
-    {
-      _bfd_error_handler (_("Could not assign '%pA' to an output section. "
-			    "Retry without --enable-non-contiguous-regions.\n"),
-			  stub_entry->target_section);
-      abort();
-    }
+    info->callbacks->einfo (_("%FCould not assign '%pA' to an output section. "
+			      "Retry without --enable-non-contiguous-regions.\n"),
+			    stub_entry->target_section);
 
   /* Same for the group.  */
   if (stub_entry->group->stub_sec != NULL
       && stub_entry->group->stub_sec->output_section == NULL
       && info->non_contiguous_regions)
-    {
-      _bfd_error_handler (_("Could not assign group %pA target %pA to an "
-			    "output section. Retry without "
-			    "--enable-non-contiguous-regions.\n"),
-			  stub_entry->group->stub_sec,
-			  stub_entry->target_section);
-      abort();
-    }
+    info->callbacks->einfo (_("%FCould not assign group %pA target %pA to an "
+			      "output section. Retry without "
+			      "--enable-non-contiguous-regions.\n"),
+			    stub_entry->group->stub_sec,
+			    stub_entry->target_section);
 
   htab = ppc_hash_table (info);
   if (htab == NULL)
@@ -11917,25 +11911,19 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
   if (stub_entry->target_section != NULL
       && stub_entry->target_section->output_section == NULL
       && info->non_contiguous_regions)
-    {
-      _bfd_error_handler (_("Could not assign %pA to an output section. "
-			    "Retry without --enable-non-contiguous-regions.\n"),
-			  stub_entry->target_section);
-      abort();
-    }
+    info->callbacks->einfo (_("%FCould not assign %pA to an output section. "
+			      "Retry without --enable-non-contiguous-regions.\n"),
+			    stub_entry->target_section);
 
   /* Same for the group.  */
   if (stub_entry->group->stub_sec != NULL
       && stub_entry->group->stub_sec->output_section == NULL
       && info->non_contiguous_regions)
-    {
-      _bfd_error_handler (_("Could not assign group %pA target %pA to an "
-			    "output section. Retry without "
-			    "--enable-non-contiguous-regions.\n"),
-			  stub_entry->group->stub_sec,
-			  stub_entry->target_section);
-      abort();
-    }
+    info->callbacks->einfo (_("%FCould not assign group %pA target %pA to an "
+			      "output section. Retry without "
+			      "--enable-non-contiguous-regions.\n"),
+			    stub_entry->group->stub_sec,
+			    stub_entry->target_section);
 
   /* Make a note of the offset within the stubs for this entry.  */
   stub_entry->stub_offset = stub_entry->group->stub_sec->size;
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index b00b6c4..0be6f4d 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -3302,12 +3302,10 @@ aarch64_build_one_stub (struct bfd_hash_entry *gen_entry,
      section.  The user should fix his linker script.  */
   if (stub_entry->target_section->output_section == NULL
       && info->non_contiguous_regions)
-    {
-      _bfd_error_handler (_("Could not assign '%pA' to an output section. "
-			    "Retry without --enable-non-contiguous-regions.\n"),
-			  stub_entry->target_section);
-      abort();
-    }
+    info->callbacks->einfo (_("%FCould not assign '%pA' to an output section. "
+			      "Retry without "
+			      "--enable-non-contiguous-regions.\n"),
+			    stub_entry->target_section);
 
   stub_sec = stub_entry->stub_sec;
 
diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
index 74bd11c..11b6cc4 100644
--- a/ld/emultempl/xtensaelf.em
+++ b/ld/emultempl/xtensaelf.em
@@ -1225,10 +1225,8 @@ ld_build_required_section_dependence (lang_statement_union_type *s)
       lang_statement_union_type *l = iter_stack_current (&stack);
 
       if (l == NULL && link_info.non_contiguous_regions)
-	{
-	  einfo (_("Relaxation not supported with --enable-non-contiguous-regions.\n"));
-	  abort();
-	}
+	einfo (_("%FRelaxation not supported with "
+		 "--enable-non-contiguous-regions.\n"));
 
       if (l->header.type == lang_input_section_enum)
 	{
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 8e56e86..98ccc10 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -5220,21 +5220,15 @@ size_input_section
 	      if (dot + TO_ADDR (i->size) > end)
 		{
 		  if (i->flags & SEC_LINKER_CREATED)
-		    {
-		      einfo (_("Output section '%s' not large enough for the "
-			       "linker-created stubs section '%s'.\n"),
-			     i->output_section->name, i->name);
-		      abort();
-		    }
+		    einfo (_("%FOutput section '%s' not large enough for the "
+			     "linker-created stubs section '%s'.\n"),
+			   i->output_section->name, i->name);
 
 		  if (i->rawsize && i->rawsize != i->size)
-		    {
-		      einfo (_("Relaxation not supported with "
-			       "--enable-non-contiguous-regions (section '%s' "
-			       "would overflow '%s' after it changed size).\n"),
-			     i->name, i->output_section->name);
-		      abort();
-		    }
+		    einfo (_("%FRelaxation not supported with "
+			     "--enable-non-contiguous-regions (section '%s' "
+			     "would overflow '%s' after it changed size).\n"),
+			   i->name, i->output_section->name);
 
 		  *removed = 1;
 		  dot = end;
Jose E. Marchesi via Binutils March 18, 2020, 1:26 a.m. | #6
On Tue, Mar 17, 2020 at 05:17:06PM +0100, Christophe Lyon wrote:
> Use '%F' format when printing error messages to exit cleanly rather

> than by calling abort().


Please use "%F%P: " in place of just "%F", to comply with GNU
standards for error messages.  OK with that change.

-- 
Alan Modra
Australia Development Lab, IBM
Jose E. Marchesi via Binutils March 18, 2020, 10:11 a.m. | #7
On Wed, 18 Mar 2020 at 02:26, Alan Modra <amodra@gmail.com> wrote:
>

> On Tue, Mar 17, 2020 at 05:17:06PM +0100, Christophe Lyon wrote:

> > Use '%F' format when printing error messages to exit cleanly rather

> > than by calling abort().

>

> Please use "%F%P: " in place of just "%F", to comply with GNU

> standards for error messages.  OK with that change.

>


OK, thanks!

Pushed as 53215f214c61b850085196a8d69774eed026ecd9

Christophe

> --

> Alan Modra

> Australia Development Lab, IBM
Jose E. Marchesi via Binutils March 18, 2020, 12:40 p.m. | #8
On Wed, 18 Mar 2020 at 11:11, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
>

> On Wed, 18 Mar 2020 at 02:26, Alan Modra <amodra@gmail.com> wrote:

> >

> > On Tue, Mar 17, 2020 at 05:17:06PM +0100, Christophe Lyon wrote:

> > > Use '%F' format when printing error messages to exit cleanly rather

> > > than by calling abort().

> >

> > Please use "%F%P: " in place of just "%F", to comply with GNU

> > standards for error messages.  OK with that change.

> >

>

> OK, thanks!

>

> Pushed as 53215f214c61b850085196a8d69774eed026ecd9

>


I forgot to commit the related update of two testscases after the
change to the output message.
Pushed as aef397a1548908f82907854a6efc0cd4c0539904:

2020-03-18  Christophe Lyon  <christophe.lyon@linaro.org>

        * testsuite/ld-arm/non-contiguous-arm4.d: Fix expected output.
        * testsuite/ld-powerpc/non-contiguous-powerpc.d: Likewise.

Change-Id: I8870800177e1ff79cdd05af13613ec53ef95681f
---
 ld/ChangeLog                                     | 5 +++++
 ld/testsuite/ld-arm/non-contiguous-arm4.d        | 2 +-
 ld/testsuite/ld-powerpc/non-contiguous-powerpc.d | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index f8ee247..050bb31 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,10 @@
 2020-03-18  Christophe Lyon  <christophe.lyon@linaro.org>

+       * testsuite/ld-arm/non-contiguous-arm4.d: Fix expected output.
+       * testsuite/ld-powerpc/non-contiguous-powerpc.d: Likewise.
+
+2020-03-18  Christophe Lyon  <christophe.lyon@linaro.org>
+
        * emultempl/xtensaelf.em: Emit a fatal error message
        instead of calling abort.
        * ldlang.c: Likewise.
diff --git a/ld/testsuite/ld-arm/non-contiguous-arm4.d
b/ld/testsuite/ld-arm/non-contiguous-arm4.d
index 28417c0..a55e8d6 100644
--- a/ld/testsuite/ld-arm/non-contiguous-arm4.d
+++ b/ld/testsuite/ld-arm/non-contiguous-arm4.d
@@ -1,4 +1,4 @@
 #name: non-contiguous-arm4
 #source: non-contiguous-arm.s
 #ld: --enable-non-contiguous-regions -T non-contiguous-arm4.ld
-# error: \AOutput section '.ramu' not large enough for the
linker-created stubs section '.code.3.__stub'.*\Z
+# error: \A.*Output section '.ramu' not large enough for the
linker-created stubs section '.code.3.__stub'.*\Z
diff --git a/ld/testsuite/ld-powerpc/non-contiguous-powerpc.d
b/ld/testsuite/ld-powerpc/non-contiguous-powerpc.d
index 858e353..c0618db 100644
--- a/ld/testsuite/ld-powerpc/non-contiguous-powerpc.d
+++ b/ld/testsuite/ld-powerpc/non-contiguous-powerpc.d
@@ -1,5 +1,5 @@
 #name: non-contiguous-powerpc
 #source: non-contiguous-powerpc.s
 #ld: --enable-non-contiguous-regions -T non-contiguous-powerpc.ld
-#error: \ARelaxation not supported with
--enable-non-contiguous-regions.*
+#error: \A.*Relaxation not supported with
--enable-non-contiguous-regions.*
 #skip: powerpc64*-*

> Christophe

>

> > --

> > Alan Modra

> > Australia Development Lab, IBM

Patch

diff --git a/ld/testsuite/ld-elf/non-contiguous.d b/ld/testsuite/ld-elf/non-contiguous.d
index 9694bcf933..0c76fcbab6 100644
--- a/ld/testsuite/ld-elf/non-contiguous.d
+++ b/ld/testsuite/ld-elf/non-contiguous.d
@@ -2,8 +2,7 @@ 
 #source: non-contiguous.s
 #ld: --enable-non-contiguous-regions -T non-contiguous.ld
 #objdump: -rdsh
-#xfail: [is_generic]
-#skip: xtensa*
+#xfail: xtensa*
 
 .*:     file format .*