From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 7F9B93850863 for ; Wed, 12 Oct 2022 14:51:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F9B93850863 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B778521ECA for ; Wed, 12 Oct 2022 14:51:20 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9C1C513A5C for ; Wed, 12 Oct 2022 14:51:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ZPzQJGjURmNsLQAAMHmgww (envelope-from ) for ; Wed, 12 Oct 2022 14:51:20 +0000 Date: Wed, 12 Oct 2022 16:51:19 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with recent ld Message-ID: <20221012145117.GA3461@delia.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2022 14:51:22 -0000 Hi, On openSUSE Tumbleweed (with ld 2.39) and test-case gdb.base/infoline-reloc-main-from-zero.exp, I get: ... gdb compile failed, ld: warning: infoline-reloc-main-from-zero has a LOAD \ segment with RWX permissions UNTESTED: gdb.base/infoline-reloc-main-from-zero.exp: \ infoline-reloc-main-from-zero.exp ... Fix this by compiling with -Wl,--no-warn-rwx-segments. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with recent ld --- gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp b/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp index 31e753a0c1c..35c2db00c07 100644 --- a/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp +++ b/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp @@ -25,7 +25,15 @@ standard_testfile .c # Build executable with stripped startup code and text section starting at zero -set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N"} +set opts {} +lappend opts debug +lappend opts "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N" + +set ld_flags additional_flags=-Wl,--no-warn-rwx-segments +if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executable \ + $ld_flags] } { + lappend opts $ld_flags +} if {[build_executable $testfile.exp $testfile $srcfile $opts] == -1} { untested "failed to compile"