* [PATCH] aarch64: Fix DT_RELR tests
@ 2024-06-04 10:29 Szabolcs Nagy
2024-06-06 1:11 ` Alan Modra
0 siblings, 1 reply; 2+ messages in thread
From: Szabolcs Nagy @ 2024-06-04 10:29 UTC (permalink / raw)
To: binutils
More relaxed readelf output matching to pass on baremetal target.
---
ld/testsuite/ld-aarch64/relr-align.d | 4 ++--
ld/testsuite/ld-aarch64/relr-data-pie.d | 2 +-
ld/testsuite/ld-aarch64/relr-data-shared.d | 10 +++++-----
ld/testsuite/ld-aarch64/relr-got-pie.d | 2 +-
ld/testsuite/ld-aarch64/relr-got-shared.d | 10 +++++-----
ld/testsuite/ld-aarch64/relr-text-shared.d | 4 ++--
6 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/ld/testsuite/ld-aarch64/relr-align.d b/ld/testsuite/ld-aarch64/relr-align.d
index ac2fa6eff08..088b96ba9fd 100644
--- a/ld/testsuite/ld-aarch64/relr-align.d
+++ b/ld/testsuite/ld-aarch64/relr-align.d
@@ -2,13 +2,13 @@
#ld: -shared -z pack-relative-relocs -T relocs.ld
#readelf: -rW
-Relocation section '\.rela\.dyn' at offset 0x10090 contains 3 entries:
+Relocation section '\.rela\.dyn' at offset 0x1.* contains 3 entries:
Offset Info Type Symbol's Value Symbol's Name \+ Addend
0000000012340011 0000000000000403 R_AARCH64_RELATIVE 10000
0000000012340019 0000000000000403 R_AARCH64_RELATIVE 10000
0000000012340041 0000000000000403 R_AARCH64_RELATIVE 10000
-Relocation section '\.relr\.dyn' at offset 0x100d8 contains 9 entries which relocate 10 locations:
+Relocation section '\.relr\.dyn' at offset 0x1.* contains 9 entries which relocate 10 locations:
Index: Entry Address Symbolic Address
0000: 0000000012340000 0000000012340000 double_0
0001: 0000000000000003 0000000012340008 double_0 \+ 0x8
diff --git a/ld/testsuite/ld-aarch64/relr-data-pie.d b/ld/testsuite/ld-aarch64/relr-data-pie.d
index b90ff3bdf6b..422abff9397 100644
--- a/ld/testsuite/ld-aarch64/relr-data-pie.d
+++ b/ld/testsuite/ld-aarch64/relr-data-pie.d
@@ -8,7 +8,7 @@ Relocation section '\.rela\.dyn' at offset 0x1.* contains 5 entries:
0000000012340008 0000000000000403 R_AARCH64_RELATIVE 10008
0000000012340010 0000000000000403 R_AARCH64_RELATIVE 1000c
0000000012340018 0000000000000403 R_AARCH64_RELATIVE 12340050
-0000000012340040 0000000300000101 R_AARCH64_ABS64 0000000000000000 sym_weak_undef \+ 0
+0000000012340040 .*00000101 R_AARCH64_ABS64 0000000000000000 sym_weak_undef \+ 0
Relocation section '\.relr\.dyn' at offset 0x1.* contains 2 entries which relocate 4 locations:
Index: Entry Address Symbolic Address
diff --git a/ld/testsuite/ld-aarch64/relr-data-shared.d b/ld/testsuite/ld-aarch64/relr-data-shared.d
index d94b335fac2..1585eeefb85 100644
--- a/ld/testsuite/ld-aarch64/relr-data-shared.d
+++ b/ld/testsuite/ld-aarch64/relr-data-shared.d
@@ -2,16 +2,16 @@
#ld: -shared -z pack-relative-relocs -T relocs.ld
#readelf: -rW
-Relocation section '\.rela\.dyn' at offset 0x10150 contains 6 entries:
+Relocation section '\.rela\.dyn' at offset 0x1.* contains 6 entries:
Offset Info Type Symbol's Value Symbol's Name \+ Addend
0000000012340000 0000000000000403 R_AARCH64_RELATIVE 10004
0000000012340008 0000000000000403 R_AARCH64_RELATIVE 10008
0000000012340018 0000000000000403 R_AARCH64_RELATIVE 12340050
-0000000012340010 0000000400000101 R_AARCH64_ABS64 000000000001000c sym_global \+ 0
-0000000012340030 0000000400000101 R_AARCH64_ABS64 000000000001000c sym_global \+ 0
-0000000012340040 0000000300000101 R_AARCH64_ABS64 0000000000000000 sym_weak_undef \+ 0
+0000000012340010 .*00000101 R_AARCH64_ABS64 000000000001000c sym_global \+ 0
+0000000012340030 .*00000101 R_AARCH64_ABS64 000000000001000c sym_global \+ 0
+0000000012340040 .*00000101 R_AARCH64_ABS64 0000000000000000 sym_weak_undef \+ 0
-Relocation section '\.relr\.dyn' at offset 0x101e0 contains 2 entries which relocate 3 locations:
+Relocation section '\.relr\.dyn' at offset 0x1.* contains 2 entries which relocate 3 locations:
Index: Entry Address Symbolic Address
0000: 0000000012340020 0000000012340020 aligned_local
0001: 0000000000000023 0000000012340028 aligned_hidden
diff --git a/ld/testsuite/ld-aarch64/relr-got-pie.d b/ld/testsuite/ld-aarch64/relr-got-pie.d
index f0b7c731a39..9129d2433b2 100644
--- a/ld/testsuite/ld-aarch64/relr-got-pie.d
+++ b/ld/testsuite/ld-aarch64/relr-got-pie.d
@@ -5,7 +5,7 @@
Relocation section '\.rela\.dyn' at offset 0x1.* contains 2 entries:
Offset Info Type Symbol's Value Symbol's Name \+ Addend
0000000000000000 0000000000000000 R_AARCH64_NONE 0
-0000000000020030 0000000200000401 R_AARCH64_GLOB_DAT 0000000000000000 sym_weak_undef \+ 0
+0000000000020030 .*00000401 R_AARCH64_GLOB_DAT 0000000000000000 sym_weak_undef \+ 0
Relocation section '\.relr\.dyn' at offset 0x1.* contains 2 entries which relocate 4 locations:
Index: Entry Address Symbolic Address
diff --git a/ld/testsuite/ld-aarch64/relr-got-shared.d b/ld/testsuite/ld-aarch64/relr-got-shared.d
index 59526947a9a..b79f140fd98 100644
--- a/ld/testsuite/ld-aarch64/relr-got-shared.d
+++ b/ld/testsuite/ld-aarch64/relr-got-shared.d
@@ -2,13 +2,13 @@
#ld: -shared -z pack-relative-relocs -T relocs.ld
#readelf: -rW
-Relocation section '\.rela\.dyn' at offset 0x10168 contains 3 entries:
+Relocation section '\.rela\.dyn' at offset 0x1.* contains 3 entries:
Offset Info Type Symbol's Value Symbol's Name \+ Addend
-0000000000020020 0000000300000401 R_AARCH64_GLOB_DAT 0000000000010038 sym_global \+ 0
-0000000000020028 0000000500000401 R_AARCH64_GLOB_DAT 000000000000002a sym_global_abs \+ 0
-0000000000020030 0000000200000401 R_AARCH64_GLOB_DAT 0000000000000000 sym_weak_undef \+ 0
+0000000000020020 .*00000401 R_AARCH64_GLOB_DAT 0000000000010038 sym_global \+ 0
+0000000000020028 .*00000401 R_AARCH64_GLOB_DAT 000000000000002a sym_global_abs \+ 0
+0000000000020030 .*00000401 R_AARCH64_GLOB_DAT 0000000000000000 sym_weak_undef \+ 0
-Relocation section '\.relr\.dyn' at offset 0x101b0 contains 2 entries which relocate 3 locations:
+Relocation section '\.relr\.dyn' at offset 0x1.* contains 2 entries which relocate 3 locations:
Index: Entry Address Symbolic Address
0000: 0000000000020008 0000000000020008 _GLOBAL_OFFSET_TABLE_ \+ 0x8
0001: 0000000000000007 0000000000020010 _GLOBAL_OFFSET_TABLE_ \+ 0x10
diff --git a/ld/testsuite/ld-aarch64/relr-text-shared.d b/ld/testsuite/ld-aarch64/relr-text-shared.d
index 06895d488b7..c64e2b16c18 100644
--- a/ld/testsuite/ld-aarch64/relr-text-shared.d
+++ b/ld/testsuite/ld-aarch64/relr-text-shared.d
@@ -5,10 +5,10 @@
#...
0x0000000000000016 \(TEXTREL\) 0x0
#...
- 0x0000000000000024 \(RELR\) 0x10098
+ 0x0000000000000024 \(RELR\) 0x1.*
0x0000000000000023 \(RELRSZ\) 8 \(bytes\)
0x0000000000000025 \(RELRENT\) 8 \(bytes\)
#...
-Relocation section '.relr.dyn' at offset 0x10098 contains 1 entry which relocates 1 location:
+Relocation section '.relr.dyn' at offset 0x1.* contains 1 entry which relocates 1 location:
Index: Entry Address Symbolic Address
0000: 0000000000010000 0000000000010000 _start
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] aarch64: Fix DT_RELR tests
2024-06-04 10:29 [PATCH] aarch64: Fix DT_RELR tests Szabolcs Nagy
@ 2024-06-06 1:11 ` Alan Modra
0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2024-06-06 1:11 UTC (permalink / raw)
To: Szabolcs Nagy; +Cc: binutils
On Tue, Jun 04, 2024 at 11:29:10AM +0100, Szabolcs Nagy wrote:
> More relaxed readelf output matching to pass on baremetal target.
I pushed a variant of this patch I had in my tree. It differs in not
matching the entirety of r_info and .rel.dyn address.
--
Alan Modra
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-06 1:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-04 10:29 [PATCH] aarch64: Fix DT_RELR tests Szabolcs Nagy
2024-06-06 1:11 ` Alan Modra
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).