Don't be over eager in evaluating a subtraction with a weak symbol.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 24 Mar 2015 23:48:44 +0000 (23:48 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 24 Mar 2015 23:48:44 +0000 (23:48 +0000)
commit4e86f54fdbcc375e14fdfc61ded8a97e8e030996
treea982bc35c9f4444df863767d742b76d6e679f480
parentd639e1975d9360ee0cf9ce9a458ae890eebea0de
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
lib/MC/ELFObjectWriter.cpp
test/MC/ELF/weak-diff.s [new file with mode: 0644]