aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCELFStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCELFStreamer.cpp')
-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);
}