aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2024-04-11 16:57:18 +0100
committerNick Clifton <nickc@redhat.com>2024-04-11 16:57:18 +0100
commitfcf8f3237cbaa0f97e57a161d7354cdb89a1ffa4 (patch)
tree9023c556f44b1b7eb2578de0f1ac5f8386bebd73 /ld
parent8e8d0b63ff15896cc2c228c01f18dfcf2a4a9305 (diff)
downloadgdb-fcf8f3237cbaa0f97e57a161d7354cdb89a1ffa4.zip
gdb-fcf8f3237cbaa0f97e57a161d7354cdb89a1ffa4.tar.gz
gdb-fcf8f3237cbaa0f97e57a161d7354cdb89a1ffa4.tar.bz2
Improve readelf's display of RELR relocs.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ld-elf/dt-relr-2b.d6
-rw-r--r--ld/testsuite/ld-elf/dt-relr-2c.d5
-rw-r--r--ld/testsuite/ld-elf/dt-relr-2d.d6
-rw-r--r--ld/testsuite/ld-elf/dt-relr-2e.d6
-rw-r--r--ld/testsuite/ld-elf/dt-relr-2i.d6
-rw-r--r--ld/testsuite/ld-i386/dt-relr-1a.d9
-rw-r--r--ld/testsuite/ld-i386/dt-relr-1b.d9
-rw-r--r--ld/testsuite/ld-powerpc/abs-pie-relr.r4
-rw-r--r--ld/testsuite/ld-powerpc/abs-shared-relr.r5
-rw-r--r--ld/testsuite/ld-x86-64/dt-relr-1a-x32.d9
-rw-r--r--ld/testsuite/ld-x86-64/dt-relr-1a.d9
-rw-r--r--ld/testsuite/ld-x86-64/dt-relr-1b-x32.d9
-rw-r--r--ld/testsuite/ld-x86-64/dt-relr-1b.d9
13 files changed, 53 insertions, 39 deletions
diff --git a/ld/testsuite/ld-elf/dt-relr-2b.d b/ld/testsuite/ld-elf/dt-relr-2b.d
index b139156..48a3eb7 100644
--- a/ld/testsuite/ld-elf/dt-relr-2b.d
+++ b/ld/testsuite/ld-elf/dt-relr-2b.d
@@ -13,5 +13,9 @@ Relocation section '\.rel(a|)\.dyn' at offset 0x[0-9a-f]+ contains 1 entry:
[0-9a-f]+ +[0-9a-f]+ +R_.*_(RELATIVE|UADDR.*) .*
#...
Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
- 4 offsets
+#...
+0000: +[0-9a-f]+ [0-9a-f]+ +data \(new starting address\)
+0001: +[0-9a-f]+ [0-9a-f]+ +data \+ 0x[0-9a-f]+ \(start of bitmap\)
+ +[0-9a-f]+ +data \+ 0x[0-9a-f]+
+ +[0-9a-f]+ +data \+ 0x[0-9a-f]+
#pass
diff --git a/ld/testsuite/ld-elf/dt-relr-2c.d b/ld/testsuite/ld-elf/dt-relr-2c.d
index c285e87..7f6383b 100644
--- a/ld/testsuite/ld-elf/dt-relr-2c.d
+++ b/ld/testsuite/ld-elf/dt-relr-2c.d
@@ -13,5 +13,8 @@ Relocation section '\.rel(a|)\.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
[0-9a-f]+ +[0-9a-f]+ +R_.*_(RELATIVE|UADDR.*) .*
#...
Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
- 3 offsets
+#...
+0000: +[0-9a-f]+ [0-9a-f]+ +.* \(new starting address\)
+0001: +[0-9a-f]+ [0-9a-f]+ +.* \(start of bitmap\)
+ +[0-9a-f]+ +.*
#pass
diff --git a/ld/testsuite/ld-elf/dt-relr-2d.d b/ld/testsuite/ld-elf/dt-relr-2d.d
index 7fd3046..f1184fe 100644
--- a/ld/testsuite/ld-elf/dt-relr-2d.d
+++ b/ld/testsuite/ld-elf/dt-relr-2d.d
@@ -13,5 +13,9 @@ Relocation section '\.rel(a|)\.dyn' at offset 0x[0-9a-f]+ contains 1 entry:
[0-9a-f]+ +[0-9a-f]+ +R_.*_(RELATIVE|UADDR.*) .*
#...
Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
- 4 offsets
+#...
+0000: +[0-9a-f]+ [0-9a-f]+ +data \(new starting address\)
+0001: +[0-9a-f]+ [0-9a-f]+ +data \+ 0x[0-9a-f]+ \(start of bitmap\)
+ +[0-9a-f]+ +data \+ 0x[0-9a-f]+
+ +[0-9a-f]+ +data \+ 0x[0-9a-f]+
#pass
diff --git a/ld/testsuite/ld-elf/dt-relr-2e.d b/ld/testsuite/ld-elf/dt-relr-2e.d
index cdff846..eddb5e3 100644
--- a/ld/testsuite/ld-elf/dt-relr-2e.d
+++ b/ld/testsuite/ld-elf/dt-relr-2e.d
@@ -13,5 +13,9 @@ Relocation section '\.rel(a|)\.data' at offset 0x[0-9a-f]+ contains 1 entry:
[0-9a-f]+ +[0-9a-f]+ +R_.*_(RELATIVE|UADDR.*) .*
#...
Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
- 4 offsets
+#...
+0000: +[0-9a-f]+ [0-9a-f]+ +data \(new starting address\)
+0001: +[0-9a-f]+ [0-9a-f]+ +data \+ 0x[0-9a-f]+ \(start of bitmap\)
+ +[0-9a-f]+ +data \+ 0x[0-9a-f]+
+ +[0-9a-f]+ +data \+ 0x[0-9a-f]+
#pass
diff --git a/ld/testsuite/ld-elf/dt-relr-2i.d b/ld/testsuite/ld-elf/dt-relr-2i.d
index ed0ef9c..55e8c25 100644
--- a/ld/testsuite/ld-elf/dt-relr-2i.d
+++ b/ld/testsuite/ld-elf/dt-relr-2i.d
@@ -13,5 +13,9 @@ Relocation section '\.rel(a|)\.dyn' at offset 0x[0-9a-f]+ contains 1 entry:
[0-9a-f]+ +[0-9a-f]+ +R_.*_(RELATIVE|UADDR.*) .*
#...
Relocation section '\.relr\.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
- 4 offsets
+#...
+0000: +[0-9a-f]+ [0-9a-f]+ +data \(new starting address\)
+0001: +[0-9a-f]+ [0-9a-f]+ +data \+ 0x[0-9a-f]+ \(start of bitmap\)
+ +[0-9a-f]+ +data \+ 0x[0-9a-f]+
+ +[0-9a-f]+ +data \+ 0x[0-9a-f]+
#pass
diff --git a/ld/testsuite/ld-i386/dt-relr-1a.d b/ld/testsuite/ld-i386/dt-relr-1a.d
index cbb8ab6..3944911 100644
--- a/ld/testsuite/ld-i386/dt-relr-1a.d
+++ b/ld/testsuite/ld-i386/dt-relr-1a.d
@@ -14,11 +14,10 @@ Relocation section '\.rel\.plt' at offset 0x[0-9a-f]+ contains 1 entry:
[0-9a-f]+ +[0-9a-f]+ +R_386_JUMP_SLOT +0+ +func1
Relocation section '.relr.dyn' at offset 0x[a-f0-9]+ contains 2 entries:
- +3 offsets
-[a-f0-9]+
-[a-f0-9]+
-[a-f0-9]+
-
+#...
+0000: +[0-9a-f]+ [0-9a-f]+ +.* \(new starting address\)
+0001: +[0-9a-f]+ [0-9a-f]+ +.* \(start of bitmap\)
+ +[0-9a-f]+ +.*
#...
Symbol table '.symtab' contains [0-9]+ entries:
Num: Value Size Type Bind Vis Ndx Name
diff --git a/ld/testsuite/ld-i386/dt-relr-1b.d b/ld/testsuite/ld-i386/dt-relr-1b.d
index 3dd9881..947d835 100644
--- a/ld/testsuite/ld-i386/dt-relr-1b.d
+++ b/ld/testsuite/ld-i386/dt-relr-1b.d
@@ -17,11 +17,10 @@ Relocation section '\.rel\.plt' at offset 0x[0-9a-f]+ contains 1 entry:
[0-9a-f]+ +[0-9a-f]+ +R_386_JUMP_SLOT +0+ +func1
Relocation section '.relr.dyn' at offset 0x[a-f0-9]+ contains 2 entries:
- +3 offsets
-[a-f0-9]+
-[a-f0-9]+
-[a-f0-9]+
-
+#...
+0000: +[0-9a-f]+ [0-9a-f]+ +.* \(new starting address\)
+0001: +[0-9a-f]+ [0-9a-f]+ +.* \(start of bitmap\)
+ +[0-9a-f]+ +.*
#...
Symbol table '.symtab' contains [0-9]+ entries:
Num: Value Size Type Bind Vis Ndx Name
diff --git a/ld/testsuite/ld-powerpc/abs-pie-relr.r b/ld/testsuite/ld-powerpc/abs-pie-relr.r
index 22effe8..049cd7a 100644
--- a/ld/testsuite/ld-powerpc/abs-pie-relr.r
+++ b/ld/testsuite/ld-powerpc/abs-pie-relr.r
@@ -4,5 +4,5 @@
#readelf: -rW
Relocation section '\.relr\.dyn' at offset .* contains 1 entry:
- 1 offset
-0+10338
+Index: Entry: +Address relocated Symbolic Address +Notes
+0000: +[0-9a-f]+ [0-9a-f]+ +x \(new starting address\)
diff --git a/ld/testsuite/ld-powerpc/abs-shared-relr.r b/ld/testsuite/ld-powerpc/abs-shared-relr.r
index 978c43a..3ce70f7 100644
--- a/ld/testsuite/ld-powerpc/abs-shared-relr.r
+++ b/ld/testsuite/ld-powerpc/abs-shared-relr.r
@@ -13,5 +13,6 @@ Relocation section '\.rela\.dyn' at offset .* contains 6 entries:
0+10450 0+400000026 R_PPC64_ADDR64 123456789abcdef0 c \+ 0
Relocation section '\.relr\.dyn' at offset .* contains 1 entry:
- 1 offset
-0+10438
+Index: Entry: +Address relocated Symbolic Address +Notes
+0000: +[0-9a-f]+ [0-9a-f]+ +x \(new starting address\)
+
diff --git a/ld/testsuite/ld-x86-64/dt-relr-1a-x32.d b/ld/testsuite/ld-x86-64/dt-relr-1a-x32.d
index 8f2f6fc..78ffda9 100644
--- a/ld/testsuite/ld-x86-64/dt-relr-1a-x32.d
+++ b/ld/testsuite/ld-x86-64/dt-relr-1a-x32.d
@@ -14,11 +14,10 @@ Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entry:
[0-9a-f]+ +[0-9a-f]+ +R_X86_64_JUMP_SLOT +0+ +func1 \+ 0
Relocation section '.relr.dyn' at offset 0x[a-f0-9]+ contains 2 entries:
- +3 offsets
-[a-f0-9]+
-[a-f0-9]+
-[a-f0-9]+
-
+#...
+0000: +[0-9a-f]+ [0-9a-f]+ +.* \(new starting address\)
+0001: +[0-9a-f]+ [0-9a-f]+ +.* \(start of bitmap\)
+ +[0-9a-f]+ +.*
#...
Symbol table '.symtab' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
diff --git a/ld/testsuite/ld-x86-64/dt-relr-1a.d b/ld/testsuite/ld-x86-64/dt-relr-1a.d
index 218594d..8e09925 100644
--- a/ld/testsuite/ld-x86-64/dt-relr-1a.d
+++ b/ld/testsuite/ld-x86-64/dt-relr-1a.d
@@ -14,11 +14,10 @@ Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entry:
[0-9a-f]+ +[0-9a-f]+ +R_X86_64_JUMP_SLOT +0+ +func1 \+ 0
Relocation section '.relr.dyn' at offset 0x[a-f0-9]+ contains 2 entries:
- +3 offsets
-[a-f0-9]+
-[a-f0-9]+
-[a-f0-9]+
-
+#...
+0000: +[0-9a-f]+ [0-9a-f]+ +.* \(new starting address\)
+0001: +[0-9a-f]+ [0-9a-f]+ +.* \(start of bitmap\)
+ +[0-9a-f]+ +.*
#...
Symbol table '.symtab' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
diff --git a/ld/testsuite/ld-x86-64/dt-relr-1b-x32.d b/ld/testsuite/ld-x86-64/dt-relr-1b-x32.d
index 0ddffc8..c2e3a3a 100644
--- a/ld/testsuite/ld-x86-64/dt-relr-1b-x32.d
+++ b/ld/testsuite/ld-x86-64/dt-relr-1b-x32.d
@@ -17,11 +17,10 @@ Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entry:
[0-9a-f]+ +[0-9a-f]+ +R_X86_64_JUMP_SLOT +0+ +func1 \+ 0
Relocation section '.relr.dyn' at offset 0x[a-f0-9]+ contains 2 entries:
- +3 offsets
-[a-f0-9]+
-[a-f0-9]+
-[a-f0-9]+
-
+#...
+0000: +[0-9a-f]+ [0-9a-f]+ +.* \(new starting address\)
+0001: +[0-9a-f]+ [0-9a-f]+ +.* \(start of bitmap\)
+ +[0-9a-f]+ +.*
#...
Symbol table '.symtab' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
diff --git a/ld/testsuite/ld-x86-64/dt-relr-1b.d b/ld/testsuite/ld-x86-64/dt-relr-1b.d
index 4e462dd..03e0202 100644
--- a/ld/testsuite/ld-x86-64/dt-relr-1b.d
+++ b/ld/testsuite/ld-x86-64/dt-relr-1b.d
@@ -17,11 +17,10 @@ Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entry:
[0-9a-f]+ +[0-9a-f]+ +R_X86_64_JUMP_SLOT +0+ +func1 \+ 0
Relocation section '.relr.dyn' at offset 0x[a-f0-9]+ contains 2 entries:
- +3 offsets
-[a-f0-9]+
-[a-f0-9]+
-[a-f0-9]+
-
+#...
+0000: +[0-9a-f]+ [0-9a-f]+ +.* \(new starting address\)
+0001: +[0-9a-f]+ [0-9a-f]+ +.* \(start of bitmap\)
+ +[0-9a-f]+ +.*
#...
Symbol table '.symtab' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name