From: Cl?ment Chigot <helflym@sourceware.org>
To: binutils-cvs@sourceware.org
Subject: [binutils-gdb] ld-aarch64: check support before launching dt_relr tests
Date: Mon, 10 Jun 2024 07:02:16 +0000 (GMT) [thread overview]
Message-ID: <20240610070216.E9F0E3858D35@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=db335d7e0ad5d7422299e91e883bc87236a67f2f
commit db335d7e0ad5d7422299e91e883bc87236a67f2f
Author: Clément Chigot <chigot@adacore.com>
Date: Fri Jun 7 15:42:52 2024 +0200
ld-aarch64: check support before launching dt_relr tests
Not all aarch64 targets supports dt_relr as this requires some
mechanisms on the OS side.
Adjust support_dt_relr helper and use it in aarch64-elf.exp.
Diff:
---
binutils/testsuite/lib/binutils-common.exp | 3 ++-
ld/testsuite/ld-aarch64/aarch64-elf.exp | 20 +++++++++++---------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 2fca43bac48..bf291d731e2 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -472,7 +472,8 @@ proc supports_persistent_section {} {
proc supports_dt_relr {} {
if { ([istarget x86_64-*-*]
|| [istarget i?86-*-*]
- || [istarget powerpc64*-*-*])
+ || [istarget powerpc64*-*-*]
+ || [istarget aarch64*-*-*])
&& ([istarget *-*-linux*]
|| [istarget *-*-gnu*]) } {
return 1
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 0e70ca3e028..dc5eed50bfd 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -468,15 +468,17 @@ run_dump_test_lp64 "bti-far-2"
run_dump_test_lp64 "bti-far-opt"
run_dump_test_lp64 "bti-far-3"
-run_dump_test_lp64 "relr-align"
-run_dump_test_lp64 "relr-data-pie"
-run_dump_test_lp64 "relr-data-shared"
-run_dump_test_lp64 "relr-got-pie"
-run_dump_test_lp64 "relr-got-shared"
-run_dump_test_lp64 "relr-text-pie"
-run_dump_test_lp64 "relr-text-shared"
-run_dump_test_lp64 "relr-discard-pie"
-run_dump_test_lp64 "relr-discard-shared"
+if { [supports_dt_relr] } {
+ run_dump_test_lp64 "relr-align"
+ run_dump_test_lp64 "relr-data-pie"
+ run_dump_test_lp64 "relr-data-shared"
+ run_dump_test_lp64 "relr-got-pie"
+ run_dump_test_lp64 "relr-got-shared"
+ run_dump_test_lp64 "relr-text-pie"
+ run_dump_test_lp64 "relr-text-shared"
+ run_dump_test_lp64 "relr-discard-pie"
+ run_dump_test_lp64 "relr-discard-shared"
+}
if { ![skip_sframe_tests] } {
run_dump_test "sframe-simple-1"
reply other threads:[~2024-06-10 7:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240610070216.E9F0E3858D35@sourceware.org \
--to=helflym@sourceware.org \
--cc=binutils-cvs@sourceware.org \
/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).