old-cross-binutils/ld/testsuite/ld-aarch64/farcall-bl.d
Marcus Shawcroft 618655192f [AArch64] Implement branch over stub section.
Ensure that injection of a stub section does not break a link where
there is an xpectation that flow of control can pass from one input
section to another simply by linking the input sections in series.

The solution here is to allow stub sections to be inserted after any
input section (existing behaviour), but inject an additional branch at
the start of each stub section such that control flow falling into the
stub section will branch over the stub section.
2015-03-25 15:16:04 +00:00

23 lines
535 B
Makefile

#name: aarch64-farcall-bl
#source: farcall-bl.s
#as:
#ld: -Ttext 0x1000 --section-start .foo=0x8001000
#objdump: -dr
#...
Disassembly of section .text:
0000000000001000 <_start>:
+1000: 94000003 bl 100c <__bar_veneer>
+1004: d65f03c0 ret
[ \t]+1008:[ \t]+14000007[ \t]+b[ \t]+1024 <__bar_veneer\+0x18>
000000000000100c <__bar_veneer>:
100c: 90040010 adrp x16, 8001000 <bar>
1010: 91000210 add x16, x16, #0x0
1014: d61f0200 br x16
...
Disassembly of section .foo:
0000000008001000 <bar>:
8001000: d65f03c0 ret