[2/4] binutils, ld: make objdump --ctf's parameter optional

Message ID 20211011191810.274535-2-nick.alcock@oracle.com
State New
Headers show
Series
  • [1/4] binutils: make objdump/readelf --ctf-parent actually useful
Related show

Commit Message

Alan Modra via Binutils Oct. 11, 2021, 7:18 p.m.
ld by default (and always, unless adjusted with a hand-rolled linker
script) emits deduplicated CTF into the .ctf section.  But viewing
it needs you to explicitly tell objdump this: it doesn't default
its argument, even though what you always end up typing is
--ctf=.ctf.

This is annoying, so make the argument optional.

binutils/ChangeLog
2021-10-08  Nick Alcock  <nick.alcock@oracle.com>

	* objdump.c (usage): --ctf now has an optional argument.
	(main): Adjust accordingly.
	(dump_ctf): Default it.
	* doc/ctf.options.texi: Adjust.

ld/ChangeLog
2021-10-08  Nick Alcock  <nick.alcock@oracle.com>

	* testsuite/ld-ctf/array.d: Change --ctf=.ctf to --ctf.
	* testsuite/ld-ctf/conflicting-cycle-1.B-1.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-1.B-2.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-1.parent.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-2.A-1.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-2.A-2.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-2.parent.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-3.C-1.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-3.C-2.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-3.parent.d: Likewise.
	* testsuite/ld-ctf/conflicting-enums.d: Likewise.
	* testsuite/ld-ctf/conflicting-typedefs.d: Likewise.
	* testsuite/ld-ctf/cross-tu-cyclic-conflicting.d: Likewise.
	* testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d: Likewise.
	* testsuite/ld-ctf/cross-tu-into-cycle.d: Likewise.
	* testsuite/ld-ctf/cross-tu-noncyclic.d: Likewise.
	* testsuite/ld-ctf/cycle-1.d: Likewise.
	* testsuite/ld-ctf/cycle-2.A.d: Likewise.
	* testsuite/ld-ctf/cycle-2.B.d: Likewise.
	* testsuite/ld-ctf/cycle-2.C.d: Likewise.
	* testsuite/ld-ctf/data-func-conflicted.d: Likewise.
	* testsuite/ld-ctf/diag-cttname-null.d: Likewise.
	* testsuite/ld-ctf/diag-cuname.d: Likewise.
	* testsuite/ld-ctf/diag-parlabel.d: Likewise.
	* testsuite/ld-ctf/enum-forward.d: Likewise.
	* testsuite/ld-ctf/enums.d: Likewise.
	* testsuite/ld-ctf/forward.d: Likewise.
	* testsuite/ld-ctf/function.d: Likewise.
	* testsuite/ld-ctf/nonrepresentable.d: Likewise.
	* testsuite/ld-ctf/slice.d: Likewise.
	* testsuite/ld-ctf/super-sub-cycles.d: Likewise.
---
 binutils/doc/ctf.options.texi                        | 4 +++-
 binutils/objdump.c                                   | 9 ++++++---
 ld/testsuite/ld-ctf/array.d                          | 2 +-
 ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d        | 2 +-
 ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d        | 2 +-
 ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d     | 2 +-
 ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d        | 2 +-
 ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d        | 2 +-
 ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d     | 2 +-
 ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d        | 2 +-
 ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d        | 2 +-
 ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d     | 2 +-
 ld/testsuite/ld-ctf/conflicting-enums.d              | 2 +-
 ld/testsuite/ld-ctf/conflicting-typedefs.d           | 2 +-
 ld/testsuite/ld-ctf/cross-tu-cyclic-conflicting.d    | 2 +-
 ld/testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d | 2 +-
 ld/testsuite/ld-ctf/cross-tu-into-cycle.d            | 2 +-
 ld/testsuite/ld-ctf/cross-tu-noncyclic.d             | 2 +-
 ld/testsuite/ld-ctf/cycle-1.d                        | 2 +-
 ld/testsuite/ld-ctf/cycle-2.A.d                      | 2 +-
 ld/testsuite/ld-ctf/cycle-2.B.d                      | 2 +-
 ld/testsuite/ld-ctf/cycle-2.C.d                      | 2 +-
 ld/testsuite/ld-ctf/data-func-conflicted.d           | 2 +-
 ld/testsuite/ld-ctf/diag-cttname-null.d              | 2 +-
 ld/testsuite/ld-ctf/diag-cuname.d                    | 2 +-
 ld/testsuite/ld-ctf/diag-parlabel.d                  | 2 +-
 ld/testsuite/ld-ctf/enum-forward.d                   | 2 +-
 ld/testsuite/ld-ctf/enums.d                          | 2 +-
 ld/testsuite/ld-ctf/forward.d                        | 2 +-
 ld/testsuite/ld-ctf/function.d                       | 2 +-
 ld/testsuite/ld-ctf/nonrepresentable.d               | 2 +-
 ld/testsuite/ld-ctf/slice.d                          | 2 +-
 ld/testsuite/ld-ctf/super-sub-cycles.d               | 2 +-
 33 files changed, 40 insertions(+), 35 deletions(-)

-- 
2.33.0.256.gb827f06fa9

Patch

diff --git a/binutils/doc/ctf.options.texi b/binutils/doc/ctf.options.texi
index 34451f9221a..2820946f2c0 100644
--- a/binutils/doc/ctf.options.texi
+++ b/binutils/doc/ctf.options.texi
@@ -1,13 +1,15 @@ 
 @c This file contains the entry for the --ctf, --ctf-parent, --ctf-symbols, -and
 @c --ctf-strings options that are common to both readelf and objdump.
 
-@item --ctf=@var{section}
+@item --ctf[=@var{section}]
 @cindex CTF
 @cindex Compact Type Format
 
 Display the contents of the specified CTF section.  CTF sections themselves
 contain many subsections, all of which are displayed in order.
 
+By default, display the name of the section named @var{.ctf}, which is the
+name emitted by @command{ld}.
 
 @item --ctf-parent=@var{member}
 
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 2edf0a31478..9db2ab30934 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -273,7 +273,7 @@  usage (FILE *stream, int status)
                             separate debuginfo files.  (Implies -WK)\n"));
 #ifdef ENABLE_LIBCTF
   fprintf (stream, _("\
-      --ctf=SECTION        Display CTF info from SECTION\n"));
+      --ctf[=SECTION]      Display CTF info from SECTION, (default `.ctf')\n"));
 #endif
   fprintf (stream, _("\
   -t, --syms               Display the contents of the symbol table(s)\n"));
@@ -460,7 +460,7 @@  static struct option long_options[]=
   {"include", required_argument, NULL, 'I'},
   {"dwarf", optional_argument, NULL, OPTION_DWARF},
 #ifdef ENABLE_LIBCTF
-  {"ctf", required_argument, NULL, OPTION_CTF},
+  {"ctf", optional_argument, NULL, OPTION_CTF},
   {"ctf-parent", required_argument, NULL, OPTION_CTF_PARENT},
 #endif
   {"stabs", no_argument, NULL, 'G'},
@@ -4215,6 +4215,8 @@  dump_ctf (bfd *abfd, const char *sect_name, const char *parent_name)
   ctf_dict_t *parent;
   int err;
 
+  if (sect_name == NULL)
+    sect_name = ".ctf";
 
   if ((ctfdata = read_section_stabs (abfd, sect_name, &ctfsize, NULL)) == NULL)
       bfd_fatal (bfd_get_filename (abfd));
@@ -5444,7 +5446,8 @@  main (int argc, char **argv)
 #ifdef ENABLE_LIBCTF
 	case OPTION_CTF:
 	  dump_ctf_section_info = true;
-	  dump_ctf_section_name = xstrdup (optarg);
+	  if (optarg)
+	    dump_ctf_section_name = xstrdup (optarg);
 	  seenflag = true;
 	  break;
 	case OPTION_CTF_PARENT:
diff --git a/ld/testsuite/ld-ctf/array.d b/ld/testsuite/ld-ctf/array.d
index 142f9e9fa94..0fe675e2c5d 100644
--- a/ld/testsuite/ld-ctf/array.d
+++ b/ld/testsuite/ld-ctf/array.d
@@ -1,7 +1,7 @@ 
 #as:
 #source: array-char.c
 #source: array-int.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables --hash-style=sysv
 #name: Arrays
 
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d b/ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d
index 27273c5386f..2ed3ce19401 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d
@@ -4,7 +4,7 @@ 
 #source: B.c
 #source: B-2.c
 #source: C.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Conflicting cycle 1.B-1
 
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d b/ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d
index 28a92f4a73e..3b9b7f627d2 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d
@@ -4,7 +4,7 @@ 
 #source: B.c
 #source: B-2.c
 #source: C.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Conflicting cycle 1.B-2
 
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d b/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d
index a9755e88db7..83c56fe145c 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d
@@ -4,7 +4,7 @@ 
 #source: B.c
 #source: B-2.c
 #source: C.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Conflicting cycle 1.parent
 
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d b/ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d
index 33ed6e843ce..6a07d368b74 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d
@@ -6,7 +6,7 @@ 
 #source: B-2.c
 #source: C.c
 #source: C-2.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Conflicting cycle 2.A-1
 
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d b/ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d
index a98b66c267e..677542199b0 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d
@@ -6,7 +6,7 @@ 
 #source: B-2.c
 #source: C.c
 #source: C-2.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Conflicting cycle 2.A-2
 
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d b/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d
index 87ec41d69e4..30be9b03ee4 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d
@@ -6,7 +6,7 @@ 
 #source: B-2.c
 #source: C.c
 #source: C-2.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Conflicting cycle 2.parent
 
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
index ac750a776db..b60768fc7a7 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
@@ -5,7 +5,7 @@ 
 #source: B-2.c
 #source: C.c
 #source: C-2.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Conflicting cycle 3.C-1
 
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d
index 603432f05ad..590d3734887 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d
@@ -5,7 +5,7 @@ 
 #source: B-2.c
 #source: C.c
 #source: C-2.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Conflicting cycle 3.C-2
 
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d b/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d
index 24f080004cd..dbe2e46786f 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d
@@ -5,7 +5,7 @@ 
 #source: B-2.c
 #source: C.c
 #source: C-2.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared
 #name: Conflicting cycle 3
 
diff --git a/ld/testsuite/ld-ctf/conflicting-enums.d b/ld/testsuite/ld-ctf/conflicting-enums.d
index 5eeae7a13ed..4f8cf812ee4 100644
--- a/ld/testsuite/ld-ctf/conflicting-enums.d
+++ b/ld/testsuite/ld-ctf/conflicting-enums.d
@@ -1,7 +1,7 @@ 
 #as:
 #source: enum.c
 #source: enum-2.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared
 #name: Conflicting Enums
 
diff --git a/ld/testsuite/ld-ctf/conflicting-typedefs.d b/ld/testsuite/ld-ctf/conflicting-typedefs.d
index 72082ba553b..4ae8de41364 100644
--- a/ld/testsuite/ld-ctf/conflicting-typedefs.d
+++ b/ld/testsuite/ld-ctf/conflicting-typedefs.d
@@ -1,7 +1,7 @@ 
 #as:
 #source: typedef-int.c
 #source: typedef-long.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared
 #name: Conflicting Typedefs
 
diff --git a/ld/testsuite/ld-ctf/cross-tu-cyclic-conflicting.d b/ld/testsuite/ld-ctf/cross-tu-cyclic-conflicting.d
index 6d5e869bfbe..0fba1b494ca 100644
--- a/ld/testsuite/ld-ctf/cross-tu-cyclic-conflicting.d
+++ b/ld/testsuite/ld-ctf/cross-tu-cyclic-conflicting.d
@@ -3,7 +3,7 @@ 
 #as:
 #source: cross-tu-cyclic-1.c
 #source: cross-tu-cyclic-2.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared
 #name: cross-TU-cyclic-conflicting
 
diff --git a/ld/testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d b/ld/testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d
index 1a714846d32..c83789a9965 100644
--- a/ld/testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d
+++ b/ld/testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d
@@ -5,7 +5,7 @@ 
 #as:
 #source: cross-tu-2.c
 #source: cross-tu-cyclic-1.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: cross-TU-cyclic-nonconflicting
 
diff --git a/ld/testsuite/ld-ctf/cross-tu-into-cycle.d b/ld/testsuite/ld-ctf/cross-tu-into-cycle.d
index 7f3aebc54b7..903dedbb389 100644
--- a/ld/testsuite/ld-ctf/cross-tu-into-cycle.d
+++ b/ld/testsuite/ld-ctf/cross-tu-into-cycle.d
@@ -7,7 +7,7 @@ 
 #as:
 #source: cross-tu-cyclic-3.c
 #source: cross-tu-cyclic-4.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: cross-TU-into-cycle
 
diff --git a/ld/testsuite/ld-ctf/cross-tu-noncyclic.d b/ld/testsuite/ld-ctf/cross-tu-noncyclic.d
index 3ebc52dcb3b..28c2eb42459 100644
--- a/ld/testsuite/ld-ctf/cross-tu-noncyclic.d
+++ b/ld/testsuite/ld-ctf/cross-tu-noncyclic.d
@@ -3,7 +3,7 @@ 
 #as:
 #source: cross-tu-1.c
 #source: cross-tu-2.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: cross-TU-noncyclic
 
diff --git a/ld/testsuite/ld-ctf/cycle-1.d b/ld/testsuite/ld-ctf/cycle-1.d
index e64608e7571..379f12f57cd 100644
--- a/ld/testsuite/ld-ctf/cycle-1.d
+++ b/ld/testsuite/ld-ctf/cycle-1.d
@@ -3,7 +3,7 @@ 
 #source: A.c
 #source: B.c
 #source: C.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Cycle 1
 
diff --git a/ld/testsuite/ld-ctf/cycle-2.A.d b/ld/testsuite/ld-ctf/cycle-2.A.d
index 39d48c14c4b..ab3876c17d9 100644
--- a/ld/testsuite/ld-ctf/cycle-2.A.d
+++ b/ld/testsuite/ld-ctf/cycle-2.A.d
@@ -2,7 +2,7 @@ 
 #source: A.c
 #source: B.c
 #source: C.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Cycle 2.A
 
diff --git a/ld/testsuite/ld-ctf/cycle-2.B.d b/ld/testsuite/ld-ctf/cycle-2.B.d
index 4babd97bffe..65d702ec036 100644
--- a/ld/testsuite/ld-ctf/cycle-2.B.d
+++ b/ld/testsuite/ld-ctf/cycle-2.B.d
@@ -2,7 +2,7 @@ 
 #source: A.c
 #source: B.c
 #source: C.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Cycle 2.B
 
diff --git a/ld/testsuite/ld-ctf/cycle-2.C.d b/ld/testsuite/ld-ctf/cycle-2.C.d
index 757483ca7e2..81aa6dd71b2 100644
--- a/ld/testsuite/ld-ctf/cycle-2.C.d
+++ b/ld/testsuite/ld-ctf/cycle-2.C.d
@@ -2,7 +2,7 @@ 
 #source: A.c
 #source: B.c
 #source: C.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Cycle 2.C
 
diff --git a/ld/testsuite/ld-ctf/data-func-conflicted.d b/ld/testsuite/ld-ctf/data-func-conflicted.d
index f4f4fdd0e48..7a1b2d72234 100644
--- a/ld/testsuite/ld-ctf/data-func-conflicted.d
+++ b/ld/testsuite/ld-ctf/data-func-conflicted.d
@@ -1,7 +1,7 @@ 
 #as:
 #source: data-func-1.c
 #source: data-func-2.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared -s
 #name: Conflicted data syms, partially indexed, stripped
 
diff --git a/ld/testsuite/ld-ctf/diag-cttname-null.d b/ld/testsuite/ld-ctf/diag-cttname-null.d
index d1ca0b10c15..511908ea211 100644
--- a/ld/testsuite/ld-ctf/diag-cttname-null.d
+++ b/ld/testsuite/ld-ctf/diag-cttname-null.d
@@ -1,6 +1,6 @@ 
 #as:
 #source: diag-cttname-null.s
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Diagnostics - Null type name
 
diff --git a/ld/testsuite/ld-ctf/diag-cuname.d b/ld/testsuite/ld-ctf/diag-cuname.d
index e4d49267a2a..d858b5fa400 100644
--- a/ld/testsuite/ld-ctf/diag-cuname.d
+++ b/ld/testsuite/ld-ctf/diag-cuname.d
@@ -1,6 +1,6 @@ 
 #as:
 #source: diag-cuname.s
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Diagnostics - Invalid CU name offset
 
diff --git a/ld/testsuite/ld-ctf/diag-parlabel.d b/ld/testsuite/ld-ctf/diag-parlabel.d
index 9d2c0860997..892970b2fb6 100644
--- a/ld/testsuite/ld-ctf/diag-parlabel.d
+++ b/ld/testsuite/ld-ctf/diag-parlabel.d
@@ -1,6 +1,6 @@ 
 #as:
 #source: diag-parlabel.s
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Diagnostics - Non-zero parlabel in parent
 
diff --git a/ld/testsuite/ld-ctf/enum-forward.d b/ld/testsuite/ld-ctf/enum-forward.d
index a83651eb4b8..c53364e16fd 100644
--- a/ld/testsuite/ld-ctf/enum-forward.d
+++ b/ld/testsuite/ld-ctf/enum-forward.d
@@ -1,6 +1,6 @@ 
 #as:
 #source: enum-forward.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared
 #name: Forwards to enums
 
diff --git a/ld/testsuite/ld-ctf/enums.d b/ld/testsuite/ld-ctf/enums.d
index d36c7e19f7f..501c18f0b2c 100644
--- a/ld/testsuite/ld-ctf/enums.d
+++ b/ld/testsuite/ld-ctf/enums.d
@@ -1,6 +1,6 @@ 
 #as:
 #source: enums.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared
 #name: Enumerated types
 
diff --git a/ld/testsuite/ld-ctf/forward.d b/ld/testsuite/ld-ctf/forward.d
index bb929612125..5998ecb99bd 100644
--- a/ld/testsuite/ld-ctf/forward.d
+++ b/ld/testsuite/ld-ctf/forward.d
@@ -1,6 +1,6 @@ 
 #as:
 #source: forward.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared
 #name: Forwards
 
diff --git a/ld/testsuite/ld-ctf/function.d b/ld/testsuite/ld-ctf/function.d
index e6cb20951f4..66c67eb18b4 100644
--- a/ld/testsuite/ld-ctf/function.d
+++ b/ld/testsuite/ld-ctf/function.d
@@ -1,6 +1,6 @@ 
 #as:
 #source: function.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared
 #name: Function
 
diff --git a/ld/testsuite/ld-ctf/nonrepresentable.d b/ld/testsuite/ld-ctf/nonrepresentable.d
index 8461b54dead..610558f6605 100644
--- a/ld/testsuite/ld-ctf/nonrepresentable.d
+++ b/ld/testsuite/ld-ctf/nonrepresentable.d
@@ -1,7 +1,7 @@ 
 #as:
 #source: nonrepresentable-1.c
 #source: nonrepresentable-2.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared
 #name: Nonrepresentable types
 
diff --git a/ld/testsuite/ld-ctf/slice.d b/ld/testsuite/ld-ctf/slice.d
index 8973dcf05e1..838607fae73 100644
--- a/ld/testsuite/ld-ctf/slice.d
+++ b/ld/testsuite/ld-ctf/slice.d
@@ -1,6 +1,6 @@ 
 #as:
 #source: slice.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared --ctf-variables
 #name: Slice
 
diff --git a/ld/testsuite/ld-ctf/super-sub-cycles.d b/ld/testsuite/ld-ctf/super-sub-cycles.d
index 67fa358bc54..4eb009d0225 100644
--- a/ld/testsuite/ld-ctf/super-sub-cycles.d
+++ b/ld/testsuite/ld-ctf/super-sub-cycles.d
@@ -1,6 +1,6 @@ 
 #as:
 #source: super-sub-cycles.c
-#objdump: --ctf=.ctf
+#objdump: --ctf
 #ld: -shared
 #name: Super- and sub-cycles