aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2022-06-21 11:22:38 +0100
committerNick Clifton <nickc@redhat.com>2022-06-21 11:22:38 +0100
commitacd65fa610df09a0954b8fecdadf546215263c5d (patch)
tree6b52ac39938f85b37e6e4ec0b5fff5a83aa9e0a3 /ld/testsuite/ld-elf
parent7b97003ccdf8b6000b090c65f7493ff85dad1085 (diff)
downloadgdb-acd65fa610df09a0954b8fecdadf546215263c5d.zip
gdb-acd65fa610df09a0954b8fecdadf546215263c5d.tar.gz
gdb-acd65fa610df09a0954b8fecdadf546215263c5d.tar.bz2
Default to disabling the linker warnings about execstack and RWX segments if the target is the HPPA architecture.
PR 29263 * configure.ac (ac_default_ld_warn_execstack): Default to 'no' for HPPA targets. (ac_default_ld_warn_rwx_segments): Likewise. * configure: Regenerate. * testsuite/ld-elf/elf.exp: Add the --warn-execstack command line option to the command line when running execstack tests for the HPPA target.
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r--ld/testsuite/ld-elf/elf.exp13
1 files changed, 11 insertions, 2 deletions
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index abc35f8..c73c2a8 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -236,10 +236,19 @@ if { [istarget *-*-*linux*]
proc prune_warnings_extra { text } {
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.
+ if { [istarget "hppa*-*-*"] } {
+ 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" \
+ "-e 0 $extra_link_opts" \
"" \
"" \
{pr29072-a.s} \