[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / arm-thumb-ldrlit.s
blob19088fa4fce6346d35993357733e4638731c6a92
1 // REQUIRES: arm
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 --no-print-imm-hex -d --no-show-raw-insn %t | FileCheck %s
6 /// Test R_ARM_THM_PC8 as used in the ldr pseudo instruction. Only positive
7 /// 4-byte aligned offsets are permitted.
8 .section .text.01, "ax", %progbits
9 .balign 4
10 .global _start
11 .thumb_func
12 _start:
13 /// ldr r0, target1
14 .inst.n 0x48ff
15 .reloc 0, R_ARM_THM_PC8, target1
16 /// ldr r1, target2
17 .inst.n 0x49ff
18 .reloc 2, R_ARM_THM_PC8, target2
19 .section .text.02, "ax", %progbits
20 .balign 4
21 .global target1
22 .type target1, %function
23 target1:
24 nop
25 bx lr
26 .section .text.03, "ax", %progbits
27 .balign 4
28 .space 1016
29 .type target2, %function
30 target2:
31 nop
32 bx lr
34 // CHECK: 000200b4 <_start>:
35 // CHECK-NEXT: 200b4: ldr r0, [pc, #0]
36 // CHECK-NEXT: 200b6: ldr r1, [pc, #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