WinCOFF: Emit common symbols as specified in the COFF spec
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 8 Apr 2014 22:33:40 +0000 (22:33 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 8 Apr 2014 22:33:40 +0000 (22:33 +0000)
commite4d89ec8de33c9ed3554dcc2b2391b7698dba1e3
tree738b6ddb050e7aa5631fe23a06741e10dc54f1fa
parent15073192996d5591e2ec21ac03809c504d10aa09
WinCOFF: Emit common symbols as specified in the COFF spec

Summary:
Local common symbols were properly inserted into the .bss section.
However, putting external common symbols in the .bss section would give
them a strong definition.

Instead, encode them as undefined, external symbols who's symbol value
is equivalent to their size.

Reviewers: Bigcheese, rafael, rnk

CC: llvm-commits
Differential Revision: http://reviews.llvm.org/D3324

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205811 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/MC/MCObjectFileInfo.cpp
lib/MC/WinCOFFObjectWriter.cpp
lib/MC/WinCOFFStreamer.cpp
test/MC/COFF/comm.ll
test/MC/COFF/comm.s