[PATCH] D63352: [LLD] [COFF] Strip section name suffix from mingw comdats

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 13:27:38 PDT 2019


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm

I don't think we can do it earlier, I think this is the right spot to do this. It will cut down on memory usage as well, by the way, since we'll have fewer single Chunk PartialSection objects on mingw.



================
Comment at: COFF/Writer.cpp:800
     }
-    PartialSection *PSec = createPartialSection(C->getSectionName(),
+    StringRef Name = C->getSectionName();
+    if (Config->MinGW && SC && SC->isCOMDAT())
----------------
Please add a comment explaining that, on mingw, comdat groups are formed by putting the comdat group name after the `$` in the section name. This code ignores the comdat group name for the purpose of section sorting.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63352/new/

https://reviews.llvm.org/D63352





More information about the llvm-commits mailing list