diff options
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r-- | lld/ELF/OutputSections.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 9b8ea2bb461..9d5ebe5fea7 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -78,25 +78,6 @@ OutputSection::OutputSection(StringRef Name, uint32_t Type, uint64_t Flags) Live = false; } -bool OutputSection::isAllSectionDescription() const { - // We do not remove empty sections that are explicitly - // assigned to any segment. - if (!Phdrs.empty()) - return false; - - // We do not want to remove sections that have custom address or align - // expressions set even if them are empty. We keep them because we - // want to be sure that any expressions can be evaluated and report - // an error otherwise. - if (AddrExpr || AlignExpr || LMAExpr) - return false; - - for (BaseCommand *Base : SectionCommands) - if (!isa<InputSectionDescription>(*Base)) - return false; - return true; -} - // We allow sections of types listed below to merged into a // single progbits section. This is typically done by linker // scripts. Merging nobits and progbits will force disk space |