summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r--lld/ELF/OutputSections.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index ab7e337deb4..c64610fe80b 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -1181,7 +1181,7 @@ bool lld::elf2::shouldKeepInSymtab(const ObjectFile<ELFT> &File,
// * --discard-locals is used.
// * The symbol is in a SHF_MERGE section, which is normally the reason for
// the assembler keeping the .L symbol.
- if (!SymName.startswith(".L"))
+ if (!SymName.startswith(".L") && !SymName.empty())
return true;
if (Config->DiscardLocals)
OpenPOWER on IntegriCloud