3 # RUN: rm -rf %t && split-file %s %t
5 # RUN: llvm-mc --triple=aarch64 --filetype=obj -o %t.o %t/a.s
6 # RUN: ld.lld --shared -T %t/largegap.lds -z force-bti %t.o -o %t.elf
7 # RUN: llvm-objdump -d %t.elf | FileCheck %s
12 .text.near 0x1000 : AT(0x1000) { *(.text.near) }
13 .text.far 0xf0000000 : AT(0xf0000000) { *(.text.far) }
20 ## foo@plt is targeted by a range extension thunk with an indirect branch.
21 ## Add a bti c instruction.
25 ## biz is not targeted by a thunk using an indirect branch, so no need for bti c.
27 # CHECK-NEXT: adrp x16, {{.*}} <func>
30 # CHECK-NEXT: bl {{.*}} <foo@plt>
31 # CHECK-NEXT: bl {{.*}} <biz@plt>
34 # CHECK-NEXT: bl {{.*}} <__AArch64ADRPThunk_foo>
36 # CHECK: <__AArch64ADRPThunk_foo>:
37 # CHECK-NEXT: adrp x16, 0x0 <foo>
38 # CHECK-NEXT: add x16, x16, {{.*}}
43 .section .text.near, "ax", %progbits
50 .section .text.far, "ax", %progbits