1@ RUN: not llvm-mc -triple armv7a--none-eabi -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s
2@ RUN: not llvm-mc -triple thumbv7a--none-eabi -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s
3
4@ Note: These errors are not always emitted in the order in which the relevant
5@ source appears, this file is carefully ordered so that that is the case.
6
7  .text
8@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: symbol 'undef' can not be undefined in a subtraction expression
9  .word (0-undef)
10
11@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: expected relocatable expression
12  .word -undef
13
14@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: symbol 'undef' can not be undefined in a subtraction expression
15  adr r0, #a-undef
16
17@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: Cannot represent a difference across sections
18  .word x_a - y_a
19
20@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: invalid fixup for {{ARM|Thumb}} MOVT instruction
21  movt r9, :upper16: bar(PREL31)
22
23@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: invalid fixup for {{ARM|Thumb}} MOVW instruction
24  movw r9, :lower16: bar(PREL31)
25
26@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: invalid fixup for 1-byte data relocation
27  .byte f30(PLT)
28
29@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: invalid fixup for 2-byte data relocation
30  .hword f30(PLT)
31
32@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: invalid fixup for 4-byte data relocation
33  .word f30(PLT)
34
35@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: invalid fixup for 4-byte pc-relative data relocation
36  .word x_a(PLT) - label1
37label1:
38
39w:
40  .word 0
41  .weak w
42
43
44  .section sec_x
45x_a:
46  .word 0
47
48
49  .section sec_y
50y_a:
51  .word 0
52