diff options
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r-- | lld/ELF/LinkerScript.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index a6354c841c2..3f68e6eff87 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -824,6 +824,9 @@ void LinkerScript::assignOffsets(OutputSection *Sec) { } static bool isDiscardable(OutputSection &Sec) { + if (Sec.Name == "/DISCARD/") + return true; + // We do not remove empty sections that are explicitly // assigned to any segment. if (!Sec.Phdrs.empty()) |