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
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
14 // The thunk redirects to the address of callee.
15 // CHECK-LABEL
: <__AArch64AbsLongThunk_callee
>:
16 // CHECK-NEXT
: 10004: ldr x16
, 0x1000c <__AArch64AbsLongThunk_callee+
0x8>
17 // CHECK-NEXT
: 10008: br x16
18 // CHECK-NEXT
: 1000c
: 00 00 00 00 .word 0x00000000
19 // CHECK-NEXT
: 10010: 02 00 00 00 .word 0x00000002
21 // CHECK-LABEL
: <callee
>:
22 // CHECK-NEXT
: 200000000: ret
24 .section .text.1, "ax", %progbits
26 .type _start, %function
30 .section .text.2, "ax", %progbits
32 .type callee, %function