2 // RUN
: llvm-mc
--arm-add-build-attributes
-filetype
=obj
-triple
=thumbv5-none-linux-gnueabi
%s
-o
%t
3 // RUN
: ld.lld
%t -o
%t2
4 // RUN
: llvm-objdump
--no-print-imm-hex
--no-show-raw-insn
-d
%t2 | FileCheck
%s
6 /// Check that the ARM ABI rules for undefined weak symbols are applied.
7 /// Relative relocations are resolved to the place. Although we can
't encode
8 /// this for R_ARM_THM_PC8 as negative addends are not permitted. Use smallest
9 /// available value. These are corner cases.
13 .type target, %function
21 .reloc 0, R_ARM_THM_PC8, target
24 .reloc 2, R_ARM_THM_PC8, target
25 // CHECK: 000200b4 <_start>:
26 // CHECK-NEXT: 200b4: adr r0, #0
27 // CHECK-NEXT: ldr r0, [pc, #0]