summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/MarkLive.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp
index a7312f5fd39..63076b773cc 100644
--- a/lld/ELF/MarkLive.cpp
+++ b/lld/ELF/MarkLive.cpp
@@ -112,14 +112,14 @@ template <class ELFT> void lld::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);
- else if (Sec->getSectionName() == ".eh_frame")
- // .eh_frame is special. It should be marked live so that we don't
- // drop it, but it should not keep any section alive.
- Sec->Live = true;
- }
+ if (!Sec || Sec == &InputSection<ELFT>::Discarded)
+ continue;
+ if (isReserved(Sec))
+ Enqueue(Sec);
+ else if (Sec->getSectionName() == ".eh_frame")
+ // .eh_frame is special. It should be marked live so that we don't
+ // drop it, but it should not keep any section alive.
+ Sec->Live = true;
}
}
OpenPOWER on IntegriCloud