From ebc573ed5b7d4757d58b3bfdec53fcf9b4cb8c01 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Mon, 12 Aug 2013 22:45:44 +0000 Subject: Fix a crash with X86 Mach-O and a subtraction expression where both symbols are undefined and produce an error message instead as this is a non-relocatable expression with X86 Mach-O. rdar://8920876 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188218 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/MachO/bad-darwin-x86_64-diff-relocs.s | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test/MC/MachO/bad-darwin-x86_64-diff-relocs.s (limited to 'test/MC') diff --git a/test/MC/MachO/bad-darwin-x86_64-diff-relocs.s b/test/MC/MachO/bad-darwin-x86_64-diff-relocs.s new file mode 100644 index 0000000..1ccebc5 --- /dev/null +++ b/test/MC/MachO/bad-darwin-x86_64-diff-relocs.s @@ -0,0 +1,5 @@ +// RUN: not llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - 2> %t.err > %t +// RUN: FileCheck --check-prefix=CHECK-ERROR < %t.err %s + +.quad _foo - _bar +// CHECK-ERROR: unsupported relocation with subtraction expression -- cgit v1.1