Skip to content

Commit

Permalink
[ELF] - Remove ElfSym::EhdrStart member. NFC.
Browse files Browse the repository at this point in the history
We do not use it later, so don't have to store.

llvm-svn: 296466
  • Loading branch information
George Rimar committed Feb 28, 2017
1 parent 98f0275 commit 6159f12
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions lld/ELF/Symbols.h
Expand Up @@ -338,9 +338,6 @@ class LazyObject : public Lazy {
// Some linker-generated symbols need to be created as
// DefinedRegular symbols.
template <class ELFT> struct ElfSym {
// The content for __ehdr_start symbol.
static DefinedSynthetic *EhdrStart;

// The content for _etext and etext symbols.
static DefinedSynthetic *Etext;
static DefinedSynthetic *Etext2;
Expand All @@ -359,7 +356,6 @@ template <class ELFT> struct ElfSym {
static DefinedRegular<ELFT> *MipsGp;
};

template <class ELFT> DefinedSynthetic *ElfSym<ELFT>::EhdrStart;
template <class ELFT> DefinedSynthetic *ElfSym<ELFT>::Etext;
template <class ELFT> DefinedSynthetic *ElfSym<ELFT>::Etext2;
template <class ELFT> DefinedSynthetic *ElfSym<ELFT>::Edata;
Expand Down
3 changes: 1 addition & 2 deletions lld/ELF/Writer.cpp
Expand Up @@ -837,8 +837,7 @@ template <class ELFT> void Writer<ELFT>::addReservedSymbols() {
return;

// __ehdr_start is the location of ELF file headers.
ElfSym<ELFT>::EhdrStart =
addOptionalSynthetic<ELFT>("__ehdr_start", Out::ElfHeader, 0);
addOptionalSynthetic<ELFT>("__ehdr_start", Out::ElfHeader, 0);

auto Define = [](StringRef S, DefinedSynthetic *&Sym1,
DefinedSynthetic *&Sym2) {
Expand Down

0 comments on commit 6159f12

Please sign in to comment.