diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-03-01 01:08:00 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-03-01 01:08:00 +0000 |
| commit | 852bd5c062fa1f86b99dc7e5256d4dd6020f48ac (patch) | |
| tree | 9fe7ffe096e4a01a7cef3045de898ff404a58164 /lld/ELF/OutputSections.cpp | |
| parent | 3816c78490d7bfb51db355acca9b50724c731ce2 (diff) | |
| download | bcm5719-llvm-852bd5c062fa1f86b99dc7e5256d4dd6020f48ac.tar.gz bcm5719-llvm-852bd5c062fa1f86b99dc7e5256d4dd6020f48ac.zip | |
Simplify removing empty output sections.
With this the meaning of the Live bit in output sections is clear: we
have at some point added a input section into it.
llvm-svn: 326401
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 |

