public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] ld/testsuite: force warnings when dealing with execstack tests
@ 2022-09-28 14:11 Clément Chigot
  2022-09-28 14:18 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Clément Chigot @ 2022-09-28 14:11 UTC (permalink / raw)
  To: binutils, nickc; +Cc: amodra, Clément Chigot

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 | 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
     }
 
-    # 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} \
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] ld/testsuite: force warnings when dealing with execstack tests
  2022-09-28 14:11 [PATCH v2] ld/testsuite: force warnings when dealing with execstack tests Clément Chigot
@ 2022-09-28 14:18 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2022-09-28 14:18 UTC (permalink / raw)
  To: Clément Chigot, binutils; +Cc: amodra

Hi Clément,

> ld/ChangeLog:
> 
> 	* testsuite/ld-elf/elf.exp (PR ld/29072): Force execstack and
> 	RWD segment warnings.
> 
Approved - please apply.

Cheers
   Nick


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-28 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 14:11 [PATCH v2] ld/testsuite: force warnings when dealing with execstack tests Clément Chigot
2022-09-28 14:18 ` Nick Clifton

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).