From 79cfed55fc923b137a1a41702534b6830c4f5851 Mon Sep 17 00:00:00 2001 From: Shankar Easwaran Date: Mon, 31 Mar 2014 03:16:37 +0000 Subject: [core] support .gnu.linkonce sections .gnu.linkonce sections are similar to section groups. They were supported before section groups existed and provided a way to resolve COMDAT sections using a different design. There are few implementations that use .gnu.linkonce sections to store simple floating point constants which doesnot require complex section group support but need a way to store only one copy of the floating point constant. .gnu.linkonce based symbol resolution achieves that. llvm-svn: 205163 --- lld/lib/ReaderWriter/Native/WriterNative.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lld/lib/ReaderWriter/Native/WriterNative.cpp') diff --git a/lld/lib/ReaderWriter/Native/WriterNative.cpp b/lld/lib/ReaderWriter/Native/WriterNative.cpp index 9735783b0a9..c1173380faa 100644 --- a/lld/lib/ReaderWriter/Native/WriterNative.cpp +++ b/lld/lib/ReaderWriter/Native/WriterNative.cpp @@ -41,7 +41,8 @@ public: // We are trying to process all atoms, but the defined() iterator does not // return group children. So, when a group parent is found, we need to // handle each child atom. - if (defAtom->contentType() == DefinedAtom::typeGroupComdat) { + if (defAtom->contentType() == DefinedAtom::typeGroupComdat || + defAtom->contentType() == DefinedAtom::typeGnuLinkOnce) { for (const Reference *r : *defAtom) { if (r->kindNamespace() != lld::Reference::KindNamespace::all) continue; -- cgit v1.2.3