From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id E844D388267C for ; Mon, 5 Jun 2023 15:32:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E844D388267C 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-pl1-x634.google.com with SMTP id d9443c01a7336-1b034ca1195so22383775ad.2 for ; Mon, 05 Jun 2023 08:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685979149; x=1688571149; 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=IxM1/gW45d7kEASv/4voGFdtUaqksqN7DIz2EcH5i2CWVIc2N+iKsmT8oIruEigpgg SaCNVhTP2Wkz6dqlCW5JdbBmA6yRonhnNYjUkf1lmakp6mOTb1x1eILT44TsbMuLDDqu 6QaZkZiCFMX2D7SsQLQs64TAXqTjtjjKOTajzD5//7a+GIXrCUOTV3JO/pYkJRlPfpJJ uiElmJeEwK23apfwltXtzopElMzvWZ8qhMjG8Cy2q80XwavwFxyfwFLXil2+RfKi1YMP 3G74vvunsNLCUwbeYAbFM4afkkP45whmNfOnx4BtojnHJ2Zfw311O5GNNAdM4rpCclhC R+Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685979149; x=1688571149; 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=AChz4v6s58g1+IfhpHIZcOo6TUqt+OcFGV8DaJRqnbknqNyY5OmNlVgg79j++eL03N 41stRRQicCWIqj84wgh6cPgLbo7olNucNsy5HLRDCvTct6buqK2bCIlLmch4DFkPLhSn /AFkZqt9uY0XOwOcW1+7JFSVlcLiSQBYVeSlBfqyD+y5k0ftaTvnu6TZXT3QtvEwy5iE +QDS97d+slNzkH+tvTun8PgsNkTVuTTb6VoTzB8BxwZisGPJkfUR7Qjy1RIUzUID5Hs5 vKbKjK1gBOpJwmmb0AKyY6R8AMi6kEQIWou0bvBQ4OvUUWueof0WQbG5bZpFBwERFS39 X6Ig== X-Gm-Message-State: AC+VfDzKw2mkpCILaqV9nysVWsMq1447c9ycbAbxc7bdxprFSUxVTrRP sqrZGpoWUaBpui742fNbhlc= X-Google-Smtp-Source: ACHHUZ5gCiSnJ20NenthqAFgGBW7G74bztc4/K0KaN/PpE+a+KnLr40mT3xVZy6dcydwsMBornzLcA== X-Received: by 2002:a17:902:a9c6:b0:1ac:7f56:de04 with SMTP id b6-20020a170902a9c600b001ac7f56de04mr2977058plr.45.1685979148864; Mon, 05 Jun 2023 08:32:28 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.160.123]) by smtp.gmail.com with ESMTPSA id w14-20020a170902e88e00b001aaf370b1c7sm6740358plg.278.2023.06.05.08.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 08:32:28 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 8E99874032F; Mon, 5 Jun 2023 08:32:25 -0700 (PDT) From: "H.J. Lu" To: binutils@sourceware.org Cc: Alan Modra , Kaylee Blake Subject: [PATCH v3 7/7] ld: Add -z nosectionheader test to bootstrap.exp Date: Mon, 5 Jun 2023 08:32:22 -0700 Message-Id: <20230605153222.1728119-8-hjl.tools@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230605153222.1728119-1-hjl.tools@gmail.com> References: <20230605153222.1728119-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