[ELF] Set 'Live = true' in SyntheticSection ctor. NFC.
authorEugene Leviant <eleviant@accesssoftek.com>
Fri, 11 Nov 2016 13:03:58 +0000 (13:03 +0000)
committerEugene Leviant <eleviant@accesssoftek.com>
Fri, 11 Nov 2016 13:03:58 +0000 (13:03 +0000)
llvm-svn: 286588

lld/ELF/SyntheticSections.cpp
lld/ELF/SyntheticSections.h

index 24e3e40..b4dc1e6 100644 (file)
@@ -617,7 +617,6 @@ template <class ELFT>
 GotPltSection<ELFT>::GotPltSection()
     : SyntheticSection<ELFT>(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS,
                              Target->GotPltEntrySize, ".got.plt") {
-  this->Live = true;
 }
 
 template <class ELFT> void GotPltSection<ELFT>::addEntry(SymbolBody &Sym) {
index 756d198..f41a18f 100644 (file)
@@ -66,7 +66,9 @@ public:
   SyntheticSection(uintX_t Flags, uint32_t Type, uintX_t Addralign,
                    StringRef Name)
       : InputSection<ELFT>(Flags, Type, Addralign, ArrayRef<uint8_t>(), Name,
-                           InputSectionData::Synthetic) {}
+                           InputSectionData::Synthetic) {
+    this->Live = true;
+  }
 
   virtual void writeTo(uint8_t *Buf) = 0;
   virtual size_t getSize() const { return this->Data.size(); }