[lld] r354428 - ELF: Remove field for .interp in InStruct. NFC.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 19 18:32:54 PST 2019


Author: pcc
Date: Tue Feb 19 18:32:53 2019
New Revision: 354428

URL: http://llvm.org/viewvc/llvm-project?rev=354428&view=rev
Log:
ELF: Remove field for .interp in InStruct. NFC.

This field is unreferenced outside of createSyntheticSections.

Differential Revision: https://reviews.llvm.org/D58422

Modified:
    lld/trunk/ELF/SyntheticSections.h
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/SyntheticSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.h?rev=354428&r1=354427&r2=354428&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.h (original)
+++ lld/trunk/ELF/SyntheticSections.h Tue Feb 19 18:32:53 2019
@@ -1007,7 +1007,6 @@ struct InStruct {
   SymbolTableBaseSection *DynSymTab;
   GnuHashTableSection *GnuHashTab;
   HashTableSection *HashTab;
-  InputSection *Interp;
   GdbIndexSection *GdbIndex;
   GotSection *Got;
   GotPltSection *GotPlt;

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=354428&r1=354427&r2=354428&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Feb 19 18:32:53 2019
@@ -288,10 +288,8 @@ template <class ELFT> static void create
   Out::ProgramHeaders = make<OutputSection>("", 0, SHF_ALLOC);
   Out::ProgramHeaders->Alignment = Config->Wordsize;
 
-  if (needsInterpSection()) {
-    In.Interp = createInterpSection();
-    Add(In.Interp);
-  }
+  if (needsInterpSection())
+    Add(createInterpSection());
 
   if (Config->Strip != StripPolicy::All) {
     In.StrTab = make<StringTableSection>(".strtab", false);




More information about the llvm-commits mailing list