2 # RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
3 # RUN: ld.lld -pie -Ttext=0x10300 %t.o -o %t
4 # RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --disassemble-symbols=dest,__AArch64ADRPThunk_,high %t | FileCheck %s
6 ## We create initial ThunkSection before the gap. Because the ThunkSection
7 ## selection code isn't so precise, we may create an unused thunk there (0x10704).
8 ## In the next pass we will create a ThunkSection after the gap. There used to be
9 ## a bug reusing the first ThunkSection (unreachable) due to the large r_addend.
11 # CHECK-NEXT: 10700: ret
12 # CHECK: <__AArch64ADRPThunk_>:
13 # CHECK-NEXT: 10704: b 0x10700 <dest>
14 # CHECK: <__AArch64ADRPThunk_>:
15 # CHECK-NEXT: 8010708: adrp x16, 0x10000
16 # CHECK-NEXT: add x16, x16, #1792
18 # CHECK-LABEL: <high>:
19 # CHECK-NEXT: 8010714: bl 0x8010708 <__AArch64ADRPThunk_>
20 # CHECK-NEXT: b 0x8010708 <__AArch64ADRPThunk_>
22 .section .text._start, "ax", %progbits
29 .section .text.gap, "ax", %progbits
32 .section .text.high, "ax", %progbits