Fix .comm and .lcomm on COFF.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 25 Nov 2013 16:06:04 +0000 (16:06 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 25 Nov 2013 16:06:04 +0000 (16:06 +0000)
commitc7daeb3098f58028ffe1fc495cb4c51b4d378f9d
tree0dd3745755604deb577b9af9ae8472a7f030fa70
parent68bef454399b25f7f8fb4484a806a5efd69eb3d7
Fix .comm and .lcomm on COFF.

These should not use COMDATs. GNU as uses .bss for .lcomm and section 0 for
.comm.

Given

static int a;
int b;

MSVC puts both in .bss. This patch then puts both .comm and .lcomm on .bss. With
this change we agree with gas on .lcomm, are much closer on .comm and clang-cl
matches msvc on the above example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195654 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/WinCOFFStreamer.cpp
test/MC/COFF/comm.s [new file with mode: 0644]