diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 24e3e400266f..b4dc1e65ec29 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -617,7 +617,6 @@ template GotPltSection::GotPltSection() : SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS, Target->GotPltEntrySize, ".got.plt") { - this->Live = true; } template void GotPltSection::addEntry(SymbolBody &Sym) { diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h index 756d19876549..f41a18f2494f 100644 --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -66,7 +66,9 @@ public: SyntheticSection(uintX_t Flags, uint32_t Type, uintX_t Addralign, StringRef Name) : InputSection(Flags, Type, Addralign, ArrayRef(), Name, - InputSectionData::Synthetic) {} + InputSectionData::Synthetic) { + this->Live = true; + } virtual void writeTo(uint8_t *Buf) = 0; virtual size_t getSize() const { return this->Data.size(); }