2 // RUN
: llvm-mc
-arm-add-build-attributes
-filetype
=obj
-triple
=thumbv7a-none-linux-gnueabi
%s
-o
%t
3 // RUN
: llvm-mc
-arm-add-build-attributes
-filetype
=obj
-triple
=thumbv7a-none-linux-gnueabi
%S
/Inputs
/far-arm-thumb-
abs.s
-o
%tfar
4 // RUN
: echo
"SECTIONS { \
6 // RUN: .callee1 : { *(.callee_low) } \
7 // RUN: .caller : { *(.text) } \
8 // RUN: .callee2 : { *(.callee_high) } } " > %t.script
9 // RUN
: ld.lld
--script
%t.script
%t %tfar
-o
%t2
10 // RUN
: llvm-objdump
-d
%t2 | FileCheck
%s
14 .section .callee_low, "ax",%progbits
16 .type callee_low,%function
20 .section .text, "ax",%progbits
23 .type _start,%function
36 .section .callee_high, "ax",%progbits
38 .type callee_high,%function
42 // CHECK
: Disassembly of section
.callee1:
44 // CHECK-NEXT
: <callee_low
>:
45 // CHECK-NEXT
: b4
: 70 47 bx
lr
47 // CHECK-NEXT
: Disassembly of section
.caller:
49 // CHECK-NEXT
: <_start
>:
50 // CHECK-NEXT
: 10000: f0 f7 58 f8 bl 0xb4 <callee_low
>
51 // CHECK-NEXT
: 10004: f0 f7 56 b8 b.w
0xb4 <callee_low
>
52 // CHECK-NEXT
: 10008: 30 f4 54 a8 beq.w
0xb4 <callee_low
>
53 // CHECK-NEXT
: 1000c
: 00 f0 0c
f8 bl 0x10028 <callee_high
>
54 // CHECK-NEXT
: 10010: 00 f0 0a b8 b.w
0x10028 <callee_high
>
55 // CHECK-NEXT
: 10014: 40 f0 08 80 bne.w
0x10028 <callee_high
>
56 /// far_uncond
= 0x101001b
57 // CHECK-NEXT
: 10018: ff
f3 ff d7
bl 0x101001a
58 // CHECK-NEXT
: 1001c
: ff
f3 fd 97 b.w
0x101001a
59 /// far_cond
= 0x110023
60 // CHECK-NEXT
: 10020: 3f
f3 ff af bgt.w
0x110022
61 // CHECK-NEXT
: 10024: 70 47 bx
lr
64 // CHECK-NEXT
: Disassembly of section
.callee2:
66 // CHECK-NEXT
: <callee_high
>:
67 // CHECK-NEXT
: 10028: 70 47 bx
lr