diff options
Diffstat (limited to 'lib/MC/MCExpr.cpp')
-rw-r--r-- | lib/MC/MCExpr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp index a9256b632e..1d6a316363 100644 --- a/lib/MC/MCExpr.cpp +++ b/lib/MC/MCExpr.cpp @@ -268,8 +268,8 @@ bool MCExpr::EvaluateAsRelocatable(MCValue &Res, Layout->getAssembler().getSymbolData(Res.getSymA()->getSymbol()); MCSymbolData &B = Layout->getAssembler().getSymbolData(Res.getSymB()->getSymbol()); - Res = MCValue::get(+ A.getFragment()->getAddress() + A.getOffset() - - B.getFragment()->getAddress() - B.getOffset() + Res = MCValue::get(+ Layout->getSymbolAddress(&A) + A.getOffset() + - Layout->getSymbolAddress(&B) - B.getOffset() + Res.getConstant()); } |