public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] ld-aarch64: check support before launching dt_relr tests
@ 2024-06-07 14:00 Clément Chigot
  2024-06-07 23:06 ` Alan Modra
  0 siblings, 1 reply; 4+ messages in thread
From: Clément Chigot @ 2024-06-07 14:00 UTC (permalink / raw)
  To: binutils; +Cc: amodra, szabolcs.nagy, Clément Chigot

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.
---
 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"
-- 
2.25.1


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

* Re: [PATCH] ld-aarch64: check support before launching dt_relr tests
  2024-06-07 14:00 [PATCH] ld-aarch64: check support before launching dt_relr tests Clément Chigot
@ 2024-06-07 23:06 ` Alan Modra
  2024-06-11 11:22   ` Alan Modra
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2024-06-07 23:06 UTC (permalink / raw)
  To: Clément Chigot; +Cc: binutils, szabolcs.nagy

On Fri, Jun 07, 2024 at 04:00:48PM +0200, Clément Chigot wrote:
> 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.

Thanks, please apply.

-- 
Alan Modra

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

* Re: [PATCH] ld-aarch64: check support before launching dt_relr tests
  2024-06-07 23:06 ` Alan Modra
@ 2024-06-11 11:22   ` Alan Modra
  2024-06-11 14:50     ` Szabolcs Nagy
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2024-06-11 11:22 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot, szabolcs.nagy

On Sat, Jun 08, 2024 at 08:36:49AM +0930, Alan Modra wrote:
> On Fri, Jun 07, 2024 at 04:00:48PM +0200, Clément Chigot wrote:
> > 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.
> 
> Thanks, please apply.

Tweak commit db335d7e0a so that support_dt_relr returns false for
aarch64*-*-*ilp32.

diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index bf291d731e2..ebc4c735855 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -473,7 +473,7 @@ proc supports_dt_relr {} {
     if { ([istarget x86_64-*-*]
 	  || [istarget i?86-*-*]
 	  || [istarget powerpc64*-*-*]
-	  || [istarget aarch64*-*-*])
+	  || ([istarget aarch64*-*-*] && ![istarget *-*-*ilp32]))
 	 && ([istarget *-*-linux*]
 	     || [istarget *-*-gnu*]) } {
 	return 1


-- 
Alan Modra

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

* Re: [PATCH] ld-aarch64: check support before launching dt_relr tests
  2024-06-11 11:22   ` Alan Modra
@ 2024-06-11 14:50     ` Szabolcs Nagy
  0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2024-06-11 14:50 UTC (permalink / raw)
  To: Alan Modra, binutils; +Cc: Clément Chigot

The 06/11/2024 20:52, Alan Modra wrote:
> On Sat, Jun 08, 2024 at 08:36:49AM +0930, Alan Modra wrote:
> > On Fri, Jun 07, 2024 at 04:00:48PM +0200, Cl�ment Chigot wrote:
> > > 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.
> > 
> > Thanks, please apply.
> 
> Tweak commit db335d7e0a so that support_dt_relr returns false for
> aarch64*-*-*ilp32.

thanks.

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

end of thread, other threads:[~2024-06-11 14:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-07 14:00 [PATCH] ld-aarch64: check support before launching dt_relr tests Clément Chigot
2024-06-07 23:06 ` Alan Modra
2024-06-11 11:22   ` Alan Modra
2024-06-11 14:50     ` Szabolcs Nagy

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