From 61d7f97000e8bfe48789b59b1cd778b63b4ded4b Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 17 Jun 2014 16:19:33 +0000 Subject: [PECOFF] Support COMDAT associative sections. COFF supports a feature similar to ELF's section groups. This patch implements it. In ELF, section groups are identified by their names, and they are treated somewhat differently from regular symbols. In COFF, the feature is realized in a more straightforward way. A section can have an annotation saying "if Nth section is linked, link this section too." I added a new reference type, kindAssociate. If a target atom is coalesced away, the referring atom is removed by Resolver, so that they are treated as a group. Differential Revision: http://reviews.llvm.org/D4028 llvm-svn: 211106 --- lld/lib/ReaderWriter/Reader.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lld/lib/ReaderWriter/Reader.cpp') diff --git a/lld/lib/ReaderWriter/Reader.cpp b/lld/lib/ReaderWriter/Reader.cpp index 5bb261dfac1..f7077199c0b 100644 --- a/lld/lib/ReaderWriter/Reader.cpp +++ b/lld/lib/ReaderWriter/Reader.cpp @@ -51,6 +51,7 @@ static const Registry::KindStrings kindStrings[] = { {Reference::kindLayoutAfter, "layout-after"}, {Reference::kindLayoutBefore, "layout-before"}, {Reference::kindGroupChild, "group-child"}, + {Reference::kindAssociate, "associate"}, LLD_KIND_STRING_END}; Registry::Registry() { -- cgit v1.2.3