[PATCH 1/1] Fix ld error due to lto shared not support.
jiawei
jiawei@iscas.ac.cn
Tue Dec 21 09:28:59 GMT 2021
Fix missing xfail cases when shared lib not support but ust '-shared',
like case 'ld/testsuite/ld-elf/property-and-1.d', add check lto shared available when generate 'pr28264.so' by 'ld/testsuite/ld-plugin/lto.exp'.
ld/ChangeLog:
* testsuite/ld-ctf/array.d: Add xfail case.
* testsuite/ld-ctf/conflicting-cycle-1.B-1.d: Ditto.
* testsuite/ld-ctf/conflicting-cycle-1.B-2.d: Ditto.
* testsuite/ld-ctf/conflicting-cycle-1.parent.d: Ditto.
* testsuite/ld-ctf/conflicting-cycle-2.A-1.d: Ditto.
* testsuite/ld-ctf/conflicting-cycle-2.A-2.d: Ditto.
* testsuite/ld-ctf/conflicting-cycle-2.parent.d: Ditto.
* testsuite/ld-ctf/conflicting-cycle-3.C-1.d: Ditto.
* testsuite/ld-ctf/conflicting-cycle-3.C-2.d: Ditto.
* testsuite/ld-ctf/conflicting-cycle-3.parent.d: Ditto.
* testsuite/ld-ctf/conflicting-enums.d: Ditto.
* testsuite/ld-ctf/conflicting-typedefs.d: Ditto.
* testsuite/ld-ctf/cross-tu-cyclic-conflicting.d: Ditto.
* testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d: Ditto.
* testsuite/ld-ctf/cross-tu-into-cycle.d: Ditto.
* testsuite/ld-ctf/cross-tu-noncyclic.d: Ditto.
* testsuite/ld-ctf/cycle-1.d: Ditto.
* testsuite/ld-ctf/cycle-2.A.d: Ditto.
* testsuite/ld-ctf/cycle-2.B.d: Ditto.
* testsuite/ld-ctf/cycle-2.C.d: Ditto.
* testsuite/ld-ctf/data-func-conflicted.d: Ditto.
* testsuite/ld-ctf/diag-ctf-version-0.d: Ditto.
* testsuite/ld-ctf/diag-ctf-version-2-unsupported-feature.d: Ditto.
* testsuite/ld-ctf/diag-ctf-version-f.d: Ditto.
* testsuite/ld-ctf/diag-cttname-invalid.d: Ditto.
* testsuite/ld-ctf/diag-cttname-null.d: Ditto.
* testsuite/ld-ctf/diag-cuname.d: Ditto.
* testsuite/ld-ctf/diag-decompression-failure.d: Ditto.
* testsuite/ld-ctf/diag-parlabel.d: Ditto.
* testsuite/ld-ctf/diag-parname.d: Ditto.
* testsuite/ld-ctf/diag-unsupported-flag.d: Ditto.
* testsuite/ld-ctf/diag-wrong-magic-number-mixed.d: Ditto.
* testsuite/ld-ctf/diag-wrong-magic-number.d: Ditto.
* testsuite/ld-ctf/enum-forward.d: Ditto.
* testsuite/ld-ctf/enums.d: Ditto.
* testsuite/ld-ctf/forward.d: Ditto.
* testsuite/ld-ctf/function.d: Ditto.
* testsuite/ld-ctf/nonrepresentable-member.d: Ditto.
* testsuite/ld-ctf/nonrepresentable.d: Ditto.
* testsuite/ld-ctf/slice.d: Ditto.
* testsuite/ld-ctf/super-sub-cycles.d: Ditto.
* testsuite/ld-plugin/lto.exp: Check lto shared available.
---
ld/testsuite/ld-ctf/array.d | 3 ++-
ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d | 1 +
ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d | 1 +
ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d | 1 +
ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d | 1 +
ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d | 1 +
ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d | 1 +
ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d | 1 +
ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d | 1 +
ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d | 1 +
ld/testsuite/ld-ctf/conflicting-enums.d | 1 +
ld/testsuite/ld-ctf/conflicting-typedefs.d | 1 +
ld/testsuite/ld-ctf/cross-tu-cyclic-conflicting.d | 1 +
ld/testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d | 1 +
ld/testsuite/ld-ctf/cross-tu-into-cycle.d | 1 +
ld/testsuite/ld-ctf/cross-tu-noncyclic.d | 1 +
ld/testsuite/ld-ctf/cycle-1.d | 1 +
ld/testsuite/ld-ctf/cycle-2.A.d | 1 +
ld/testsuite/ld-ctf/cycle-2.B.d | 1 +
ld/testsuite/ld-ctf/cycle-2.C.d | 1 +
ld/testsuite/ld-ctf/data-func-conflicted.d | 1 +
ld/testsuite/ld-ctf/diag-ctf-version-0.d | 1 +
ld/testsuite/ld-ctf/diag-ctf-version-2-unsupported-feature.d | 1 +
ld/testsuite/ld-ctf/diag-ctf-version-f.d | 1 +
ld/testsuite/ld-ctf/diag-cttname-invalid.d | 1 +
ld/testsuite/ld-ctf/diag-cttname-null.d | 1 +
ld/testsuite/ld-ctf/diag-cuname.d | 1 +
ld/testsuite/ld-ctf/diag-decompression-failure.d | 1 +
ld/testsuite/ld-ctf/diag-parlabel.d | 1 +
ld/testsuite/ld-ctf/diag-parname.d | 1 +
ld/testsuite/ld-ctf/diag-unsupported-flag.d | 1 +
ld/testsuite/ld-ctf/diag-wrong-magic-number-mixed.d | 1 +
ld/testsuite/ld-ctf/diag-wrong-magic-number.d | 1 +
ld/testsuite/ld-ctf/enum-forward.d | 1 +
ld/testsuite/ld-ctf/enums.d | 1 +
ld/testsuite/ld-ctf/forward.d | 1 +
ld/testsuite/ld-ctf/function.d | 1 +
ld/testsuite/ld-ctf/nonrepresentable-member.d | 1 +
ld/testsuite/ld-ctf/nonrepresentable.d | 1 +
ld/testsuite/ld-ctf/slice.d | 1 +
ld/testsuite/ld-ctf/super-sub-cycles.d | 1 +
ld/testsuite/ld-plugin/lto.exp | 2 +-
42 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/ld/testsuite/ld-ctf/array.d b/ld/testsuite/ld-ctf/array.d
index 0fe675e2c5d..7a02de49ef9 100644
--- a/ld/testsuite/ld-ctf/array.d
+++ b/ld/testsuite/ld-ctf/array.d
@@ -2,8 +2,9 @@
#source: array-char.c
#source: array-int.c
#objdump: --ctf
-#ld: -shared --ctf-variables --hash-style=sysv
+#ld: --ctf-variables --hash-style=sysv
#name: Arrays
+#xfail: ![check_shared_lib_support]
.*: +file format .*
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 2ed3ce19401..92230d94349 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d
@@ -7,6 +7,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Conflicting cycle 1.B-1
+#xfail: ![check_shared_lib_support]
.*: +file format .*
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 3b9b7f627d2..3a7c34a5b5f 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d
@@ -7,6 +7,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Conflicting cycle 1.B-2
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d b/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d
index 83c56fe145c..0189f4868b7 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d
@@ -7,6 +7,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Conflicting cycle 1.parent
+#xfail: ![check_shared_lib_support]
.*: +file format .*
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 6a07d368b74..165d57ec3b9 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d
@@ -9,6 +9,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Conflicting cycle 2.A-1
+#xfail: ![check_shared_lib_support]
.*: +file format .*
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 677542199b0..73d3c6a1428 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d
@@ -9,6 +9,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Conflicting cycle 2.A-2
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d b/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d
index 30be9b03ee4..3027e2c284b 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d
@@ -9,6 +9,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Conflicting cycle 2.parent
+#xfail: ![check_shared_lib_support]
.*: +file format .*
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 b60768fc7a7..f1a48f721a3 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
@@ -8,6 +8,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Conflicting cycle 3.C-1
+#xfail: ![check_shared_lib_support]
.*: +file format .*
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 590d3734887..633ee31bdb9 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d
@@ -8,6 +8,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Conflicting cycle 3.C-2
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d b/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d
index dbe2e46786f..b140963927d 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d
@@ -8,6 +8,7 @@
#objdump: --ctf
#ld: -shared
#name: Conflicting cycle 3
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/conflicting-enums.d b/ld/testsuite/ld-ctf/conflicting-enums.d
index 4f8cf812ee4..c17ee04dfe4 100644
--- a/ld/testsuite/ld-ctf/conflicting-enums.d
+++ b/ld/testsuite/ld-ctf/conflicting-enums.d
@@ -4,6 +4,7 @@
#objdump: --ctf
#ld: -shared
#name: Conflicting Enums
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/conflicting-typedefs.d b/ld/testsuite/ld-ctf/conflicting-typedefs.d
index 4ae8de41364..a5980416c2d 100644
--- a/ld/testsuite/ld-ctf/conflicting-typedefs.d
+++ b/ld/testsuite/ld-ctf/conflicting-typedefs.d
@@ -4,6 +4,7 @@
#objdump: --ctf
#ld: -shared
#name: Conflicting Typedefs
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/cross-tu-cyclic-conflicting.d b/ld/testsuite/ld-ctf/cross-tu-cyclic-conflicting.d
index 0fba1b494ca..51abfe0dda7 100644
--- a/ld/testsuite/ld-ctf/cross-tu-cyclic-conflicting.d
+++ b/ld/testsuite/ld-ctf/cross-tu-cyclic-conflicting.d
@@ -6,6 +6,7 @@
#objdump: --ctf
#ld: -shared
#name: cross-TU-cyclic-conflicting
+#xfail: ![check_shared_lib_support]
.*: file format .*
diff --git a/ld/testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d b/ld/testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d
index c83789a9965..c1df6d4268b 100644
--- a/ld/testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d
+++ b/ld/testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d
@@ -8,6 +8,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: cross-TU-cyclic-nonconflicting
+#xfail: ![check_shared_lib_support]
.*: file format .*
diff --git a/ld/testsuite/ld-ctf/cross-tu-into-cycle.d b/ld/testsuite/ld-ctf/cross-tu-into-cycle.d
index 903dedbb389..fcea55bbdce 100644
--- a/ld/testsuite/ld-ctf/cross-tu-into-cycle.d
+++ b/ld/testsuite/ld-ctf/cross-tu-into-cycle.d
@@ -10,6 +10,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: cross-TU-into-cycle
+#xfail: ![check_shared_lib_support]
.*: file format .*
diff --git a/ld/testsuite/ld-ctf/cross-tu-noncyclic.d b/ld/testsuite/ld-ctf/cross-tu-noncyclic.d
index 28c2eb42459..3148204c920 100644
--- a/ld/testsuite/ld-ctf/cross-tu-noncyclic.d
+++ b/ld/testsuite/ld-ctf/cross-tu-noncyclic.d
@@ -6,6 +6,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: cross-TU-noncyclic
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/cycle-1.d b/ld/testsuite/ld-ctf/cycle-1.d
index 379f12f57cd..cf0bb829733 100644
--- a/ld/testsuite/ld-ctf/cycle-1.d
+++ b/ld/testsuite/ld-ctf/cycle-1.d
@@ -6,6 +6,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Cycle 1
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/cycle-2.A.d b/ld/testsuite/ld-ctf/cycle-2.A.d
index ab3876c17d9..92a6d81e8f5 100644
--- a/ld/testsuite/ld-ctf/cycle-2.A.d
+++ b/ld/testsuite/ld-ctf/cycle-2.A.d
@@ -5,6 +5,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Cycle 2.A
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/cycle-2.B.d b/ld/testsuite/ld-ctf/cycle-2.B.d
index 65d702ec036..33031233f3b 100644
--- a/ld/testsuite/ld-ctf/cycle-2.B.d
+++ b/ld/testsuite/ld-ctf/cycle-2.B.d
@@ -5,6 +5,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Cycle 2.B
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/cycle-2.C.d b/ld/testsuite/ld-ctf/cycle-2.C.d
index 81aa6dd71b2..eb1bb04a283 100644
--- a/ld/testsuite/ld-ctf/cycle-2.C.d
+++ b/ld/testsuite/ld-ctf/cycle-2.C.d
@@ -5,6 +5,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Cycle 2.C
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/data-func-conflicted.d b/ld/testsuite/ld-ctf/data-func-conflicted.d
index 7a1b2d72234..0b6c68bbcf9 100644
--- a/ld/testsuite/ld-ctf/data-func-conflicted.d
+++ b/ld/testsuite/ld-ctf/data-func-conflicted.d
@@ -4,6 +4,7 @@
#objdump: --ctf
#ld: -shared -s
#name: Conflicted data syms, partially indexed, stripped
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/diag-ctf-version-0.d b/ld/testsuite/ld-ctf/diag-ctf-version-0.d
index 4e7402ccd71..e38682a2a6c 100644
--- a/ld/testsuite/ld-ctf/diag-ctf-version-0.d
+++ b/ld/testsuite/ld-ctf/diag-ctf-version-0.d
@@ -3,3 +3,4 @@
#ld: -shared
#name: Diagnostics - CTF version 0
#warning: CTF section .* not loaded; its types will be discarded: .*
+#xfail: ![check_shared_lib_support]
diff --git a/ld/testsuite/ld-ctf/diag-ctf-version-2-unsupported-feature.d b/ld/testsuite/ld-ctf/diag-ctf-version-2-unsupported-feature.d
index e494810e8ca..d1564e3b2ea 100644
--- a/ld/testsuite/ld-ctf/diag-ctf-version-2-unsupported-feature.d
+++ b/ld/testsuite/ld-ctf/diag-ctf-version-2-unsupported-feature.d
@@ -3,3 +3,4 @@
#ld: -shared
#name: Diagnostics - CTF version 2 with unsupported feature
#warning: CTF section .* not loaded; its types will be discarded: .*
+#xfail: ![check_shared_lib_support]
diff --git a/ld/testsuite/ld-ctf/diag-ctf-version-f.d b/ld/testsuite/ld-ctf/diag-ctf-version-f.d
index 811ed5b017b..6a12c9b5d2d 100644
--- a/ld/testsuite/ld-ctf/diag-ctf-version-f.d
+++ b/ld/testsuite/ld-ctf/diag-ctf-version-f.d
@@ -3,3 +3,4 @@
#ld: -shared
#name: Diagnostics - Unsupported CTF version
#warning: CTF section .* not loaded; its types will be discarded: CTF dict version is too new for libctf
+#xfail: ![check_shared_lib_support]
diff --git a/ld/testsuite/ld-ctf/diag-cttname-invalid.d b/ld/testsuite/ld-ctf/diag-cttname-invalid.d
index 8755c7e6664..d562d956cdd 100644
--- a/ld/testsuite/ld-ctf/diag-cttname-invalid.d
+++ b/ld/testsuite/ld-ctf/diag-cttname-invalid.d
@@ -3,3 +3,4 @@
#ld: -shared
#name: Diagnostics - Invalid type name.
#warning: CTF section in .*not loaded; its types will be discarded: String name offset is corrupt
+#xfail: ![check_shared_lib_support]
diff --git a/ld/testsuite/ld-ctf/diag-cttname-null.d b/ld/testsuite/ld-ctf/diag-cttname-null.d
index 511908ea211..d64f4d724c0 100644
--- a/ld/testsuite/ld-ctf/diag-cttname-null.d
+++ b/ld/testsuite/ld-ctf/diag-cttname-null.d
@@ -3,6 +3,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Diagnostics - Null type name
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/diag-cuname.d b/ld/testsuite/ld-ctf/diag-cuname.d
index d858b5fa400..ba798bb5104 100644
--- a/ld/testsuite/ld-ctf/diag-cuname.d
+++ b/ld/testsuite/ld-ctf/diag-cuname.d
@@ -3,6 +3,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Diagnostics - Invalid CU name offset
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/diag-decompression-failure.d b/ld/testsuite/ld-ctf/diag-decompression-failure.d
index 1deeea18044..cfb394b2a13 100644
--- a/ld/testsuite/ld-ctf/diag-decompression-failure.d
+++ b/ld/testsuite/ld-ctf/diag-decompression-failure.d
@@ -3,3 +3,4 @@
#ld: -shared
#name: Diagnostics - Decompression failure
#warning: CTF section.* not loaded; its types will be discarded: Failed to decompress CTF data
+#xfail: ![check_shared_lib_support]
diff --git a/ld/testsuite/ld-ctf/diag-parlabel.d b/ld/testsuite/ld-ctf/diag-parlabel.d
index 892970b2fb6..cadc0b6c1ca 100644
--- a/ld/testsuite/ld-ctf/diag-parlabel.d
+++ b/ld/testsuite/ld-ctf/diag-parlabel.d
@@ -3,6 +3,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Diagnostics - Non-zero parlabel in parent
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/diag-parname.d b/ld/testsuite/ld-ctf/diag-parname.d
index f8fcd683a9d..56d3d27f608 100644
--- a/ld/testsuite/ld-ctf/diag-parname.d
+++ b/ld/testsuite/ld-ctf/diag-parname.d
@@ -3,3 +3,4 @@
#ld: -shared --ctf-variables
#name: Diagnostics - No parent dictionary
#warning: CTF linking failed; output will have no CTF section: The parent CTF dictionary is unavailable
+#xfail: ![check_shared_lib_support]
diff --git a/ld/testsuite/ld-ctf/diag-unsupported-flag.d b/ld/testsuite/ld-ctf/diag-unsupported-flag.d
index 6b7a359e78c..e99a137dd56 100644
--- a/ld/testsuite/ld-ctf/diag-unsupported-flag.d
+++ b/ld/testsuite/ld-ctf/diag-unsupported-flag.d
@@ -3,3 +3,4 @@
#ld: -shared
#name: Diagnostics - Unsupported flag
#warning: CTF section.* not loaded; its types will be discarded: CTF header contains flags unknown to libctf
+#xfail: ![check_shared_lib_support]
diff --git a/ld/testsuite/ld-ctf/diag-wrong-magic-number-mixed.d b/ld/testsuite/ld-ctf/diag-wrong-magic-number-mixed.d
index 668fa15bf49..8100bde1fe0 100644
--- a/ld/testsuite/ld-ctf/diag-wrong-magic-number-mixed.d
+++ b/ld/testsuite/ld-ctf/diag-wrong-magic-number-mixed.d
@@ -4,6 +4,7 @@
#ld: -shared --ctf-variables
#name: Diagnostics - Wrong magic number mixed with valid CTF sections
#warning: CTF section in .* not loaded; its types will be discarded: Buffer does not contain CTF data
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/diag-wrong-magic-number.d b/ld/testsuite/ld-ctf/diag-wrong-magic-number.d
index 0c27b0c996e..a000ead700e 100644
--- a/ld/testsuite/ld-ctf/diag-wrong-magic-number.d
+++ b/ld/testsuite/ld-ctf/diag-wrong-magic-number.d
@@ -3,3 +3,4 @@
#ld: -shared
#name: Diagnostics - Wrong magic number
#warning: CTF section in .* not loaded; its types will be discarded: Buffer does not contain CTF data
+#xfail: ![check_shared_lib_support]
diff --git a/ld/testsuite/ld-ctf/enum-forward.d b/ld/testsuite/ld-ctf/enum-forward.d
index c53364e16fd..65276bd89e0 100644
--- a/ld/testsuite/ld-ctf/enum-forward.d
+++ b/ld/testsuite/ld-ctf/enum-forward.d
@@ -3,6 +3,7 @@
#objdump: --ctf
#ld: -shared
#name: Forwards to enums
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/enums.d b/ld/testsuite/ld-ctf/enums.d
index 501c18f0b2c..8c9fe0ed77d 100644
--- a/ld/testsuite/ld-ctf/enums.d
+++ b/ld/testsuite/ld-ctf/enums.d
@@ -3,6 +3,7 @@
#objdump: --ctf
#ld: -shared
#name: Enumerated types
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/forward.d b/ld/testsuite/ld-ctf/forward.d
index 5998ecb99bd..fcdc6da3924 100644
--- a/ld/testsuite/ld-ctf/forward.d
+++ b/ld/testsuite/ld-ctf/forward.d
@@ -3,6 +3,7 @@
#objdump: --ctf
#ld: -shared
#name: Forwards
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/function.d b/ld/testsuite/ld-ctf/function.d
index 66c67eb18b4..6ac8e1cab9a 100644
--- a/ld/testsuite/ld-ctf/function.d
+++ b/ld/testsuite/ld-ctf/function.d
@@ -3,6 +3,7 @@
#objdump: --ctf
#ld: -shared
#name: Function
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/nonrepresentable-member.d b/ld/testsuite/ld-ctf/nonrepresentable-member.d
index 6c76253a8c1..b1eb0c13ed4 100644
--- a/ld/testsuite/ld-ctf/nonrepresentable-member.d
+++ b/ld/testsuite/ld-ctf/nonrepresentable-member.d
@@ -3,6 +3,7 @@
#objdump: --ctf
#ld: -shared
#name: Nonrepresentable members
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/nonrepresentable.d b/ld/testsuite/ld-ctf/nonrepresentable.d
index 610558f6605..2464f841bd2 100644
--- a/ld/testsuite/ld-ctf/nonrepresentable.d
+++ b/ld/testsuite/ld-ctf/nonrepresentable.d
@@ -4,6 +4,7 @@
#objdump: --ctf
#ld: -shared
#name: Nonrepresentable types
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/slice.d b/ld/testsuite/ld-ctf/slice.d
index 838607fae73..7c7b65c8360 100644
--- a/ld/testsuite/ld-ctf/slice.d
+++ b/ld/testsuite/ld-ctf/slice.d
@@ -3,6 +3,7 @@
#objdump: --ctf
#ld: -shared --ctf-variables
#name: Slice
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-ctf/super-sub-cycles.d b/ld/testsuite/ld-ctf/super-sub-cycles.d
index 4eb009d0225..24ab5dc7bd8 100644
--- a/ld/testsuite/ld-ctf/super-sub-cycles.d
+++ b/ld/testsuite/ld-ctf/super-sub-cycles.d
@@ -3,6 +3,7 @@
#objdump: --ctf
#ld: -shared
#name: Super- and sub-cycles
+#xfail: ![check_shared_lib_support]
.*: +file format .*
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 51e01046a12..e63e7916531 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -233,7 +233,7 @@ set lto_link_tests [list \
[list [list "nm" "$plug_opt" "pr26389.d"]]] \
]
-if { [at_least_gcc_version 10 0] } {
+if { [at_least_gcc_version 10 0] && [check_lto_shared_available] } {
set lto_link_tests [concat $lto_link_tests [list \
[list "pr25355.o" \
"" \
--
2.25.1
More information about the Binutils
mailing list