[llvm-commits] [llvm] r113358 - /llvm/trunk/lib/MC/ELFObjectWriter.cpp
Roman Divacky
rdivacky at freebsd.org
Wed Sep 8 07:29:45 PDT 2010
Author: rdivacky
Date: Wed Sep 8 09:29:45 2010
New Revision: 113358
URL: http://llvm.org/viewvc/llvm-project?rev=113358&view=rev
Log:
Unresolved weak symbols have value equal zero.
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=113358&r1=113357&r2=113358&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Wed Sep 8 09:29:45 2010
@@ -364,7 +364,7 @@
if (Data.isCommon() && Data.isExternal())
Value = Data.getCommonAlignment();
- if (!Data.isCommon())
+ if (!Data.isCommon() && !(Data.getFlags() & ELF_STB_Weak))
if (MCFragment *FF = Data.getFragment())
Value = Layout.getSymbolAddress(&Data) -
Layout.getSectionAddress(FF->getParent());
More information about the llvm-commits
mailing list