summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-12-17 22:12:40 +0000
committerReid Kleckner <reid@kleckner.net>2013-12-17 22:12:40 +0000
commit65c43291817ad9b28e259919e19d340f67d8fb6d (patch)
tree2a7d87feaa81aeb7be6c639bd82d13a985675b79 /lib
parenta5dd89e3c5d141c8641890b17912392ab8257f1b (diff)
downloadllvm-65c43291817ad9b28e259919e19d340f67d8fb6d.tar.gz
llvm-65c43291817ad9b28e259919e19d340f67d8fb6d.tar.bz2
llvm-65c43291817ad9b28e259919e19d340f67d8fb6d.tar.xz
MC COFF: Emit the 'b' section flag for .bss sections in GNU assembly
Without this, assembling clang's disassembly would produce an object file with the IMAGE_SCN_CNT_INITIALIZED_DATA section characteristic rather than the uninitialized one. link.exe would warn when merging comdats with different flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197529 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/MCSectionCOFF.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/MC/MCSectionCOFF.cpp b/lib/MC/MCSectionCOFF.cpp
index bb35027464..ad9ca8840f 100644
--- a/lib/MC/MCSectionCOFF.cpp
+++ b/lib/MC/MCSectionCOFF.cpp
@@ -54,6 +54,8 @@ void MCSectionCOFF::PrintSwitchToSection(const MCAsmInfo &MAI,
OS << "\t.section\t" << getSectionName() << ",\"";
if (getKind().isText())
OS << 'x';
+ else if (getKind().isBSS())
+ OS << 'b';
if (getKind().isWriteable())
OS << 'w';
else