From 6d6ec1b869cfd82d475a82161ab7a03047b739cb Mon Sep 17 00:00:00 2001 From: Russell Gallop Date: Thu, 10 Oct 2019 14:50:02 +0000 Subject: [PATCH] [LLD][ELF] Fix stale comments about doing ICF Differential Revision: https://reviews.llvm.org/D68396 llvm-svn: 374362 --- lld/ELF/Driver.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 616718b69d81..96257a4c7624 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -1915,9 +1915,10 @@ template 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(); + + // Garbage collection and removal of shared symbols from unused shared objects. markLive(); demoteSharedSymbols();