From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id 82525386FC3D for ; Sat, 3 Jul 2021 20:14:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 82525386FC3D Received: by mail-pj1-x1036.google.com with SMTP id b14-20020a17090a7aceb029017261c7d206so5808294pjl.5 for ; Sat, 03 Jul 2021 13:14:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5HU3whuZmLetgwYXyE+JOKQunXiIC22M+Qh7fmKomvk=; b=Y81dIWnuEjLgaedRAcu1Yv/GZI0JSeBvmptZijqdjqdiRUQCpGtaaZW/IPcrXLepHC 4Zhx02Fl2FZhe5HrQglqiLH5pk/v9GrjCuJeItxl7CTnvyBoNUzdyDR6ej1/5o3VK9Us 6neJ737G4hIb6DAmEYKTTm1pbAALJTRNg5xHkD69AciUjdSZuAUX4Z0EcEpsoQTvVPM6 qGoFO+CJDLtTH7GAGNkCfMSF3S1PMyE4y8IcYE2VCUczKKYNau4S4Tdl7fDOy2VB5PO0 HPkJWynqR4Osz4djrZ11TldHocg1zheb2JnxIDEVPHB9CTBL+6NukvhUzEY3YvHsq6NH awww== X-Gm-Message-State: AOAM531ZUsIdYDV8pHU5bKhQRdFfJYQEdAvoOuXAEQf2Mr5SkS38jMU4 2QGrvIB1WB13u007od43Skw= X-Google-Smtp-Source: ABdhPJwQw1ARCt2lJKQICe92SFCABPlByC2ggHxwUooy+1Ra/Kb2DkG0a61yGC0XLgop07WrUW+i3Q== X-Received: by 2002:a17:902:d213:b029:127:9520:7649 with SMTP id t19-20020a170902d213b029012795207649mr5326388ply.10.1625343247732; Sat, 03 Jul 2021 13:14:07 -0700 (PDT) Received: from gnu-cfl-2.localdomain ([172.56.39.115]) by smtp.gmail.com with ESMTPSA id 3sm7709053pfv.31.2021.07.03.13.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Jul 2021 13:14:07 -0700 (PDT) Received: from gnu-cfl-2.. (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 0E3EBC059B; Sat, 3 Jul 2021 13:14:03 -0700 (PDT) From: "H.J. Lu" To: binutils@sourceware.org Cc: Kaylee Blake , Alan Modra , Nick Clifton Subject: [PATCH v2 6/6] ld: Add -z nosectionheader test to bootstrap.exp Date: Sat, 3 Jul 2021 13:14:02 -0700 Message-Id: <20210703201402.1136267-7-hjl.tools@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210703201402.1136267-1-hjl.tools@gmail.com> References: <20210703201402.1136267-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3032.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, 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: Sat, 03 Jul 2021 20:14:09 -0000 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 2e4a09704ab..ebbcefb1962 100644 --- a/ld/testsuite/ld-bootstrap/bootstrap.exp +++ b/ld/testsuite/ld-bootstrap/bootstrap.exp @@ -59,6 +59,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 @@ -85,9 +88,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.31.1