diff options
Diffstat (limited to 'lld/ELF/Driver.cpp')
-rw-r--r-- | lld/ELF/Driver.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 8996386e99a..36cda3a1e3d 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -1901,6 +1901,26 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &args) { markLive<ELFT>(); demoteSharedSymbols(); mergeSections(); + + // Make copies of any input sections that need to be copied into each + // partition. + copySectionsIntoPartitions(); + + // Create synthesized sections such as .got and .plt. This is called before + // processSectionCommands() so that they can be placed by SECTIONS commands. + createSyntheticSections<ELFT>(); + + // Some input sections that are used for exception handling need to be moved + // into synthetic sections. Do that now so that they aren't assigned to + // output sections in the usual way. + if (!config->relocatable) + combineEhSections(); + + // Create output sections described by SECTIONS commands. + script->processSectionCommands(); + + // Two input sections with different output sections should not be folded. + // ICF runs after processSectionCommands() so that we know the output sections. if (config->icf != ICFLevel::None) { findKeepUniqueSections<ELFT>(args); doIcf<ELFT>(); |