xref: /aosp_15_r20/external/llvm/test/MC/MachO/bad-darwin-x86_64-diff-relocs.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker// RUN: not llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - 2> %t.err > %t
2*9880d681SAndroid Build Coastguard Worker// RUN: FileCheck --check-prefix=CHECK-ERROR < %t.err %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker.quad _foo - _bar
5*9880d681SAndroid Build Coastguard Worker// CHECK-ERROR: error: unsupported relocation with subtraction expression
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker_Y:
8*9880d681SAndroid Build Coastguard Worker.long (_Y+4)-_b
9*9880d681SAndroid Build Coastguard Worker// CHECK-ERROR: error: unsupported relocation with subtraction expression, symbol '_b' can not be undefined in a subtraction expression
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker_Z:
12*9880d681SAndroid Build Coastguard Worker.long (_a+4)-_Z
13*9880d681SAndroid Build Coastguard Worker// CHECK-ERROR: error: unsupported relocation with subtraction expression, symbol '_a' can not be undefined in a subtraction expression
14