From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id F10E33856089; Wed, 12 Oct 2022 14:50:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F10E33856089 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665586231; bh=Ok7ErBVdV1UzcYrh+ikqYl4mkLkmF1TVu946Psr2G38=; h=From:To:Subject:Date:From; b=C/fPcCBXKQSjo+b7ucEbDqab55iH3inrDlS3TqCgx+xTgYyhTKoTZ/BXgm93wYR3x 4hh2TX5DrPIugcbX75JH5PTih7jSa0kTiLJwWRdRoBM2/y/uDfq6S8OBwKohLwrhlF r8F6nOLsAcMGVm9rEwtWhZnH+zWlnop1TEz91/Sg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with recent ld X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 9693166f6648b3aaa7dc680b3fecda16b63ecfb4 X-Git-Newrev: a2470500432334fe254ef10ddabcab239e8de828 Message-Id: <20221012145031.F10E33856089@sourceware.org> Date: Wed, 12 Oct 2022 14:50:31 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Da24705004323= 34fe254ef10ddabcab239e8de828 commit a2470500432334fe254ef10ddabcab239e8de828 Author: Tom de Vries Date: Wed Oct 12 16:50:16 2022 +0200 [gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with rec= ent ld =20 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 LO= AD \ segment with RWX permissions UNTESTED: gdb.base/infoline-reloc-main-from-zero.exp: \ infoline-reloc-main-from-zero.exp ... =20 Fix this by compiling with -Wl,--no-warn-rwx-segments. =20 Tested on x86_64-linux. Diff: --- 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 =20 # Build executable with stripped startup code and text section starting at= zero =20 -set opts {debug "additional_flags=3D-nostdlib -emain -Wl,-Ttext=3D0x00 -Wl= ,-N"} +set opts {} +lappend opts debug +lappend opts "additional_flags=3D-nostdlib -emain -Wl,-Ttext=3D0x00 -Wl,-N" + +set ld_flags additional_flags=3D-Wl,--no-warn-rwx-segments +if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executab= le \ + $ld_flags] } { + lappend opts $ld_flags +} =20 if {[build_executable $testfile.exp $testfile $srcfile $opts] =3D=3D -1} { untested "failed to compile"