[PATCH] D68396: [LLD][ELF] Fix stale comment about doing ICF

Russell Gallop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 06:16:02 PDT 2019


russell.gallop updated this revision to Diff 223200.

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

https://reviews.llvm.org/D68396

Files:
  lld/ELF/Driver.cpp


Index: lld/ELF/Driver.cpp
===================================================================
--- lld/ELF/Driver.cpp
+++ lld/ELF/Driver.cpp
@@ -1914,10 +1914,11 @@
   // Replace common symbols with regular symbols.
   replaceCommonSymbols();
 
-  // Do size optimizations: garbage collection, merging of SHF_MERGE sections
-  // and identical code folding.
+  // Do size optimizations: splitting of sections and garbage collection.
   splitSections<ELFT>();
   markLive<ELFT>();
+
+  // Demote shared symbols to prevent dangling references to non-DT_NEEDED DSOs.
   demoteSharedSymbols();
 
   // Make copies of any input sections that need to be copied into each


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68396.223200.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191004/b6d39286/attachment.bin>


More information about the llvm-commits mailing list