1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

The value is offset from the start of the section for non-common symbols, submitted by Jordan Gordeev.

llvm-svn: 112473
This commit is contained in:
Benjamin Kramer 2010-08-30 12:00:16 +00:00
parent ca65cc9222
commit b540b09a7c

View File

@ -384,6 +384,8 @@ void ELFObjectWriterImpl::WriteSymbol(MCDataFragment *F, ELFSymbolData &MSD,
}
} 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");
}