public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Clément Chigot" <chigot@adacore.com>
To: binutils@sourceware.org, nickc@redhat.com
Cc: amodra@gmail.com, "Clément Chigot" <chigot@adacore.com>
Subject: [RFC] ld/testsuite: force warnings when dealing with execstack tests
Date: Wed, 28 Sep 2022 15:35:43 +0200	[thread overview]
Message-ID: <20220928133542.471998-1-chigot@adacore.com> (raw)

Hi Nick,

I've already raised the issue sometimes back inside a more general
patch. But with Alan, we weren't sure this was the good approach. This
test might also be there to ensure that warnings are printed by default
with a configuration not disabling them. Thus, I'm resubmitting it as RFC.

--- 

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.

ld/ChangeLog:

	* testsuite/ld-elf/elf.exp (PR ld/29072): Force execstack and
	RWD segment warnings.
---
 ld/testsuite/ld-elf/elf.exp | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index 64b1d34f055..ad5bcb87cf1 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -237,18 +237,9 @@ if {   [istarget *-*-*linux*]
 	return $text
     }
 
-    # 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 ""
-    }
-
     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} \
-- 
2.25.1


             reply	other threads:[~2022-09-28 13:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28 13:35 Clément Chigot [this message]
2022-09-28 14:05 ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220928133542.471998-1-chigot@adacore.com \
    --to=chigot@adacore.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).