Committed: gas/testsuite/ld-elf/dwarf2-21.d: Pass -W (was: dwarf2 sub-section test)
Hans-Peter Nilsson
hp@axis.com
Fri Sep 24 21:47:36 GMT 2021
> From: Alan Modra via Binutils <binutils@sourceware.org>
> Date: Wed, 22 Sep 2021 03:02:27 +0200
> diff --git a/gas/testsuite/gas/elf/dwarf2-21.d b/gas/testsuite/gas/elf/dwarf2-21.d
> new file mode 100644
> index 00000000000..16fa317be66
> --- /dev/null
> +++ b/gas/testsuite/gas/elf/dwarf2-21.d
> @@ -0,0 +1,18 @@
> +#name: DWARF2 21
> +#as: -gdwarf-2
> +#readelf: -wL
...
> +CU: (.*/elf/dwarf2-21|tmpdir/asm)\.s:
You (or perhaps I, running my autotester using a long-enough
source-path, where this test fails) got bitten by readelf
non-wide default re. "CU:" output. The same thing happened
to H.J. 2020-12-02; see referred commit and back-and-forth
email traffic at the time.
Now, can we drop the readelf non-"-W" functionality
completely? People can just truncate the output manually.
("Script compatibility" you say? They should be using -W!)
Or at least just make -W the default?
Or at least drop the quoted "|| strlen (directory) < 76"
conditional in binutils/dwarf.c?
The following was committed as obvious.
-----------
Required for the expected "CU:" to be emitted for long
source-paths. See binutils/dwarf.c:
if (do_wide || strlen (directory) < 76)
printf (_("CU: %s/%s:\n"), directory, file_table[0].name);
else
printf ("%s:\n", file_table[0].name);
See also commit 5f410aa50ce2c, "testsuite/ld-elf/pr26936.d:
Pass -W."
gas/ChangeLog:
* testsuite/ld-elf/dwarf2-21.d: Pass -W.
---
gas/testsuite/gas/elf/dwarf2-21.d | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/testsuite/gas/elf/dwarf2-21.d b/gas/testsuite/gas/elf/dwarf2-21.d
index 16fa317be664..66cd5a95ad13 100644
--- a/gas/testsuite/gas/elf/dwarf2-21.d
+++ b/gas/testsuite/gas/elf/dwarf2-21.d
@@ -1,6 +1,6 @@
#name: DWARF2 21
#as: -gdwarf-2
-#readelf: -wL
+#readelf: -wL -W
# Note that non-zero view numbers are allowed here. This doesn't really
# make much sense, but DW_LNS_fixed_advance_pc is defined to not set the
# view back to zero in contrast with all other changes in PC. A number
--
2.11.0
brgds, H-P
More information about the Binutils
mailing list