aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Chigot <chigot@adacore.com>2022-10-28 15:02:32 +0200
committerClément Chigot <chigot@adacore.com>2023-02-28 15:14:44 +0100
commit06bc164e6c736e3cbde2af7834ac14b7dbba417e (patch)
tree6642dceb3a9bc1870f6f679eb94c634473962747
parent6d9fb23e881f7dcd8b5405d5ccd27146de29098e (diff)
downloadgdb-06bc164e6c736e3cbde2af7834ac14b7dbba417e.zip
gdb-06bc164e6c736e3cbde2af7834ac14b7dbba417e.tar.gz
gdb-06bc164e6c736e3cbde2af7834ac14b7dbba417e.tar.bz2
ld/testsuite: adjust tests dump to handle _btext on aarch64-qnx
_btext symbol is a custom symbol made by the aarch64-qnx linker script to mark the beginning of the .text section. However, this symbol might replace the first symbol of .text that should be printed by objdump. This is due to the fact that objdump is internally ordering symbols lexically if it cannot order them by another way. ld/ChangeLog: * testsuite/ld-aarch64/emit-relocs-309-low.d: Allow _btext as first symbol. * testsuite/ld-aarch64/emit-relocs-309-up.d: Likewise. * testsuite/ld-aarch64/erratum843419-adr.d: Likewise. * testsuite/ld-aarch64/erratum843419-adrp.d: Likewise. * testsuite/ld-aarch64/erratum843419-far-full.d: Likewise. * testsuite/ld-aarch64/erratum843419-full.d: Likewise. * testsuite/ld-aarch64/erratum843419-no-args.d: Likewise. * testsuite/ld-aarch64/farcall-b-defsym.d: Likewise. * testsuite/ld-aarch64/farcall-b-none-function.d: Likewise. * testsuite/ld-aarch64/farcall-b-plt.d: Likewise. * testsuite/ld-aarch64/farcall-b-section.d: Likewise. * testsuite/ld-aarch64/farcall-b.d: Likewise. * testsuite/ld-aarch64/farcall-bl-defsym.d: Likewise. * testsuite/ld-aarch64/farcall-bl-none-function.d: Likewise. * testsuite/ld-aarch64/farcall-bl-plt.d: Likewise. * testsuite/ld-aarch64/farcall-bl-section.d: Likewise. * testsuite/ld-aarch64/farcall-bl.d: Likewise. * testsuite/ld-aarch64/farcall-group.d: Likewise. * testsuite/ld-aarch64/ifunc-1-local.d: Likewise. * testsuite/ld-aarch64/ifunc-2-local.d: Likewise. * testsuite/ld-aarch64/ifunc-21.d: Likewise. * testsuite/ld-aarch64/ifunc-3a.d: Likewise. * testsuite/ld-aarch64/ifunc-7c.d: Likewise. * testsuite/ld-aarch64/limit-b.d: Likewise. * testsuite/ld-aarch64/tls-gd-symbolic: Likewise.
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-309-low.d2
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-309-up.d2
-rw-r--r--ld/testsuite/ld-aarch64/erratum843419-adr.d4
-rw-r--r--ld/testsuite/ld-aarch64/erratum843419-adrp.d4
-rw-r--r--ld/testsuite/ld-aarch64/erratum843419-far-full.d4
-rw-r--r--ld/testsuite/ld-aarch64/erratum843419-full.d8
-rw-r--r--ld/testsuite/ld-aarch64/erratum843419-no-args.d8
-rw-r--r--ld/testsuite/ld-aarch64/farcall-b-defsym.d2
-rw-r--r--ld/testsuite/ld-aarch64/farcall-b-none-function.d2
-rw-r--r--ld/testsuite/ld-aarch64/farcall-b-plt.d2
-rw-r--r--ld/testsuite/ld-aarch64/farcall-b-section.d2
-rw-r--r--ld/testsuite/ld-aarch64/farcall-b.d2
-rw-r--r--ld/testsuite/ld-aarch64/farcall-bl-defsym.d2
-rw-r--r--ld/testsuite/ld-aarch64/farcall-bl-none-function.d2
-rw-r--r--ld/testsuite/ld-aarch64/farcall-bl-plt.d2
-rw-r--r--ld/testsuite/ld-aarch64/farcall-bl-section.d2
-rw-r--r--ld/testsuite/ld-aarch64/farcall-bl.d2
-rw-r--r--ld/testsuite/ld-aarch64/farcall-group.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-1-local.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-2-local.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-21.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-3a.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-7c.d2
-rw-r--r--ld/testsuite/ld-aarch64/limit-b.d2
-rw-r--r--ld/testsuite/ld-aarch64/limit-bl.d2
-rw-r--r--ld/testsuite/ld-aarch64/tls-gd-symbolic.d2
26 files changed, 35 insertions, 35 deletions
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-309-low.d b/ld/testsuite/ld-aarch64/emit-relocs-309-low.d
index 93896cf..a24a9c4 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-309-low.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-309-low.d
@@ -7,6 +7,6 @@
Disassembly of section \.text:
-0000000000100004 <_start>:
+0000000000100004 <(_start|_btext)>:
100004: d503201f nop
100008: 58800000 ldr x0, 8 .*
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-309-up.d b/ld/testsuite/ld-aarch64/emit-relocs-309-up.d
index 32922ee..1cd7ad6f 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-309-up.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-309-up.d
@@ -7,6 +7,6 @@
Disassembly of section \.text:
-0000000000000000 <_start>:
+0000000000000000 <(_start|_btext)>:
0: d503201f nop
4: 587fffe0 ldr x0, 100000 .*
diff --git a/ld/testsuite/ld-aarch64/erratum843419-adr.d b/ld/testsuite/ld-aarch64/erratum843419-adr.d
index ab4fe27..975509c 100644
--- a/ld/testsuite/ld-aarch64/erratum843419-adr.d
+++ b/ld/testsuite/ld-aarch64/erratum843419-adr.d
@@ -6,9 +6,9 @@
Disassembly of section \.text:
-0*400000 <_start>:
+0*400000 <(_start|_btext)>:
...
- 400ffc: 10038020 adr x0, 408000 <_start\+0x8000>
+ 400ffc: 10038020 adr x0, 408000 <(_start|_btext)\+0x8000>
401000: f9000042 str x2, \[x2\]
401004: d2800002 mov x2, #0x0 // #0
401008: f9402001 ldr x1, \[x0, #64\]
diff --git a/ld/testsuite/ld-aarch64/erratum843419-adrp.d b/ld/testsuite/ld-aarch64/erratum843419-adrp.d
index 371201c..81264f0 100644
--- a/ld/testsuite/ld-aarch64/erratum843419-adrp.d
+++ b/ld/testsuite/ld-aarch64/erratum843419-adrp.d
@@ -6,7 +6,7 @@
Disassembly of section \.text:
-0*400000 <_start>:
+0*400000 <(_start|_btext)>:
...
400ffc: 90000040 adrp x0, 408000 <e843419@0002_00000010_1008\+0x6fe8>
401000: f9000042 str x2, \[x2\]
@@ -18,5 +18,5 @@ Disassembly of section \.text:
0*401018 <e843419@0002_00000010_1008>:
401018: f9402001 ldr x1, \[x0, #64\]
- 40101c: 17fffffc b 40100c <_start\+0x100c>
+ 40101c: 17fffffc b 40100c <(_start|_btext)\+0x100c>
...
diff --git a/ld/testsuite/ld-aarch64/erratum843419-far-full.d b/ld/testsuite/ld-aarch64/erratum843419-far-full.d
index 24f2be5..dad7727 100644
--- a/ld/testsuite/ld-aarch64/erratum843419-far-full.d
+++ b/ld/testsuite/ld-aarch64/erratum843419-far-full.d
@@ -6,7 +6,7 @@
Disassembly of section \.text:
-0*400000 <_start>:
+0*400000 <(_start|_btext)>:
...
400ffc: 90400000 adrp x0, 80400000 <__bss_end__\+0x7ffedff0>
401000: f9000042 str x2, \[x2\]
@@ -18,5 +18,5 @@ Disassembly of section \.text:
0*401018 <e843419@0002_00000010_1008>:
401018: f9402001 ldr x1, \[x0, #64\]
- 40101c: 17fffffc b 40100c <_start\+0x100c>
+ 40101c: 17fffffc b 40100c <(_start|_btext)\+0x100c>
...
diff --git a/ld/testsuite/ld-aarch64/erratum843419-full.d b/ld/testsuite/ld-aarch64/erratum843419-full.d
index 508216d..169d0cd 100644
--- a/ld/testsuite/ld-aarch64/erratum843419-full.d
+++ b/ld/testsuite/ld-aarch64/erratum843419-full.d
@@ -6,15 +6,15 @@
Disassembly of section \.text:
-0*400000 <_start>:
+0*400000 <(_start|_btext)>:
...
- 400ffc: 10038020 adr x0, 408000 <_start\+0x8000>
+ 400ffc: 10038020 adr x0, 408000 <(_start|_btext)\+0x8000>
401000: f9000042 str x2, \[x2\]
401004: d2800002 mov x2, #0x0 // #0
401008: f9402001 ldr x1, \[x0, #64\]
40100c: d503201f nop
- 401010: 14000400 b 402010 <_start\+0x2010>
+ 401010: 14000400 b 402010 <(_start|_btext)\+0x2010>
401014: d503201f nop
401018: f9402001 ldr x1, \[x0, #64\]
- 40101c: 17fffffc b 40100c <_start\+0x100c>
+ 40101c: 17fffffc b 40100c <(_start|_btext)\+0x100c>
...
diff --git a/ld/testsuite/ld-aarch64/erratum843419-no-args.d b/ld/testsuite/ld-aarch64/erratum843419-no-args.d
index 30773f6..e18b362 100644
--- a/ld/testsuite/ld-aarch64/erratum843419-no-args.d
+++ b/ld/testsuite/ld-aarch64/erratum843419-no-args.d
@@ -6,15 +6,15 @@
Disassembly of section \.text:
-0*400000 <_start>:
+0*400000 <(_start|_btext)>:
...
- 400ffc: 10038020 adr x0, 408000 <_start\+0x8000>
+ 400ffc: 10038020 adr x0, 408000 <(_start|_btext)\+0x8000>
401000: f9000042 str x2, \[x2\]
401004: d2800002 mov x2, #0x0 // #0
401008: f9402001 ldr x1, \[x0, #64\]
40100c: d503201f nop
- 401010: 14000400 b 402010 <_start\+0x2010>
+ 401010: 14000400 b 402010 <(_start|_btext)\+0x2010>
401014: d503201f nop
401018: f9402001 ldr x1, \[x0, #64\]
- 40101c: 17fffffc b 40100c <_start\+0x100c>
+ 40101c: 17fffffc b 40100c <(_start|_btext)\+0x100c>
...
diff --git a/ld/testsuite/ld-aarch64/farcall-b-defsym.d b/ld/testsuite/ld-aarch64/farcall-b-defsym.d
index f6b0921..7788873 100644
--- a/ld/testsuite/ld-aarch64/farcall-b-defsym.d
+++ b/ld/testsuite/ld-aarch64/farcall-b-defsym.d
@@ -7,7 +7,7 @@
Disassembly of section .text:
-0+1000 <_start>:
+0+1000 <(_start|_btext)>:
+1000: 14000004 b 1010 <__bar_veneer>
+1004: d65f03c0 ret
[ \t]+1008:[ \t]+14000008[ \t]+b[ \t]+1028 <__bar_veneer\+0x18>
diff --git a/ld/testsuite/ld-aarch64/farcall-b-none-function.d b/ld/testsuite/ld-aarch64/farcall-b-none-function.d
index e06936c..46773f2 100644
--- a/ld/testsuite/ld-aarch64/farcall-b-none-function.d
+++ b/ld/testsuite/ld-aarch64/farcall-b-none-function.d
@@ -7,7 +7,7 @@
Disassembly of section .text:
-.* <_start>:
+.* <(_start|_btext)>:
1000: 14000004 b 1010 <__bar_veneer>
1004: d65f03c0 ret
1008: 14000008 b 1028 <__bar_veneer\+0x18>
diff --git a/ld/testsuite/ld-aarch64/farcall-b-plt.d b/ld/testsuite/ld-aarch64/farcall-b-plt.d
index 90dc243..7686d99 100644
--- a/ld/testsuite/ld-aarch64/farcall-b-plt.d
+++ b/ld/testsuite/ld-aarch64/farcall-b-plt.d
@@ -26,7 +26,7 @@ Disassembly of section .plt:
Disassembly of section .text:
-.* <_start>:
+.* <(_start|_btext)>:
...
.*: .* b .* <__foo_veneer>
.*: d65f03c0 ret
diff --git a/ld/testsuite/ld-aarch64/farcall-b-section.d b/ld/testsuite/ld-aarch64/farcall-b-section.d
index 40b1072..c5a515d 100644
--- a/ld/testsuite/ld-aarch64/farcall-b-section.d
+++ b/ld/testsuite/ld-aarch64/farcall-b-section.d
@@ -7,7 +7,7 @@
Disassembly of section .text:
-.* <_start>:
+.* <(_start|_btext)>:
1000: 1400000a b 1028 <___veneer>
1004: 14000005 b 1018 <___veneer>
1008: d65f03c0 ret
diff --git a/ld/testsuite/ld-aarch64/farcall-b.d b/ld/testsuite/ld-aarch64/farcall-b.d
index cfa0688..96ee987 100644
--- a/ld/testsuite/ld-aarch64/farcall-b.d
+++ b/ld/testsuite/ld-aarch64/farcall-b.d
@@ -7,7 +7,7 @@
Disassembly of section .text:
-0+1000 <_start>:
+0+1000 <(_start|_btext)>:
+1000: 14000004 b 1010 <__bar_veneer>
+1004: d65f03c0 ret
[ \t]+1008:[ \t]+14000008[ \t]+b[ \t]+1028 <__bar_veneer\+0x18>
diff --git a/ld/testsuite/ld-aarch64/farcall-bl-defsym.d b/ld/testsuite/ld-aarch64/farcall-bl-defsym.d
index 4a3ab80..cda184a 100644
--- a/ld/testsuite/ld-aarch64/farcall-bl-defsym.d
+++ b/ld/testsuite/ld-aarch64/farcall-bl-defsym.d
@@ -7,7 +7,7 @@
Disassembly of section .text:
-0+1000 <_start>:
+0+1000 <(_start|_btext)>:
[ \t]+1000:[ \t]+94000004[ \t]+bl[ \t]+1010 <__bar_veneer>
[ \t]+1004:[ \t]+d65f03c0[ \t]+ret
[ \t]+1008:[ \t]+14000008[ \t]+b[ \t]+1028 <__bar_veneer\+0x18>
diff --git a/ld/testsuite/ld-aarch64/farcall-bl-none-function.d b/ld/testsuite/ld-aarch64/farcall-bl-none-function.d
index 4ab9c7e..061a4e4 100644
--- a/ld/testsuite/ld-aarch64/farcall-bl-none-function.d
+++ b/ld/testsuite/ld-aarch64/farcall-bl-none-function.d
@@ -7,7 +7,7 @@
Disassembly of section .text:
-.* <_start>:
+.* <(_start|_btext)>:
1000: 94000004 bl 1010 <__bar_veneer>
1004: d65f03c0 ret
1008: 14000008 b 1028 <__bar_veneer\+0x18>
diff --git a/ld/testsuite/ld-aarch64/farcall-bl-plt.d b/ld/testsuite/ld-aarch64/farcall-bl-plt.d
index a8d78d3..0f9f216 100644
--- a/ld/testsuite/ld-aarch64/farcall-bl-plt.d
+++ b/ld/testsuite/ld-aarch64/farcall-bl-plt.d
@@ -26,7 +26,7 @@ Disassembly of section .plt:
Disassembly of section .text:
-.* <_start>:
+.* <(_start|_btext)>:
...
.*: .* bl .* <__foo_veneer>
.*: d65f03c0 ret
diff --git a/ld/testsuite/ld-aarch64/farcall-bl-section.d b/ld/testsuite/ld-aarch64/farcall-bl-section.d
index b3ed36f..26c15a3 100644
--- a/ld/testsuite/ld-aarch64/farcall-bl-section.d
+++ b/ld/testsuite/ld-aarch64/farcall-bl-section.d
@@ -7,7 +7,7 @@
Disassembly of section .text:
-.* <_start>:
+.* <(_start|_btext)>:
1000: 9400000a bl 1028 <___veneer>
1004: 94000005 bl 1018 <___veneer>
1008: d65f03c0 ret
diff --git a/ld/testsuite/ld-aarch64/farcall-bl.d b/ld/testsuite/ld-aarch64/farcall-bl.d
index 637225b..492abb7 100644
--- a/ld/testsuite/ld-aarch64/farcall-bl.d
+++ b/ld/testsuite/ld-aarch64/farcall-bl.d
@@ -7,7 +7,7 @@
Disassembly of section .text:
-0+1000 <_start>:
+0+1000 <(_start|_btext)>:
[ \t]+1000:[ \t]+94000004[ \t]+ bl[ \t]+1010 <__bar_veneer>
[ \t]+1004:[ \t]+d65f03c0[ \t]+ret
[ \t]+1008:[ \t]+14000008[ \t]+b[ \t]+1028 <__bar_veneer\+0x18>
diff --git a/ld/testsuite/ld-aarch64/farcall-group.d b/ld/testsuite/ld-aarch64/farcall-group.d
index 365b6b9..2567cc4 100644
--- a/ld/testsuite/ld-aarch64/farcall-group.d
+++ b/ld/testsuite/ld-aarch64/farcall-group.d
@@ -7,7 +7,7 @@
Disassembly of section .text:
-0000000000400078 <_start>:
+0000000000400078 <(_start|_btext)>:
400078: 95000008 bl 4400098 <__end_veneer>
...
440007c: (d503201f|1f2003d5) .word 0x(d503201f|1f2003d5)
diff --git a/ld/testsuite/ld-aarch64/ifunc-1-local.d b/ld/testsuite/ld-aarch64/ifunc-1-local.d
index 0d4a92c..ebd798b 100644
--- a/ld/testsuite/ld-aarch64/ifunc-1-local.d
+++ b/ld/testsuite/ld-aarch64/ifunc-1-local.d
@@ -3,7 +3,7 @@
#objdump: -dw
#...
-0+(110|180|1a0) <(__GI_)?foo>:
+0+(110|180|1a0) <((__GI_)?foo|_btext)>:
#...
[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x110|0x180|0x1a0)@plt>
#pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-2-local.d b/ld/testsuite/ld-aarch64/ifunc-2-local.d
index c4054e7..cb130a6 100644
--- a/ld/testsuite/ld-aarch64/ifunc-2-local.d
+++ b/ld/testsuite/ld-aarch64/ifunc-2-local.d
@@ -3,7 +3,7 @@
#objdump: -dw
#...
-0+(110|180|1a0) <__GI_foo>:
+0+(110|180|1a0) <(__GI_foo|_btext)>:
#...
[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(110|180|1a0)@plt>
[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*>
diff --git a/ld/testsuite/ld-aarch64/ifunc-21.d b/ld/testsuite/ld-aarch64/ifunc-21.d
index 28115d2..ff4a82a 100644
--- a/ld/testsuite/ld-aarch64/ifunc-21.d
+++ b/ld/testsuite/ld-aarch64/ifunc-21.d
@@ -15,7 +15,7 @@ Contents of section .got.plt:
Disassembly of section .text:
-.* <ifunc>:
+.* <(ifunc|_btext)>:
.*: d65f03c0 ret
.* <bar>:
diff --git a/ld/testsuite/ld-aarch64/ifunc-3a.d b/ld/testsuite/ld-aarch64/ifunc-3a.d
index 4643647..7cb854d 100644
--- a/ld/testsuite/ld-aarch64/ifunc-3a.d
+++ b/ld/testsuite/ld-aarch64/ifunc-3a.d
@@ -4,7 +4,7 @@
#objdump: -dw
#...
-0+(150|1d0|1e8) <__GI_foo>:
+0+(150|1d0|1e8) <(__GI_foo|_btext)>:
#...
[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(150|1d0|1e8)@plt>
#pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-7c.d b/ld/testsuite/ld-aarch64/ifunc-7c.d
index e526fea..538b216 100644
--- a/ld/testsuite/ld-aarch64/ifunc-7c.d
+++ b/ld/testsuite/ld-aarch64/ifunc-7c.d
@@ -10,7 +10,7 @@
Disassembly of section \.text:
-[0-9a-f]+ <foo>:
+[0-9a-f]+ <(foo|_btext)>:
[0-9a-f]+: d65f03c0 ret
[0-9a-f]+ <__start>:
diff --git a/ld/testsuite/ld-aarch64/limit-b.d b/ld/testsuite/ld-aarch64/limit-b.d
index c32bbbc..70d1c9d 100644
--- a/ld/testsuite/ld-aarch64/limit-b.d
+++ b/ld/testsuite/ld-aarch64/limit-b.d
@@ -7,7 +7,7 @@
Disassembly of section .text:
-0+1000 <_start>:
+0+1000 <(_start|_btext)>:
1000: 15ffffff b 8000ffc <bar>
1004: d65f03c0 ret
diff --git a/ld/testsuite/ld-aarch64/limit-bl.d b/ld/testsuite/ld-aarch64/limit-bl.d
index 0e4e622..09cea95 100644
--- a/ld/testsuite/ld-aarch64/limit-bl.d
+++ b/ld/testsuite/ld-aarch64/limit-bl.d
@@ -7,7 +7,7 @@
Disassembly of section .text:
-0+1000 <_start>:
+0+1000 <(_start|_btext)>:
1000: 95ffffff bl 8000ffc <bar>
1004: d65f03c0 ret
diff --git a/ld/testsuite/ld-aarch64/tls-gd-symbolic.d b/ld/testsuite/ld-aarch64/tls-gd-symbolic.d
index d6732ac..595d377 100644
--- a/ld/testsuite/ld-aarch64/tls-gd-symbolic.d
+++ b/ld/testsuite/ld-aarch64/tls-gd-symbolic.d
@@ -9,7 +9,7 @@
Disassembly of section \.text:
-[0-9a-f]+ <_test_tls_desc>:
+[0-9a-f]+ <(_test_tls_desc|_btext)>:
+[0-9a-f]+: ........ adrp x0, .*
+[0-9a-f]+: ........ ldr x1, \[x0, #.*\]
+[0-9a-f]+: ........ add x0, x0, .*