202 lines
10 KiB
Diff
202 lines
10 KiB
Diff
From e0968610301d68ee7bf35f2bcba0817d08e07921 Mon Sep 17 00:00:00 2001
|
|
From: Xin Wang <wangxin03@loongson.cn>
|
|
Date: Fri, 25 Oct 2024 15:07:38 +0800
|
|
Subject: [PATCH 121/123] Modify test because of readelf not update
|
|
|
|
---
|
|
ld/testsuite/ld-loongarch-elf/relr-align.d | 24 +++++++++----------
|
|
ld/testsuite/ld-loongarch-elf/relr-data-pie.d | 12 +++++-----
|
|
.../ld-loongarch-elf/relr-data-shared.d | 10 ++++----
|
|
.../ld-loongarch-elf/relr-discard-pie.d | 8 +++----
|
|
.../ld-loongarch-elf/relr-discard-shared.d | 6 ++---
|
|
ld/testsuite/ld-loongarch-elf/relr-got-pie.d | 12 +++++-----
|
|
.../ld-loongarch-elf/relr-got-shared.d | 10 ++++----
|
|
.../ld-loongarch-elf/relr-got-start.d | 6 ++---
|
|
ld/testsuite/ld-loongarch-elf/relr-text-pie.d | 6 ++---
|
|
.../ld-loongarch-elf/relr-text-shared.d | 6 ++---
|
|
10 files changed, 50 insertions(+), 50 deletions(-)
|
|
|
|
diff --git a/ld/testsuite/ld-loongarch-elf/relr-align.d b/ld/testsuite/ld-loongarch-elf/relr-align.d
|
|
index d534243b..e95b0fb8 100644
|
|
--- a/ld/testsuite/ld-loongarch-elf/relr-align.d
|
|
+++ b/ld/testsuite/ld-loongarch-elf/relr-align.d
|
|
@@ -8,15 +8,15 @@ Relocation section '\.rela.dyn' at offset 0x[0-9a-f]+ contains 3 entries:
|
|
0000000012340019 0000000000000003 R_LARCH_RELATIVE 10000
|
|
0000000012340041 0000000000000003 R_LARCH_RELATIVE 10000
|
|
|
|
-Relocation section '\.relr.dyn' at offset 0x[0-9a-f]+ contains 9 entries which relocate 10 locations:
|
|
-Index: Entry Address Symbolic Address
|
|
-0000: 0000000012340000 0000000012340000 double_0
|
|
-0001: 0000000000000003 0000000012340008 double_0 \+ 0x8
|
|
-0002: 0000000012340022 0000000012340022 double_2
|
|
-0003: 0000000000000003 000000001234002a double_2 \+ 0x8
|
|
-0004: 0000000012340038 0000000012340038 single_0
|
|
-0005: 000000001234004a 000000001234004a single_2
|
|
-0006: 0000000012340058 0000000012340058 big
|
|
-0007: 8000000100000001 0000000012340158 big \+ 0x100
|
|
- 0000000012340250 big \+ 0x1f8
|
|
-0008: 0000000000000003 0000000012340258 big \+ 0x200
|
|
+Relocation section '\.relr.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
|
|
+ 10 offsets
|
|
+0000000012340000
|
|
+0000000012340008
|
|
+0000000012340022
|
|
+000000001234002a
|
|
+0000000012340038
|
|
+000000001234004a
|
|
+0000000012340058
|
|
+0000000012340158
|
|
+0000000012340250
|
|
+0000000012340258
|
|
diff --git a/ld/testsuite/ld-loongarch-elf/relr-data-pie.d b/ld/testsuite/ld-loongarch-elf/relr-data-pie.d
|
|
index 20ef9ac1..fe32ae34 100644
|
|
--- a/ld/testsuite/ld-loongarch-elf/relr-data-pie.d
|
|
+++ b/ld/testsuite/ld-loongarch-elf/relr-data-pie.d
|
|
@@ -10,9 +10,9 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 5 entries:
|
|
0000000012340018 0000000000000003 R_LARCH_RELATIVE 12340050
|
|
0000000012340040 0000000c00000002 R_LARCH_64 0000000000000000 sym_weak_undef \+ 0
|
|
|
|
-Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries which relocate 4 locations:
|
|
-Index: Entry Address Symbolic Address
|
|
-0000: 0000000012340020 0000000012340020 aligned_local
|
|
-0001: 0000000000000027 0000000012340028 aligned_hidden
|
|
- 0000000012340030 aligned_global
|
|
- 0000000012340048 aligned_DYNAMIC
|
|
+Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
|
|
+ 4 offsets
|
|
+0000000012340020
|
|
+0000000012340028
|
|
+0000000012340030
|
|
+0000000012340048
|
|
diff --git a/ld/testsuite/ld-loongarch-elf/relr-data-shared.d b/ld/testsuite/ld-loongarch-elf/relr-data-shared.d
|
|
index 37e4c0da..0521786f 100644
|
|
--- a/ld/testsuite/ld-loongarch-elf/relr-data-shared.d
|
|
+++ b/ld/testsuite/ld-loongarch-elf/relr-data-shared.d
|
|
@@ -11,8 +11,8 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 6 entries:
|
|
0000000012340030 0000000d00000002 R_LARCH_64 000000000001000c sym_global \+ 0
|
|
0000000012340040 0000000c00000002 R_LARCH_64 0000000000000000 sym_weak_undef \+ 0
|
|
|
|
-Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries which relocate 3 locations:
|
|
-Index: Entry Address Symbolic Address
|
|
-0000: 0000000012340020 0000000012340020 aligned_local
|
|
-0001: 0000000000000023 0000000012340028 aligned_hidden
|
|
- 0000000012340048 aligned_DYNAMIC
|
|
+Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
|
|
+ 3 offsets
|
|
+0000000012340020
|
|
+0000000012340028
|
|
+0000000012340048
|
|
diff --git a/ld/testsuite/ld-loongarch-elf/relr-discard-pie.d b/ld/testsuite/ld-loongarch-elf/relr-discard-pie.d
|
|
index 4ea8ae5e..11d2dba8 100644
|
|
--- a/ld/testsuite/ld-loongarch-elf/relr-discard-pie.d
|
|
+++ b/ld/testsuite/ld-loongarch-elf/relr-discard-pie.d
|
|
@@ -2,7 +2,7 @@
|
|
#ld: -pie -z pack-relative-relocs -T relr-discard.ld
|
|
#readelf: -rW
|
|
|
|
-Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries which relocate 2 locations:
|
|
-Index: Entry Address Symbolic Address
|
|
-0000: 0000000000020008 0000000000020008 _GLOBAL_OFFSET_TABLE_ \+ 0x8
|
|
-0001: 0000000000000003 0000000000020010 _GLOBAL_OFFSET_TABLE_ \+ 0x10
|
|
+Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
|
|
+ 2 offsets
|
|
+0000000000020008
|
|
+0000000000020010
|
|
diff --git a/ld/testsuite/ld-loongarch-elf/relr-discard-shared.d b/ld/testsuite/ld-loongarch-elf/relr-discard-shared.d
|
|
index 8bfd8ba5..2a540832 100644
|
|
--- a/ld/testsuite/ld-loongarch-elf/relr-discard-shared.d
|
|
+++ b/ld/testsuite/ld-loongarch-elf/relr-discard-shared.d
|
|
@@ -6,6 +6,6 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 1 entry:
|
|
Offset Info Type Symbol's Value Symbol's Name \+ Addend
|
|
0000000000020010 0000000300000002 R_LARCH_64 000000000001000c sym_global \+ 0
|
|
|
|
-Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 1 entry which relocates 1 location:
|
|
-Index: Entry Address Symbolic Address
|
|
-0000: 0000000000020008 0000000000020008 _GLOBAL_OFFSET_TABLE_ \+ 0x8
|
|
+Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 1 entry:
|
|
+ 1 offset
|
|
+0000000000020008
|
|
diff --git a/ld/testsuite/ld-loongarch-elf/relr-got-pie.d b/ld/testsuite/ld-loongarch-elf/relr-got-pie.d
|
|
index e994f2bf..849bf9b4 100644
|
|
--- a/ld/testsuite/ld-loongarch-elf/relr-got-pie.d
|
|
+++ b/ld/testsuite/ld-loongarch-elf/relr-got-pie.d
|
|
@@ -7,9 +7,9 @@ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
|
|
0000000000000000 0000000000000000 R_LARCH_NONE 0
|
|
0000000000020030 0000000200000002 R_LARCH_64 0000000000000000 sym_weak_undef \+ 0
|
|
|
|
-Relocation section '.relr.dyn' at offset 0x[0-9a-f]+ contains 2 entries which relocate 4 locations:
|
|
-Index: Entry Address Symbolic Address
|
|
-0000: 0000000000020008 0000000000020008 _GLOBAL_OFFSET_TABLE_ \+ 0x8
|
|
-0001: 000000000000000f 0000000000020010 _GLOBAL_OFFSET_TABLE_ \+ 0x10
|
|
- 0000000000020018 _GLOBAL_OFFSET_TABLE_ \+ 0x18
|
|
- 0000000000020020 _GLOBAL_OFFSET_TABLE_ \+ 0x20
|
|
+Relocation section '.relr.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
|
|
+ 4 offsets
|
|
+0000000000020008
|
|
+0000000000020010
|
|
+0000000000020018
|
|
+0000000000020020
|
|
diff --git a/ld/testsuite/ld-loongarch-elf/relr-got-shared.d b/ld/testsuite/ld-loongarch-elf/relr-got-shared.d
|
|
index 169e0e5d..030261af 100644
|
|
--- a/ld/testsuite/ld-loongarch-elf/relr-got-shared.d
|
|
+++ b/ld/testsuite/ld-loongarch-elf/relr-got-shared.d
|
|
@@ -8,8 +8,8 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 3 entries:
|
|
0000000000020028 0000000500000002 R_LARCH_64 000000000000002a sym_global_abs \+ 0
|
|
0000000000020030 0000000200000002 R_LARCH_64 0000000000000000 sym_weak_undef \+ 0
|
|
|
|
-Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ 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
|
|
- 0000000000020018 _GLOBAL_OFFSET_TABLE_ \+ 0x18
|
|
+Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
|
|
+ 3 offsets
|
|
+0000000000020008
|
|
+0000000000020010
|
|
+0000000000020018
|
|
diff --git a/ld/testsuite/ld-loongarch-elf/relr-got-start.d b/ld/testsuite/ld-loongarch-elf/relr-got-start.d
|
|
index 0b1a5b98..b4723d6c 100644
|
|
--- a/ld/testsuite/ld-loongarch-elf/relr-got-start.d
|
|
+++ b/ld/testsuite/ld-loongarch-elf/relr-got-start.d
|
|
@@ -2,6 +2,6 @@
|
|
#ld: -pie -z pack-relative-relocs -T relr-relocs.ld
|
|
#readelf: -rW
|
|
|
|
-Relocation section '\.relr\.dyn' at offset 0x[a-z0-f]+ contains 1 entry which relocates 1 location:
|
|
-Index: Entry Address Symbolic Address
|
|
-0000: 0000000000020008 0000000000020008 _GLOBAL_OFFSET_TABLE_ \+ 0x8
|
|
+Relocation section '\.relr\.dyn' at offset 0x[a-z0-f]+ contains 1 entry:
|
|
+ 1 offset
|
|
+0000000000020008
|
|
diff --git a/ld/testsuite/ld-loongarch-elf/relr-text-pie.d b/ld/testsuite/ld-loongarch-elf/relr-text-pie.d
|
|
index 5121313e..c39975ba 100644
|
|
--- a/ld/testsuite/ld-loongarch-elf/relr-text-pie.d
|
|
+++ b/ld/testsuite/ld-loongarch-elf/relr-text-pie.d
|
|
@@ -9,6 +9,6 @@
|
|
0x0000000000000023 \(RELRSZ\) 8 \(bytes\)
|
|
0x0000000000000025 \(RELRENT\) 8 \(bytes\)
|
|
#...
|
|
-Relocation section '\.relr\.dyn' .* contains 1 entry which relocates 1 location:
|
|
-Index: Entry Address Symbolic Address
|
|
-0000: 0000000000010000 0000000000010000 _start
|
|
+Relocation section '\.relr\.dyn' .* contains 1 entry:
|
|
+ 1 offset
|
|
+0000000000010000
|
|
diff --git a/ld/testsuite/ld-loongarch-elf/relr-text-shared.d b/ld/testsuite/ld-loongarch-elf/relr-text-shared.d
|
|
index 8e34500f..5d86d398 100644
|
|
--- a/ld/testsuite/ld-loongarch-elf/relr-text-shared.d
|
|
+++ b/ld/testsuite/ld-loongarch-elf/relr-text-shared.d
|
|
@@ -9,6 +9,6 @@
|
|
0x0000000000000023 \(RELRSZ\) 8 \(bytes\)
|
|
0x0000000000000025 \(RELRENT\) 8 \(bytes\)
|
|
#...
|
|
-Relocation section '\.relr\.dyn' .* contains 1 entry which relocates 1 location:
|
|
-Index: Entry Address Symbolic Address
|
|
-0000: 0000000000010000 0000000000010000 _start
|
|
+Relocation section '\.relr\.dyn' .* contains 1 entry:
|
|
+ 1 offset
|
|
+0000000000010000
|
|
--
|
|
2.33.0
|
|
|