summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/MarkLive.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp
index 02b9879b115..f682f3b8b47 100644
--- a/lld/ELF/MarkLive.cpp
+++ b/lld/ELF/MarkLive.cpp
@@ -116,9 +116,8 @@ template <class ELFT> void elf2::markLive(SymbolTable<ELFT> *Symtab) {
// Preserve special sections.
for (const std::unique_ptr<ObjectFile<ELFT>> &F : Symtab->getObjectFiles())
for (InputSectionBase<ELFT> *Sec : F->getSections())
- if (Sec && Sec != &InputSection<ELFT>::Discarded)
- if (isReserved(Sec))
- Enqueue(Sec);
+ if (Sec && Sec != &InputSection<ELFT>::Discarded && isReserved(Sec))
+ Enqueue(Sec);
// Mark all reachable sections.
while (!Q.empty())
OpenPOWER on IntegriCloud