diff options
author | Nick Clifton <nickc@redhat.com> | 2023-06-21 11:47:19 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-06-21 11:47:19 +0100 |
commit | 0ab7005043ee404dabfd690952efc25c399995ae (patch) | |
tree | 9a34fb3d4222d64c560563b6f10579576856b0d8 /ld/testsuite | |
parent | 94dd9fb7482cc292f6ea7e641340563ca5536fcc (diff) | |
download | binutils-0ab7005043ee404dabfd690952efc25c399995ae.zip binutils-0ab7005043ee404dabfd690952efc25c399995ae.tar.gz binutils-0ab7005043ee404dabfd690952efc25c399995ae.tar.bz2 |
For test for PR 29072 when the linker is configured with --enable-default-execstack=no.
PR 29072
* testsuite/ld-elf/elf.exp (target_defaults_to_execstack): Always return false for linkers configured with the --enable-default-execstack=no option.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-elf/elf.exp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp index cf0e949..ca345e8 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -180,6 +180,21 @@ if { [check_gc_sections_available] && ![istarget "v850-*-*"] } { } proc target_defaults_to_execstack {} { + global base_dir + + # If the linker has been configured with --enable-default-execstack=no then + # this proc should always return 0. + if { [file exists $base_dir/config.status] } { + set status [remote_exec host grep "enable-default-execstack=no" $base_dir/config.status] + if { [lindex $status 0] == 0 } { + return 0 + } else { + verbose -log "$base_dir/config.status does not contain enable-default-execstack=no" + } + } else { + verbose -log "there is no file $base_dir/config.status" + } + if { [istarget "aarch64*-*-*"] || [istarget "arc*-*-*"] || [istarget "cris*-*-*"] |