summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/Reader.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-06-17 16:19:33 +0000
committerRui Ueyama <ruiu@google.com>2014-06-17 16:19:33 +0000
commit61d7f97000e8bfe48789b59b1cd778b63b4ded4b (patch)
treec6c9f0ae591977698ebff9dbb7784d396f297eb0 /lld/lib/ReaderWriter/Reader.cpp
parent8d7ab8c617177c63e8f1a2bf1a4decd678e43a25 (diff)
downloadbcm5719-llvm-61d7f97000e8bfe48789b59b1cd778b63b4ded4b.tar.gz
bcm5719-llvm-61d7f97000e8bfe48789b59b1cd778b63b4ded4b.zip
[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
Diffstat (limited to 'lld/lib/ReaderWriter/Reader.cpp')
-rw-r--r--lld/lib/ReaderWriter/Reader.cpp1
1 files changed, 1 insertions, 0 deletions
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() {
OpenPOWER on IntegriCloud