From 17afb64d4f6c12a4a2baf1324eec448b38689873 Mon Sep 17 00:00:00 2001 From: Eugene Leviant Date: Fri, 11 Nov 2016 13:03:58 +0000 Subject: [PATCH] [ELF] Set 'Live = true' in SyntheticSection ctor. NFC. llvm-svn: 286588 --- lld/ELF/SyntheticSections.cpp | 1 - lld/ELF/SyntheticSections.h | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 24e3e40..b4dc1e6 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 756d198..f41a18f 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(); } -- 2.7.4