summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Writer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 21454c4d4c4..315c2dfb146 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -559,11 +559,9 @@ template <class ELFT> void Writer<ELFT>::copyLocalSymbols() {
StringRef SymName = check(Sym.getName(F->getStringTable()));
if (!shouldKeepInSymtab<ELFT>(*F, SymName, Sym))
continue;
- if (Sym.st_shndx != SHN_ABS) {
- InputSectionBase<ELFT> *Section = F->getSection(Sym);
- if (!Section->Live)
+ if (Sym.st_shndx != SHN_ABS)
+ if (!F->getSection(Sym)->Live)
continue;
- }
++Out<ELFT>::SymTab->NumLocals;
if (Config->Relocatable)
B->DynsymIndex = Out<ELFT>::SymTab->NumLocals;
OpenPOWER on IntegriCloud