[lld] r354449 - ELF: Remove field for .gdb_index in InStruct. NFC.

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 20 03:34:18 PST 2019


Author: maskray
Date: Wed Feb 20 03:34:18 2019
New Revision: 354449

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

Summary: This field is unreferenced outside of createSyntheticSections.

Reviewers: ruiu, pcc, espindola, grimar

Reviewed By: grimar

Subscribers: grimar, emaste, arichardson, arphaman, llvm-commits

Tags: #llvm

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

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=354449&r1=354448&r2=354449&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.h (original)
+++ lld/trunk/ELF/SyntheticSections.h Wed Feb 20 03:34:18 2019
@@ -1007,7 +1007,6 @@ struct InStruct {
   SymbolTableBaseSection *DynSymTab;
   GnuHashTableSection *GnuHashTab;
   HashTableSection *HashTab;
-  GdbIndexSection *GdbIndex;
   GotSection *Got;
   GotPltSection *GotPlt;
   IgotPltSection *IgotPlt;

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=354449&r1=354448&r2=354449&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Wed Feb 20 03:34:18 2019
@@ -382,10 +382,8 @@ template <class ELFT> static void create
   In.IgotPlt = make<IgotPltSection>();
   Add(In.IgotPlt);
 
-  if (Config->GdbIndex) {
-    In.GdbIndex = GdbIndexSection::create<ELFT>();
-    Add(In.GdbIndex);
-  }
+  if (Config->GdbIndex)
+    Add(GdbIndexSection::create<ELFT>());
 
   // We always need to add rel[a].plt to output if it has entries.
   // Even for static linking it can contain R_[*]_IRELATIVE relocations.




More information about the llvm-commits mailing list