Add an option for evaluating past symbols.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 28 Apr 2014 20:53:11 +0000 (20:53 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 28 Apr 2014 20:53:11 +0000 (20:53 +0000)
commit1c509556eeaa0d1bf680551acc52ce44957c592f
tree04b37358048394574a9dece7d19cbfb782b0cec5
parentdc352c105ff951dff69828a83f2c747b1186d3b4
Add an option for evaluating past symbols.

When evaluating an assembly expression for a relocation, we want to
stop at MCSymbols that are in the symbol table, even if they are variables.
This is needed since the semantics may require that the relocation use them.

That is not the case when computing the value of a symbol in the symbol table.
There are no relocations in this case and we have to keep going until we hit
a section or find out that the expression doesn't have an assembly time
value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207445 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCExpr.h
lib/MC/ELFObjectWriter.cpp
lib/MC/MCExpr.cpp
test/MC/ELF/offset.s