From 6159f1290ef9e337e4409967ff971f11d3d53e41 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Tue, 28 Feb 2017 10:34:56 +0000 Subject: [PATCH] [ELF] - Remove ElfSym::EhdrStart member. NFC. We do not use it later, so don't have to store. llvm-svn: 296466 --- lld/ELF/Symbols.h | 4 ---- lld/ELF/Writer.cpp | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index 4a684e7e2a0a5..269b461db5360 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -338,9 +338,6 @@ class LazyObject : public Lazy { // Some linker-generated symbols need to be created as // DefinedRegular symbols. template struct ElfSym { - // The content for __ehdr_start symbol. - static DefinedSynthetic *EhdrStart; - // The content for _etext and etext symbols. static DefinedSynthetic *Etext; static DefinedSynthetic *Etext2; @@ -359,7 +356,6 @@ template struct ElfSym { static DefinedRegular *MipsGp; }; -template DefinedSynthetic *ElfSym::EhdrStart; template DefinedSynthetic *ElfSym::Etext; template DefinedSynthetic *ElfSym::Etext2; template DefinedSynthetic *ElfSym::Edata; diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 07e5a3de55830..1971bf77c394e 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -837,8 +837,7 @@ template void Writer::addReservedSymbols() { return; // __ehdr_start is the location of ELF file headers. - ElfSym::EhdrStart = - addOptionalSynthetic("__ehdr_start", Out::ElfHeader, 0); + addOptionalSynthetic("__ehdr_start", Out::ElfHeader, 0); auto Define = [](StringRef S, DefinedSynthetic *&Sym1, DefinedSynthetic *&Sym2) {