[PATCH 1/4] ld, testsuite: do not run CTF tests at all on non-ELF for now

Nick Alcock nick.alcock@oracle.com
Wed Jul 22 09:39:23 GMT 2020


Right now, the linker is not emitting CTF sections on (at least some)
non-ELF platforms, because work similar to that done for ELF needs to be
done to each platform in turn to emit linker-generated sections whose
contents are programmatically derived.  (Or something better needs to be
done.)

So, for now, the CTF tests will fail on non-ELF for lack of a .ctf
section in the output: so skip the CTF tests there temporarily.
(This is not the same as the permanent skip of the diags tests, which is
done because the input for those is assembler that depends on the ELF
syntax of pseudos like .section: this is only a temporary skip, until
the linker grows support for CTF on more targets.)

ld/
	* testsuite/ld-ctf/ctf.exp: Skip on non-ELF for now.
---
 ld/testsuite/ld-ctf/ctf.exp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ld/testsuite/ld-ctf/ctf.exp b/ld/testsuite/ld-ctf/ctf.exp
index 5d177afef0d..be4c6ed3d6e 100644
--- a/ld/testsuite/ld-ctf/ctf.exp
+++ b/ld/testsuite/ld-ctf/ctf.exp
@@ -23,6 +23,11 @@ if [skip_ctf_tests] {
     return 0
 }
 
+if ![is_elf_format] {
+    unsupported "CTF needs bfd changes to be emitted on non-ELF"
+    return 0
+}
+
 set ctf_test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
 
 foreach ctf_test $ctf_test_list {
-- 
2.27.0.247.g3dff7de930



More information about the Binutils mailing list