From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7854) id 2121C3858016; Wed, 28 Sep 2022 14:19:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2121C3858016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: =?unknown-8bit?q?Cl=E9ment_Chigot_=3Chelflym=40sourceware=2Eorg=3E?=@sourceware.org To: bfd-cvs@sourceware.org Subject: [binutils-gdb] ld/testsuite: force warnings when dealing with execstack tests X-Act-Checkin: binutils-gdb X-Git-Author: =?utf-8?q?Cl=C3=A9ment_Chigot?= X-Git-Refname: refs/heads/master X-Git-Oldrev: e2bae06cf91bd6d505705432eebc32cb246a690b X-Git-Newrev: 9cfd4ed49d84fb0fc8c4c152297a95958514b6cb Message-Id: <20220928141941.2121C3858016@sourceware.org> Date: Wed, 28 Sep 2022 14:19:41 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2022 14:19:41 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D9cfd4ed49d84= fb0fc8c4c152297a95958514b6cb commit 9cfd4ed49d84fb0fc8c4c152297a95958514b6cb Author: Cl=C3=A9ment Chigot Date: Wed Sep 14 13:12:32 2022 +0200 ld/testsuite: force warnings when dealing with execstack tests =20 Binutils can be configured to avoid printing the execstack or RWD segment warnings. In this case, the first test of PR ld/29072 will fail. Fix that by always manually forcing the warnings for it. =20 ld/ChangeLog: =20 * testsuite/ld-elf/elf.exp (PR ld/29072): Force execstack and RWD segment warnings. Diff: --- ld/testsuite/ld-elf/elf.exp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp index 64b1d34f055..e4d8bee2f53 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -237,18 +237,11 @@ if { [istarget *-*-*linux*] return $text } =20 - # The HPPA target disables the warnings by default since it needs an - # executable stack to support older kernels and an RWX segment to - # support its PLT. MIPS also turns off exec stack warnings. - if { [istarget "hppa*-*-*"] || [istarget mips*-*-*] } { - set extra_link_opts "--warn-execstack --warn-rwx-segments" - } else { - set extra_link_opts "" - } - + # Since the warnings can be disabled by configure, ensure consistency + # of the first test by forcing the flags. run_ld_link_tests [list \ [list "PR ld/29072 (warn about an executable .note.GNU-stack)" \ - "-e 0 $extra_link_opts" \ + "-e 0 --warn-execstack --warn-rwx-segments" \ "" \ "" \ {pr29072-a.s} \