ld-aarch64: check support before launching dt_relr tests
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_binutils_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-arm |
success
|
Testing passed
|
Commit Message
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(-)
Comments
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.
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
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.
@@ -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
@@ -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"