diff options
author | Reid Kleckner <reid@kleckner.net> | 2013-12-17 22:12:40 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2013-12-17 22:12:40 +0000 |
commit | d4e53f55f1f1883993b233e8308247b0489834af (patch) | |
tree | bced1634056d49097ee08a92b416732812e7acb7 /llvm/lib/MC/MCSectionCOFF.cpp | |
parent | fa68a57cf71d20b2e0e02db32fd2e6a0fc2da1f8 (diff) | |
download | llvm-d4e53f55f1f1883993b233e8308247b0489834af.zip llvm-d4e53f55f1f1883993b233e8308247b0489834af.tar.gz llvm-d4e53f55f1f1883993b233e8308247b0489834af.tar.bz2 |
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.
llvm-svn: 197529
Diffstat (limited to 'llvm/lib/MC/MCSectionCOFF.cpp')
-rw-r--r-- | llvm/lib/MC/MCSectionCOFF.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCSectionCOFF.cpp b/llvm/lib/MC/MCSectionCOFF.cpp index bb35027..ad9ca88 100644 --- a/llvm/lib/MC/MCSectionCOFF.cpp +++ b/llvm/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 |