]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld/testsuite: adjust tests dump to handle _btext on aarch64-qnx
authorClément Chigot <chigot@adacore.com>
Fri, 28 Oct 2022 13:02:32 +0000 (15:02 +0200)
committerClément Chigot <chigot@adacore.com>
Tue, 28 Feb 2023 14:14:44 +0000 (15:14 +0100)
_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.

26 files changed:
ld/testsuite/ld-aarch64/emit-relocs-309-low.d
ld/testsuite/ld-aarch64/emit-relocs-309-up.d
ld/testsuite/ld-aarch64/erratum843419-adr.d
ld/testsuite/ld-aarch64/erratum843419-adrp.d
ld/testsuite/ld-aarch64/erratum843419-far-full.d
ld/testsuite/ld-aarch64/erratum843419-full.d
ld/testsuite/ld-aarch64/erratum843419-no-args.d
ld/testsuite/ld-aarch64/farcall-b-defsym.d
ld/testsuite/ld-aarch64/farcall-b-none-function.d
ld/testsuite/ld-aarch64/farcall-b-plt.d
ld/testsuite/ld-aarch64/farcall-b-section.d
ld/testsuite/ld-aarch64/farcall-b.d
ld/testsuite/ld-aarch64/farcall-bl-defsym.d
ld/testsuite/ld-aarch64/farcall-bl-none-function.d
ld/testsuite/ld-aarch64/farcall-bl-plt.d
ld/testsuite/ld-aarch64/farcall-bl-section.d
ld/testsuite/ld-aarch64/farcall-bl.d
ld/testsuite/ld-aarch64/farcall-group.d
ld/testsuite/ld-aarch64/ifunc-1-local.d
ld/testsuite/ld-aarch64/ifunc-2-local.d
ld/testsuite/ld-aarch64/ifunc-21.d
ld/testsuite/ld-aarch64/ifunc-3a.d
ld/testsuite/ld-aarch64/ifunc-7c.d
ld/testsuite/ld-aarch64/limit-b.d
ld/testsuite/ld-aarch64/limit-bl.d
ld/testsuite/ld-aarch64/tls-gd-symbolic.d

index 93896cfc8733e0052bd86bfb0cc9ec8011a465f6..a24a9c4967a921827e7e8343f9e88e332cc0bab0 100644 (file)
@@ -7,6 +7,6 @@
 
 Disassembly of section \.text:
 
-0000000000100004 <_start>:
+0000000000100004 <(_start|_btext)>:
   100004:      d503201f        nop
   100008:      58800000        ldr     x0, 8 .*
index 32922eef092b7cd1cdced69ffbf640755e1dd6c7..1cd7ad6f4bd0ad4d5b5d244daaaff9428d9e06c3 100644 (file)
@@ -7,6 +7,6 @@
 
 Disassembly of section \.text:
 
-0000000000000000 <_start>:
+0000000000000000 <(_start|_btext)>:
    0:  d503201f        nop
    4:  587fffe0        ldr     x0, 100000 .*
index ab4fe27e09ec22460bba259220a17d2ff25b5eb4..975509cd0447b3069629f5352cb5ffd43c8e7b9a 100644 (file)
@@ -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\]
index 371201cf0b81579495e1f3164b9cb7bdb784138a..81264f0fd69523e25b2a0fae18cbe8be1f07e369 100644 (file)
@@ -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>
        ...
index 24f2be59ceea5be2079fa74bc9a8ff03717f01ff..dad77272fd566201187d95b29dedaada4feb2c9d 100644 (file)
@@ -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>
        ...
index 508216d2bca2e1fec28a1db3ac0b0bf20e0e3c87..169d0cd40fec98fc786cd3ce8292dcd752a5d6f3 100644 (file)
@@ -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>
        ...
index 30773f6761595470200e3a51cbd373c72de6adca..e18b362064d0e943ea67d995ecdcd78ec5591eda 100644 (file)
@@ -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>
        ...
index f6b092116cd8de80627b4443f35fa8143fb13c73..7788873e315f2b6b288a307c8758a5ee606cd917 100644 (file)
@@ -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>
index e06936c347ae75024ce2bf82d12d9f7935fe8cbf..46773f223d197a37e9a849fba9fde8ea12ba450c 100644 (file)
@@ -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>
index 90dc243b68b998c77c3e7c8fb26cec38483e560c..7686d99f887c273e8b75798fee53f5911b46023d 100644 (file)
@@ -26,7 +26,7 @@ Disassembly of section .plt:
 
 Disassembly of section .text:
 
-.* <_start>:
+.* <(_start|_btext)>:
        ...
 .*:    .*      b       .* <__foo_veneer>
 .*:    d65f03c0        ret
index 40b10720953f5b0ec93bebcb8a190fb01cbe540c..c5a515d84d74870a71893dfe5983d23bbade97ee 100644 (file)
@@ -7,7 +7,7 @@
 
 Disassembly of section .text:
 
-.* <_start>:
+.* <(_start|_btext)>:
     1000:      1400000a        b       1028 <___veneer>
     1004:      14000005        b       1018 <___veneer>
     1008:      d65f03c0        ret
index cfa0688646e95a98eef2b96b45410880fb86c8c7..96ee987c84fb05f58db89e47e161b1b709ea272c 100644 (file)
@@ -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>
index 4a3ab80d85a8d28c637a8ad645ff697687213991..cda184acaf47cdf68df8ae5e5802cae9d7bf4417 100644 (file)
@@ -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>
index 4ab9c7eed40d33090d9925542bb349184e6a4dea..061a4e4eab61669d9cd7522e7150afd4a65f95e0 100644 (file)
@@ -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>
index a8d78d389758934f599181be5c25ed9ebb455fc9..0f9f216447e52b1a304a81ae5f624ecb4d6171bc 100644 (file)
@@ -26,7 +26,7 @@ Disassembly of section .plt:
 
 Disassembly of section .text:
 
-.* <_start>:
+.* <(_start|_btext)>:
        ...
 .*:    .*      bl      .* <__foo_veneer>
 .*:    d65f03c0        ret
index b3ed36fbb9477b60fe9e4fd65e781d494061c726..26c15a34b6dd3759ac58d692698f9b2a553436a3 100644 (file)
@@ -7,7 +7,7 @@
 
 Disassembly of section .text:
 
-.* <_start>:
+.* <(_start|_btext)>:
     1000:      9400000a        bl      1028 <___veneer>
     1004:      94000005        bl      1018 <___veneer>
     1008:      d65f03c0        ret
index 637225be4dd3aa9848f133ec33e6725a34b9865a..492abb756cfab46d809fca5d1ef743562595e0fd 100644 (file)
@@ -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>
index 365b6b99a11669c258dfd91f2349a7091cc75c31..2567cc4e7160cde5c38ee46053145dcb5bc3afbf 100644 (file)
@@ -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)
index 0d4a92ce437887aa367fef4db57ed6e033c81181..ebd798b14b3db8bf7cbd3f17f1e2054963aa16f7 100644 (file)
@@ -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
index c4054e7f80d696dc7cbe8fe87cf31f379eb55e79..cb130a6acf5500ed99e4f8c8aa191a00ec5bff5f 100644 (file)
@@ -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 <.*>
index 28115d2a9bbf9d50c265b3f101dfc7be9c8fae95..ff4a82a5fe824b73173321da307013f9eaf416ee 100644 (file)
@@ -15,7 +15,7 @@ Contents of section .got.plt:
 
 Disassembly of section .text:
 
-.* <ifunc>:
+.* <(ifunc|_btext)>:
  .*:   d65f03c0        ret
 
 .* <bar>:
index 464364729fbb6468b95c6a722a975e461a426e3b..7cb854db23a2973ae896bbdabd265be506d4ecf6 100644 (file)
@@ -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
index e526fea4b7236f3f5bb359b8433a1c687e487f9c..538b2166d0ea2b00b92cdb72ebe80518e92c357b 100644 (file)
@@ -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>:
index c32bbbc84a3e561b56d1360a93db7d1d8aa27947..70d1c9d021f9d73a641e42ca3ef7e34ba59cc222 100644 (file)
@@ -7,7 +7,7 @@
 
 Disassembly of section .text:
 
-0+1000 <_start>:
+0+1000 <(_start|_btext)>:
     1000:      15ffffff        b       8000ffc <bar>
     1004:      d65f03c0        ret
 
index 0e4e622b3c0eb1b9140617529c3ffc3f974ecd45..09cea9562920c9b4d3c5c65c7e4ce6050e126b06 100644 (file)
@@ -7,7 +7,7 @@
 
 Disassembly of section .text:
 
-0+1000 <_start>:
+0+1000 <(_start|_btext)>:
     1000:      95ffffff        bl      8000ffc <bar>
     1004:      d65f03c0        ret
 
index d6732acdaf1543ffd51fe23d0da5633ecbe04d14..595d37780bc5f7cf0bcc3d6020ae2b9dcbb7e43e 100644 (file)
@@ -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, .*