2 // RUN
: split-file
%s
%t
3 // RUN
: llvm-mc
-filetype
=obj
-triple
=aarch64
%t/asm
-o
%t.o
4 // RUN
: ld.lld
--script
%t/lds
%t.o
-o
%t/out
5 // RUN
: llvm-objdump
-d
--no-show-raw-insn
--print-imm-hex
%t/out | FileCheck
%s
6 // RUN
: llvm-nm
--no-sort
--special-syms
%t/out | FileCheck
--check-prefix
=NM
%s
9 // Check that we have the out of branch range calculation right. The immediate
10 // field is signed so we have
a slightly higher negative displacement.
11 .section .text_low, "ax", %progbits
13 .type _start, %function
15 // Need thunk to high_target@plt
17 // Need thunk to
.text_high+4
21 .section .text_high, "ax", %progbits
23 .type high_target, %function
25 // No Thunk needed as we are within signed immediate range
29 // CHECK
: Disassembly of section
.text_low:
31 // CHECK-NEXT
: <_start
>:
32 // CHECK-NEXT
: 2000: bl 0x200c <__AArch64AbsLongThunk_high_target
>
33 // CHECK-NEXT
: 2004: bl 0x2010 <__AArch64AbsLongThunk_
>
35 // CHECK
: <__AArch64AbsLongThunk_high_target
>:
36 // CHECK-NEXT
: 200c
: b 0x8002000 <high_target
>
37 // CHECK
: <__AArch64AbsLongThunk_
>:
38 // CHECK-NEXT
: 2010: b 0x8002004 <high_target+
0x4>
39 // CHECK
: Disassembly of section
.text_high:
41 // CHECK-NEXT
: <high_target
>:
42 // CHECK-NEXT
: 8002000: bl 0x2000 <_start
>
45 /// Local symbols copied from
%t.o
48 /// Local thunk symbols.
49 // NM-NEXT
: t __AArch64AbsLongThunk_high_target
51 // NM-NEXT
: t __AArch64AbsLongThunk_
{{$
}}
55 // NM-NEXT
: T high_target
59 low PT_LOAD FLAGS
(0x1 |
0x4);
60 high PT_LOAD FLAGS
(0x1 |
0x4);
63 .text_low 0x2000: { *(.text_low) } :low
64 .text_high 0x8002000 : { *(.text_high) } :high