[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / aarch64-thunk-reuse2.s
blobc2cfee6f876c48ccd3077137834d0db87bb789bc
1 # REQUIRES: aarch64
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.
10 # CHECK: <dest>:
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
17 # CHECK-NEXT: br x16
18 # CHECK-LABEL: <high>:
19 # CHECK-NEXT: 8010714: bl 0x8010708 <__AArch64ADRPThunk_>
20 # CHECK-NEXT: b 0x8010708 <__AArch64ADRPThunk_>
22 .section .text._start, "ax", %progbits
23 .globl _start
24 _start:
25 .space 0x400
26 dest:
27 ret
29 .section .text.gap, "ax", %progbits
30 .space 0x8000000
32 .section .text.high, "ax", %progbits
33 high:
34 bl dest
35 b dest