1// REQUIRES: aarch64 2// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o 3// RUN: echo 'SECTIONS { \ 4// RUN: .text.1 0x10000 : { *(.text.1) } \ 5// RUN: .text.2 0x200000000 : AT(0x20000) { *(.text.2) } \ 6// RUN: } ' > %t.script 7// RUN: ld.lld --script %t.script %t.o -o %t 8// RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t | FileCheck %s 9 10// The word should be an offset to the range extension thunk. 11// CHECK-LABEL: <_start>: 12// CHECK-NEXT: 10000: 04 00 00 00 .word 0x00000004 13 14// The thunk redirects to the address of callee. 15// CHECK-LABEL: <__AArch64AbsLongThunk_callee>: 16// CHECK-NEXT: 10004: ldr x16, 0x1000c <$d> 17// CHECK-NEXT: 10008: br x16 18 19// CHECK-LABEL: <$d>: 20// CHECK-NEXT: 1000c: 00 00 00 00 .word 0x00000000 21// CHECK-NEXT: 10010: 02 00 00 00 .word 0x00000002 22 23// CHECK-LABEL: <callee>: 24// CHECK-NEXT: 200000000: ret 25 26 .section .text.1, "ax", %progbits 27 .global _start 28 .type _start, %function 29_start: 30 .word callee@PLT - . 31 32 .section .text.2, "ax", %progbits 33 .global callee 34 .type callee, %function 35callee: 36 ret 37