Mark all common symbols external. This is not exactly correct but it lets apps
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 30 Aug 2010 11:56:55 +0000 (11:56 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 30 Aug 2010 11:56:55 +0000 (11:56 +0000)
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

lib/MC/MCELFStreamer.cpp

index fcc62626c37c2f4848301e303659f37553ab6cc2..7ac9f0b7fd6bd6d8189f8af42f4b23be036546d7 100644 (file)
@@ -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);
 }