* [PATCH 0/1] Fix ld error due to lto shared not support. @ 2021-12-21 9:28 jiawei 2021-12-21 9:28 ` [PATCH 1/1] " jiawei 0 siblings, 1 reply; 5+ messages in thread From: jiawei @ 2021-12-21 9:28 UTC (permalink / raw) To: binutils Cc: kito.cheng, nelson.chu, jim.wilson.gcc, palmer, cmuellner, philipp.tomsich, lazyparser, sinan, shihua, yulong, jiawei When target lto shared not support, these testcase report error and not work right. So add xfail case if lto shared support not available. jiawei (1): Fix ld error due to lto shared not support. 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(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] Fix ld error due to lto shared not support. 2021-12-21 9:28 [PATCH 0/1] Fix ld error due to lto shared not support jiawei @ 2021-12-21 9:28 ` jiawei 2021-12-22 12:20 ` Nelson Chu 0 siblings, 1 reply; 5+ messages in thread From: jiawei @ 2021-12-21 9:28 UTC (permalink / raw) To: binutils Cc: kito.cheng, nelson.chu, jim.wilson.gcc, palmer, cmuellner, philipp.tomsich, lazyparser, sinan, shihua, yulong, jiawei 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] Fix ld error due to lto shared not support. 2021-12-21 9:28 ` [PATCH 1/1] " jiawei @ 2021-12-22 12:20 ` Nelson Chu 2022-01-05 17:39 ` Nick Alcock 0 siblings, 1 reply; 5+ messages in thread From: Nelson Chu @ 2021-12-22 12:20 UTC (permalink / raw) To: jiawei Cc: Binutils, Kito Cheng, Jim Wilson, Palmer Dabbelt, cmuellner, Philipp Tomsich, Wei Wu (吴伟), sinan, shihua, yulong, Nick Alcock Added Nick Alcock in the cc list :) On Tue, Dec 21, 2021 at 5:29 PM jiawei <jiawei@iscas.ac.cn> wrote: > > 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 + I notice that there are 41 ld-ctf testcases, and all of them need -shared option, so we probably can just add the following check in the ctf.exp, if ![check_shared_lib_support] { return 0 } So that we don't run these testcases when the ld doesn't support the -shared option, and you don't need to modify the whole 41 testcases. > 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 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] Fix ld error due to lto shared not support. 2021-12-22 12:20 ` Nelson Chu @ 2022-01-05 17:39 ` Nick Alcock 2022-01-06 2:45 ` Nelson Chu 0 siblings, 1 reply; 5+ messages in thread From: Nick Alcock @ 2022-01-05 17:39 UTC (permalink / raw) To: Nelson Chu Cc: jiawei, Binutils, Kito Cheng, Jim Wilson, Palmer Dabbelt, cmuellner, Philipp Tomsich, Wei Wu (吴伟), sinan, shihua, yulong, Nick Alcock On 22 Dec 2021, Nelson Chu verbalised: > Added Nick Alcock in the cc list :) Thanks! > On Tue, Dec 21, 2021 at 5:29 PM jiawei <jiawei@iscas.ac.cn> wrote: > I notice that there are 41 ld-ctf testcases, and all of them need > -shared option, so we probably can just add the following check in the > ctf.exp, > > if ![check_shared_lib_support] { > return 0 > } > > So that we don't run these testcases when the ld doesn't support the > -shared option, and you don't need to modify the whole 41 testcases. Sure! Many of them (but not all) would be just as happy with -Wl,-Bdynamic, but that seems likely to be less widely available than -shared... >> 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 ... did you mean to do this? (A bunch of tests in the libctf testsuite may need similar changes.) -- NULL && (void) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] Fix ld error due to lto shared not support. 2022-01-05 17:39 ` Nick Alcock @ 2022-01-06 2:45 ` Nelson Chu 0 siblings, 0 replies; 5+ messages in thread From: Nelson Chu @ 2022-01-06 2:45 UTC (permalink / raw) To: Nick Alcock Cc: jiawei, Binutils, Kito Cheng, Jim Wilson, Palmer Dabbelt, cmuellner, Philipp Tomsich, Wei Wu (吴伟), sinan, shihua, yulong On Thu, Jan 6, 2022 at 1:39 AM Nick Alcock <nick.alcock@oracle.com> wrote: > > On 22 Dec 2021, Nelson Chu verbalised: > > Added Nick Alcock in the cc list :) > > Thanks! > > > On Tue, Dec 21, 2021 at 5:29 PM jiawei <jiawei@iscas.ac.cn> wrote: > > I notice that there are 41 ld-ctf testcases, and all of them need > > -shared option, so we probably can just add the following check in the > > ctf.exp, > > > > if ![check_shared_lib_support] { > > return 0 > > } > > > > So that we don't run these testcases when the ld doesn't support the > > -shared option, and you don't need to modify the whole 41 testcases. > > Sure! Thanks! > Many of them (but not all) would be just as happy with -Wl,-Bdynamic, > but that seems likely to be less widely available than -shared... > > >> 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 > > ... did you mean to do this? > > (A bunch of tests in the libctf testsuite may need similar changes.) Umm should this have been accidentally changed? Anyway, seems like the new v2 version have fixed this: https://sourceware.org/pipermail/binutils/2021-December/119001.html Thanks! Nelson ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-06 2:45 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-12-21 9:28 [PATCH 0/1] Fix ld error due to lto shared not support jiawei 2021-12-21 9:28 ` [PATCH 1/1] " jiawei 2021-12-22 12:20 ` Nelson Chu 2022-01-05 17:39 ` Nick Alcock 2022-01-06 2:45 ` Nelson Chu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).