From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14734 invoked by alias); 17 Jun 2019 10:19:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 14282 invoked by uid 89); 17 Jun 2019 10:19:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=sk:additio X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Jun 2019 10:19:16 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0732EAFD6 for ; Mon, 17 Jun 2019 10:19:13 +0000 (UTC) Date: Mon, 17 Jun 2019 10:19:00 -0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Fix infoline-reloc-main-from-zero.exp compilation Message-ID: <20190617101910.GA24372@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00307.txt.bz2 Hi, When running gdb.base/infoline-reloc-main-from-zero.exp, I see: ... Running gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp ... gdb compile failed, ld: infoline-reloc-main-from-zero: \ not enough room for program headers, try linking with -N ld: final link failed: bad value collect2: error: ld returned 1 exit status UNTESTED: gdb.base/infoline-reloc-main-from-zero.exp: infoline-reloc-main-from-zero.exp UNTESTED: gdb.base/infoline-reloc-main-from-zero.exp: failed to compile ... Fix this by following the suggestion: ... -set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00"} +set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N"} ... Tested on x86_64-linux. OK for trunk? Thanks, - Tom [gdb/testsuite] Fix infoline-reloc-main-from-zero.exp compilation gdb/testsuite/ChangeLog: 2019-06-17 Tom de Vries PR testsuite/24612 * gdb.base/infoline-reloc-main-from-zero.exp: Add -Wl,-N to additional_flags. --- gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp | 2 +- 1 file changed, 1 insertion(+), 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 99f577004e..670f611466 100644 --- a/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp +++ b/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp @@ -29,7 +29,7 @@ if [get_compiler_info] { # Build executable with stripped startup code and text section starting at zero -set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00"} +set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N"} if {[build_executable $testfile.exp $testfile $srcfile $opts] == -1} { untested "failed to compile"