36 lines · plain
1# REQUIRES: aarch642# RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o3# RUN: ld.lld -pie -Ttext=0x10300 %t.o -o %t4# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --disassemble-symbols=dest,__AArch64ADRPThunk_,high %t | FileCheck %s5 6## We create initial ThunkSection before the gap. Because the ThunkSection7## 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 be9## a bug reusing the first ThunkSection (unreachable) due to the large r_addend.10# CHECK: <dest>:11# CHECK-NEXT: 10700: ret12# CHECK: <__AArch64ADRPThunk_>:13# CHECK-NEXT: 10704: b 0x10700 <dest>14# CHECK: <__AArch64ADRPThunk_>:15# CHECK-NEXT: 8010708: adrp x16, 0x1000016# CHECK-NEXT: add x16, x16, #179217# CHECK-NEXT: br x1618# CHECK-LABEL: <high>:19# CHECK-NEXT: 8010714: bl 0x8010708 <__AArch64ADRPThunk_>20# CHECK-NEXT: b 0x8010708 <__AArch64ADRPThunk_>21 22.section .text._start, "ax", %progbits23.globl _start24_start:25.space 0x40026dest:27 ret28 29.section .text.gap, "ax", %progbits30.space 0x800000031 32.section .text.high, "ax", %progbits33high:34 bl dest35 b dest36