summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCELFStreamer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-11-14 19:40:55 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-11-14 19:40:55 +0000
commitb05ef7377acd6133d322f56384e1e97c6b315579 (patch)
tree58e78c4db88a68b6e2fea56b223d443b562c60de /llvm/lib/MC/MCELFStreamer.cpp
parenta76eab433a6c7f059b7044fb05a29721ebe30745 (diff)
downloadbcm5719-llvm-b05ef7377acd6133d322f56384e1e97c6b315579.tar.gz
bcm5719-llvm-b05ef7377acd6133d322f56384e1e97c6b315579.zip
Fix the type of a symbol created with .comm and no corresponding .type.
llvm-svn: 119060
Diffstat (limited to 'llvm/lib/MC/MCELFStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCELFStreamer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp
index 1f4f1461a57..ba51f67f786 100644
--- a/llvm/lib/MC/MCELFStreamer.cpp
+++ b/llvm/lib/MC/MCELFStreamer.cpp
@@ -409,6 +409,7 @@ void MCELFStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
if (!BindingExplicitlySet.count(Symbol)) {
SetBinding(SD, ELF::STB_GLOBAL);
SD.setExternal(true);
+ SetType(SD, ELF::STT_OBJECT);
}
if (GetBinding(SD) == ELF_STB_Local) {
OpenPOWER on IntegriCloud