aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-08-30 11:56:55 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-08-30 11:56:55 +0000
commit82a3171b72d97fda51345dece0e3a57424dbe1b1 (patch)
treea94513a8a98cd23af113b491e53b2490e380209f
parent12881e79b60886df8872045044f34d4ab3d79535 (diff)
Mark all common symbols external. This is not exactly correct but it lets apps
link for now and can be adjusted later. Patch by Roman Divacky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112471 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/MC/MCELFStreamer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/MC/MCELFStreamer.cpp b/lib/MC/MCELFStreamer.cpp
index fcc62626c3..7ac9f0b7fd 100644
--- a/lib/MC/MCELFStreamer.cpp
+++ b/lib/MC/MCELFStreamer.cpp
@@ -249,10 +249,11 @@ void MCELFStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
SD.setFragment(F);
Symbol->setSection(*Section);
SD.setSize(MCConstantExpr::Create(Size, getContext()));
- } else {
- SD.setExternal(true);
}
+ SD.setFlags(SD.getFlags() | ELF_STB_Global);
+ SD.setExternal(true);
+
SD.setCommon(Size, ByteAlignment);
}