gas output_file_close error message
authorAlan Modra <amodra@gmail.com>
Mon, 23 Nov 2020 22:15:33 +0000 (08:45 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 25 Nov 2020 06:05:31 +0000 (16:35 +1030)
Seen on arm-elf, where ELFOSABI_ARM is set too late to get a warning
when processing ifunc related directives on their source line.
../gas/as-new ifunc.s -o tmpdir/ifunc.o
../gas/as-new: symbol type STT_GNU_IFUNC is supported only by GNU and FreeBSD targets
ifunc.s: Assembler messages:
ifunc.s: Fatal error: can't close tmpdir/ifunc.o: sorry, cannot handle this file

This patch doesn't fix the real underlying problem, just the late
error message where "can't close" is a misdirection in this case.

* output-file.c (output_file_close): Remove "can't close" from
error message.
* testsuite/gas/mips/reginfo-2.l: Update expected output.

gas/ChangeLog
gas/output-file.c
gas/testsuite/gas/mips/reginfo-2.l

index b967e201ca68e06733c7accd80a8d756dcac956a..77007f44b75478c47bfdacc01ba532abb54b76a6 100644 (file)
@@ -1,3 +1,9 @@
+2020-11-25  Alan Modra  <amodra@gmail.com>
+
+       * output-file.c (output_file_close): Remove "can't close" from
+       error message.
+       * testsuite/gas/mips/reginfo-2.l: Update expected output.
+
 2020-11-04  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>
 
        * config/tc-aarch64.c (aarch64_cpus): Add Cortex-A78C.
index 573598101c33ffe9adebf30b21b1e27e8424ad68..b8d2132277a47cbb76ba5c51913781d6fd34c64c 100644 (file)
@@ -68,6 +68,5 @@ output_file_close (const char *filename)
   stdoutput = NULL;
 
   if (! res)
-    as_fatal (_("can't close %s: %s"), filename,
-             bfd_errmsg (bfd_get_error ()));
+    as_fatal ("%s: %s", filename, bfd_errmsg (bfd_get_error ()));
 }
index fd3efa93a20bdfe25ed3b3fce0781939ee931605..3d171f2c09f3db9dc9879bf83a05d96899010719 100644 (file)
@@ -1,3 +1,3 @@
 .*: incorrect `\.reginfo' section size; expected 24, got 28
 .*: Assembler messages:
-.*: Fatal error: can't close .*: bad value
+.*: Fatal error: .*: bad value
This page took 0.028813 seconds and 4 git commands to generate.