[llvm-commits] [llvm] r112473 - /llvm/trunk/lib/MC/ELFObjectWriter.cpp
Benjamin Kramer
benny.kra at googlemail.com
Mon Aug 30 05:00:16 PDT 2010
Author: d0k
Date: Mon Aug 30 07:00:16 2010
New Revision: 112473
URL: http://llvm.org/viewvc/llvm-project?rev=112473&view=rev
Log:
The value is offset from the start of the section for non-common symbols, submitted by Jordan Gordeev.
Modified:
llvm/trunk/lib/MC/ELFObjectWriter.cpp
Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=112473&r1=112472&r2=112473&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Mon Aug 30 07:00:16 2010
@@ -384,6 +384,8 @@
}
} else if (ESize->getKind() == MCExpr::Constant) {
Size = static_cast<const MCConstantExpr *>(ESize)->getValue();
+ MCFragment *F = Data.getFragment();
+ Value = Layout.getSymbolAddress(&Data) - Layout.getSectionAddress(F->getParent());
} else {
assert(0 && "Unsupported size expression");
}
More information about the llvm-commits
mailing list