[LLD][ELF] Fix stale comments about doing ICF
authorRussell Gallop <russell.gallop@gmail.com>
Thu, 10 Oct 2019 14:50:02 +0000 (14:50 +0000)
committerRussell Gallop <russell.gallop@gmail.com>
Thu, 10 Oct 2019 14:50:02 +0000 (14:50 +0000)
Differential Revision: https://reviews.llvm.org/D68396

llvm-svn: 374362

lld/ELF/Driver.cpp

index 616718b..96257a4 100644 (file)
@@ -1915,9 +1915,10 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &args) {
   // Replace common symbols with regular symbols.
   replaceCommonSymbols();
 
-  // Do size optimizations: garbage collection, merging of SHF_MERGE sections
-  // and identical code folding.
+  // Split SHF_MERGE and .eh_frame sections into pieces in preparation for garbage collection.
   splitSections<ELFT>();
+
+  // Garbage collection and removal of shared symbols from unused shared objects.
   markLive<ELFT>();
   demoteSharedSymbols();