Fix --print-gc-sections with linker scripts.
Before it would never print anything.
Thanks to George Rimar for pointing it out.
llvm-svn: 295485
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 8dfbfe8..a323d3a 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -252,7 +252,7 @@
size_t SizeBefore = I->Sections.size();
for (InputSectionBase<ELFT> *S : Symtab<ELFT>::X->Sections) {
- if (!S->Live || S->Assigned)
+ if (S->Assigned)
continue;
// For -emit-relocs we have to ignore entries like
// .rela.dyn : { *(.rela.data) }