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)
commit1feef2eb03c174081f702e4bf725e997a10d65c3
tree85a1c860441302811fac704e6a1657c3d2bc3f11
parent45a2401c04f41789c09f4a48bc640042daa5786e
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

llvm-svn: 241103
llvm/docs/LangRef.rst
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/test/CodeGen/X86/coff-weak.ll [new file with mode: 0644]