aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-12-07 05:57:28 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-12-07 05:57:28 +0000
commit3b3148f8647844b92bb84c7c3e864b5403484a38 (patch)
tree05881bae9fdc28af87c0dd31a330db0d459c73a7 /lib/MC/MachObjectWriter.cpp
parent85c37722530cebc6a4b100ff24263bf46a3f30d3 (diff)
Fix relocations with weak definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MachObjectWriter.cpp')
-rw-r--r--lib/MC/MachObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp
index 6e0c4d20d3..d31ecef27a 100644
--- a/lib/MC/MachObjectWriter.cpp
+++ b/lib/MC/MachObjectWriter.cpp
@@ -893,7 +893,7 @@ public:
// compensate for the addend of the symbol address, if it was
// undefined. This occurs with weak definitions, for example.
if (!SD->Symbol->isUndefined())
- FixedValue -= getSymbolAddress(SD, Layout);
+ FixedValue -= Layout.getSymbolOffset(SD);
} else {
// The index is the section ordinal (1-based).
Index = SD->getFragment()->getParent()->getOrdinal() + 1;