From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +e5FF4wNYGHMCgAAWB0awg (envelope-from ) for ; Fri, 08 Oct 2021 05:21:16 -0400 Received: by simark.ca (Postfix, from userid 112) id 4D5E51EE20; Fri, 8 Oct 2021 05:21:16 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6E75C1E79C for ; Fri, 8 Oct 2021 05:21:15 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9004B3857C48 for ; Fri, 8 Oct 2021 09:21:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9004B3857C48 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633684874; bh=p2xljzKmhcvPWCodHBTM8ZdlNUqs1pQXerLIZfHf+Zc=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=JaPj2peOhJzpgwCi2s+q/7OSgT4pxGMy0aj2t3++r4m/jSBSj5SUcL6bwxSxih4Gv o99xut9uRrA0VmU2dOLrb9RPiCKqz8W99scZ/hXi6IcMZ17rUBacn2oR8BoBhkH3z2 Y2nAxnxIiAdBurPEshMQG49M7p2irgdcT7fVlwpA= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id EEC793858431 for ; Fri, 8 Oct 2021 09:20:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EEC793858431 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-out2.suse.de (Postfix) with ESMTPS id 2881120112 for ; Fri, 8 Oct 2021 09:20:55 +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 15D6E13D13 for ; Fri, 8 Oct 2021 09:20:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CKtMBHcNYGEBfwAAMHmgww (envelope-from ) for ; Fri, 08 Oct 2021 09:20:55 +0000 Date: Fri, 8 Oct 2021 11:20:53 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Add nopie in two test-cases Message-ID: <20211008092051.GA12477@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-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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, When running test-case gdb.dwarf2/dw2-restrict.exp on openSUSE Leap 15.2 with gcc-PIE installed (switching compiler default to -fPIE/-pie), I get: ... gdb compile failed, ld: outputs/gdb.dwarf2/dw2-restrict/dw2-restrict0.o: \ warning: relocation in read-only section `.text' ld: warning: creating DT_TEXTREL in a PIE UNTESTED: gdb.dwarf2/dw2-restrict.exp: failed to prepare ... This is due to using a hardcoded .S file that was generated with -fno-PIE. Fix this by adding the missing nopie. Likewise in gdb.arch/amd64-tailcall-noret.exp. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Add nopie in two test-cases --- gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp | 2 ++ gdb/testsuite/gdb.dwarf2/dw2-restrict.exp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp index c68abce61e3..fb1d5695a11 100644 --- a/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp +++ b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp @@ -25,6 +25,8 @@ if [info exists COMPILE] { return } +lappend opts nopie + if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp index 6f98b6cfb18..2a46510c7a3 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp @@ -27,7 +27,8 @@ if {![istarget x86_64-*] || ![is_lp64_target]} { standard_testfile .S -if {[prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ + {nodebug nopie}]} { return -1 }