2 // RUN
: llvm-mc
--triple
=thumbv6m-none-eabi
--arm-add-build-attributes
-filetype
=obj
-o
%t.o
%s
3 // RUN
: ld.lld
%t.o
-o
%t
4 // RUN
: llvm-objdump
-d
--no-show-raw-insn
%t | FileCheck
%s
6 /// Test R_ARM_THM_PC8 as used in the adr pseudo instruction. Only positive
7 /// 4-byte aligned offsets are permitted.
8 .section .text.01, "ax", %progbits
15 .reloc 0, R_ARM_THM_PC8, target1
18 .reloc 2, R_ARM_THM_PC8, target2
19 .section .text.02, "ax", %progbits
22 .type target1, %function
26 .section .text.03, "ax", %progbits
29 .type target2, %function
34 // CHECK
: 000200b4
<_start
>:
35 // CHECK-NEXT
: 200b4
: adr
r0, #0
36 // CHECK-NEXT
: 200b6
: adr
r1, #1020
38 // CHECK
: 000200b8
<target1
>:
39 // CHECK-NEXT
: 200b8
: nop
40 // CHECK-NEXT
: 200ba: bx
lr
42 // CHECK
: 000204b4
<target2
>:
43 // CHECK-NEXT
: 204b4
: nop
44 // CHECK-NEXT
: 204b6
: bx
lr