COFF: Do not assign linker-weak symbols to selectany comdat sections.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 30 Jun 2015 19:10:31 +0000 (19:10 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 30 Jun 2015 19:10:31 +0000 (19:10 +0000)
commitfd8c98591dcf2f3c431ea3ad800d742c3212424d
tree8fc7b48073357f9e1f7e5a58c5eb455502b92b82
parent528f9649c843e3a29a37666044077097c6c76c50
COFF: Do not assign linker-weak symbols to selectany comdat sections.

It is mandatory to specify a comdat in order to receive comdat semantics
for a symbol. We were previously getting this wrong in -function-sections
mode; linker-weak symbols were being emitted in a selectany comdat. This
change causes such symbols to use a noduplicates comdat instead, fixing
the inconsistency.

Also correct an inaccuracy in the docs.

Differential Revision: http://reviews.llvm.org/D10828

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241103 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.rst
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
test/CodeGen/X86/coff-weak.ll [new file with mode: 0644]