llvm-6502/test/MC/ELF/weak-diff.s
Rafael Espindola 4e86f54fdb Don't be over eager in evaluating a subtraction with a weak symbol.
In a subtraction of the form A - B, if B is weak, there is no way to represent
that on ELF since all relocations add the value of a symbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233139 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-24 23:48:44 +00:00

13 lines
211 B
ArmAsm

// RUN: not llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t 2>&1 | FileCheck %s
// CHECK: error: Cannot represent a subtraction with a weak symbol
.weak f
.weak g
f:
nop
g:
nop
.quad g - f