summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Driver.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 616718b69d8..96257a4c762 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -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();
OpenPOWER on IntegriCloud