public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] ld-aarch64: check support before launching dt_relr tests
@ 2024-06-10  7:02 Cl?ment Chigot
  0 siblings, 0 replies; only message in thread
From: Cl?ment Chigot @ 2024-06-10  7:02 UTC (permalink / raw)
  To: binutils-cvs

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"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-10  7:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-10  7:02 [binutils-gdb] ld-aarch64: check support before launching dt_relr tests Cl?ment Chigot

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