Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / arm-thumb-adr-err.s
blob4b3a70f16c7d75324dbfa6dfd6cbf741724bb704
1 // REQUIRES: arm
2 // RUN: llvm-mc --triple=thumbv6m-none-eabi --arm-add-build-attributes -filetype=obj -o %t.o %s
3 // RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
5 .section .text.0, "ax", %progbits
6 .balign 4
7 .thumb_func
8 low:
9 bx lr
11 .section .text.1, "ax", %progbits
12 .balign 2
13 .global _start
14 .thumb_func
15 _start:
16 // CHECK: {{.*}}.s.tmp.o:(.text.1+0x0): relocation R_ARM_THM_PC8 out of range: 18446744073709551612 is not in [0, 1023]
17 /// adr r0, low
18 .inst.n 0xa0ff
19 .reloc 0, R_ARM_THM_PC8, low
20 // CHECK: {{.*}}.s.tmp.o:(.text.1+0x2): improper alignment for relocation R_ARM_THM_PC8: 0x2 is not aligned to 4 bytes
21 /// adr r1, unaligned
22 .inst.n 0xa1ff
23 .reloc 2, R_ARM_THM_PC8, unaligned
24 // CHECK: {{.*}}.s.tmp.o:(.text.1+0x4): relocation R_ARM_THM_PC8 out of range: 1024 is not in [0, 1023]
25 /// adr r2, range
26 .inst.n 0xa2ff
27 .reloc 4, R_ARM_THM_PC8, range
29 .section .text.2, "ax", %progbits
30 .balign 4
31 nop
32 .thumb_func
33 unaligned:
34 bx lr
35 .space 1020
36 range:
37 bx lr