2 // RUN
: llvm-mc
-arm-add-build-attributes
-filetype
=obj
-triple
=armv7a-none-linux-gnueabi
%s
-o
%t
3 // RUN
: ld.lld
--image-base
=0x10000000 %t -o
%t2
4 // RUN
: llvm-objdump
--no-print-imm-hex
--triple
=armv7a-none-linux-gnueabi
--no-show-raw-insn
-d
%t2 | FileCheck
%s
6 /// Check that the ARM ABI rules for undefined weak symbols are applied.
7 /// Branch instructions are resolved to the next instruction. Undefined
8 /// Symbols in relative are resolved to the place so S
- P
+ A = A.
9 /// We place the image-base at
0x10000000 to test that
a range extensions thunk
15 .type target, %function
18 .type undefweak2, %function
27 /// R_ARM_CALL with exchange
30 movt
r0, :upper16
:target
- .
31 /// R_ARM_MOVW_PREL_NC
32 movw
r0, :lower16
:target
- .
39 // CHECK
: Disassembly of section
.text:
41 // CHECK-NEXT
: 100100b4
<_start
>:
42 // CHECK-NEXT
: 100100b4
: b {{.+}} @ imm = #-4
43 // CHECK-NEXT
: 100100b8
: bl {{.+}} @ imm = #-4
44 // CHECK-NEXT
: 100100bc: bl {{.+}} @ imm = #-4
45 // CHECK-NEXT
: 100100c0
: movt
r0, #0
46 // CHECK-NEXT
: 100100c4
: movw
r0, #0
47 // CHECK
: 100100c8
: 00 00 00 00 .word 0x00000000
48 // CHECK-LABEL
: <bl_undefweak2
>
49 // CHECK-NEXT
: bl {{.*}} <bl_undefweak2+0x4>