From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 007F338582BC for ; Tue, 6 Jun 2023 17:58:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 007F338582BC Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-64d24136685so4669076b3a.1 for ; Tue, 06 Jun 2023 10:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686074332; x=1688666332; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+w/XFqp1AH7F/ZPtN1MljK1VhBFQbFfGgkzyrv5Cwhs=; b=poYuO/6Iiorj289C5fTZEkHdXqbbaffvFnqbpPc9rfPkClyIHIaR2rbGHOK74fl0Yj RGtO8Ckpd4WZTAvjPicVKOtFMxLUs8vFtRQAm6ftEaWhoBQCbMd9HQgj649oIvPxI34Q y950EomTr9CGANuxSK40GXOsxd8eEcwEfEn+sR4OyF6UqKjfd/kuS6dctE3+CrlNlA06 9shYEkLSGVpL7cF/Gvi0880pqRZczZroDTB6m7+7vRPu8OUL0hCSB6+o1TCxiPeYOYLV WTx7ukcl5/YQXU0Df/zlTaOhdTVsSlGg2X+0s/ejf980C3uacT4COZi6JclYWv0Y63Rd FQ4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686074332; x=1688666332; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+w/XFqp1AH7F/ZPtN1MljK1VhBFQbFfGgkzyrv5Cwhs=; b=Zhew2z0xtUzAlnQnPX7pq76FlJvqIm9djZasjytQIh/UXz4UHhvs+1/O0okwlIlUhk 0KdnpW2a/tZNqSCUnW7hsT9em/xtE74XasGQQV6Uitui+OtRNy4sT15YJGcwmSMF7/72 67tL82mmNeygqMeh6t8a5ell6jQxzVZwMzMXLTWZlspQTvzU+Js5Ulqj6oy1BLpqRB6S 09NpFqEtiiohH/ZbBlTMdG1/Kr6Q1xn/cjNu7a3ujoPZVT+CxLnEMkEopTVHey9rqXJZ pBXEsS/k2ChiiLKMLDfCH3SIMvqLkK0+k+c3r37y6ySSXI/+MoO9iGe2W37c7wlbS5vz Ek4w== X-Gm-Message-State: AC+VfDxi9+e8QeHh5+fBWW+Z+Y/cgyaleYf6aD7LTd+BkbTWhzde22gz nIQ9Z9MmoTpNuODxdUxaHCI= X-Google-Smtp-Source: ACHHUZ6BWryu4L21WT1AOr7a09wr3FRSHEBTqMvdCQP9be/kFm0hgFKFpGhD9THMaoPUnbTtdLbxQQ== X-Received: by 2002:a05:6a20:42a9:b0:10c:322:72d5 with SMTP id o41-20020a056a2042a900b0010c032272d5mr449043pzj.23.1686074332012; Tue, 06 Jun 2023 10:58:52 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.160.123]) by smtp.gmail.com with ESMTPSA id x53-20020a056a000bf500b0064d59e194b3sm2545204pfu.113.2023.06.06.10.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 10:58:51 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 5F29674037D; Tue, 6 Jun 2023 10:58:49 -0700 (PDT) From: "H.J. Lu" To: binutils@sourceware.org Cc: Alan Modra , Florian Weimer , Kaylee Blake Subject: [PATCH v4 7/7] ld: Add -z nosectionheader test to bootstrap.exp Date: Tue, 6 Jun 2023 10:58:46 -0700 Message-Id: <20230606175846.399377-8-hjl.tools@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606175846.399377-1-hjl.tools@gmail.com> References: <20230606175846.399377-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3025.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: PR ld/25617 * testsuite/ld-bootstrap/bootstrap.exp: Add -z nosectionheader test. --- ld/testsuite/ld-bootstrap/bootstrap.exp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp index b189a0c7098..7b70b9582c0 100644 --- a/ld/testsuite/ld-bootstrap/bootstrap.exp +++ b/ld/testsuite/ld-bootstrap/bootstrap.exp @@ -66,6 +66,9 @@ set test_flags {"" "strip" "--static" "-Wl,--traditional-format" if { [istarget "powerpc-*-*"] } { lappend test_flags "-Wl,--ppc476-workaround" } +if { [is_elf_format] && ![is_bad_symtab] } { + lappend test_flags "-Wl,-z,nosectionheader" +} set gcc_B_opt_save $gcc_B_opt @@ -94,9 +97,12 @@ foreach flags $test_flags { set testname "bootstrap" }} - # --static is meaningless and --relax is incompatible with -r. + # --static is meaningless. --relax and -z nosectionheader are + # incompatible with -r. regsub -- "-Wl," $flags "" partial_flags - if { "$partial_flags" == "--static" || "$partial_flags" == "--relax" } { + if { "$partial_flags" == "--static" \ + || "$partial_flags" == "--relax" \ + || [string match "*nosectionheader*" "$partial_flags"] } { set partial_flags "" } -- 2.40.1