From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) by sourceware.org (Postfix) with ESMTPS id D95B03858D35 for ; Wed, 22 Dec 2021 12:20:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D95B03858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-ua1-x935.google.com with SMTP id n7so3761803uaq.12 for ; Wed, 22 Dec 2021 04:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hJxMYNI85Un755IECfZal4gZmS8QD2esYprEOuzoBSU=; b=RblA1BCCLs6TgWNZWdf+FBX5w/EWv7OlHQq51qEMW6Ev4AzEeqAbvWMQA7IG145kE6 kEDAl9Qw4YDpelUWVhPYnkRedZEBC04251I8x/lnnppYogktOq5OAwKGAQrLhh/ygVky QSGfIW+JelpgtTNyxTZ9HZzOK6IRHz6YpVfSiOZ1UTulf7tXKKaOFmE/ezRxaSf9HLeY yjwYL4VYkJUAomUriT6w78ag1HjPJCw+/OZ6u1ywrARy41FUYfY8sV/Zo8eDYYHxE/uV wuQHKcd3M7gDcncygryUj/j9znCRdXbN12JCXymWqYBSPx7wtStG+W7GEvGwmtDrnBpw mTFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hJxMYNI85Un755IECfZal4gZmS8QD2esYprEOuzoBSU=; b=dP0vVaDLoGPIJdHdM0qG5WUVMIx5MJBlsjmsbdX1r9Wspz1w8ctiFkSHVdVd/nquYT XaLn/JyJmAifB1YK0PKID1AKITAtqUP+lPziAPeCcgywk8fBbyG42Dm7mqlJeS5p/bpS Kp4m3lS9+Nifh1HvxPYsHy4/y1WJYwxYVVfIzu4VBOuDzuaVrxICt8pv55c6i+/bno2n A8S7NJ1eDyPn1htWgPBzcNinSCN7Zk01JN77nyChgl1DwzNUBVH/3rhQT8o9lylSXfwV Ghk88yxrlr3g4vjG2EfuRhtVrMYlhn4J/5t8qvy8fOyiG1B8BVf2cEjmTRWq6WyQ7Xza 4OqQ== X-Gm-Message-State: AOAM532hpkNb2MwX8FPg9HOHShbczalnPm8wPocvxVTherEunjcozEXc 8i5CqLxZByp9Fo8wBykRKVHjRPKab+l3Vm+jObujNQ== X-Google-Smtp-Source: ABdhPJzd7ULG3lWDE4s3AXSOZoAh2LXGTF3E96FqNcjIh+BKnwkPNFnHpsqxmD4lTD6Ff1XQxw5WuTCsB2DTx/I9zaE= X-Received: by 2002:ab0:5a0e:: with SMTP id l14mr842447uad.8.1640175650153; Wed, 22 Dec 2021 04:20:50 -0800 (PST) MIME-Version: 1.0 References: <20211221092859.1642264-1-jiawei@iscas.ac.cn> <20211221092859.1642264-2-jiawei@iscas.ac.cn> In-Reply-To: <20211221092859.1642264-2-jiawei@iscas.ac.cn> From: Nelson Chu Date: Wed, 22 Dec 2021 20:20:39 +0800 Message-ID: Subject: Re: [PATCH 1/1] Fix ld error due to lto shared not support. To: jiawei Cc: Binutils , Kito Cheng , Jim Wilson , Palmer Dabbelt , cmuellner@ventanamicro.com, Philipp Tomsich , =?UTF-8?B?V2VpIFd1ICjlkLTkvJ8p?= , sinan@isrc.iscas.ac.cn, shihua@iscas.ac.cn, yulong@nj.iscas.ac.cn, Nick Alcock Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2021 12:20:53 -0000 Added Nick Alcock in the cc list :) On Tue, Dec 21, 2021 at 5:29 PM jiawei 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 >