[PATCH] D67504: [ELF] Make SHF_MERGE merging aware of output sections
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 20:45:40 PDT 2019
MaskRay added a comment.
Two passes assign InputSectionBases to OutputSections:
- processSectionCommands() calls `createInputSectionList` to append elements to `InputSectionDescription::sectionBases`
- addOrphanSections() calls `OutputSection::recordSections()` to append elements to `InputSectionDescription::sectionBases` The change also removes an use of `SectionBase::assigned`, which will enable a further simplication: D67531 <https://reviews.llvm.org/D67531>.
After an InputSectionBase is added to `InputSectionDescription::sectionBases`: if it is an InputSection, it will go directly to `InputSectionDescription::sections`; if it is a MergeInputSection, it will be merged with other MergeInputSections to form a MergeSyntheticSection, then the MergeSyntheticSection (a second-order derived class of SyntheticSection) will be appended to `InputSectionDescription::sections`.
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67504/new/
https://reviews.llvm.org/D67504
More information about the llvm-commits
mailing list