diff options
-rw-r--r-- | lld/ELF/SymbolTable.cpp | 2 | ||||
-rw-r--r-- | lld/ELF/Symbols.cpp | 4 | ||||
-rw-r--r-- | lld/ELF/Symbols.h | 9 | ||||
-rw-r--r-- | lld/ELF/Writer.cpp | 2 |
4 files changed, 8 insertions, 9 deletions
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index a68469887a0..d3413102b60 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -120,7 +120,7 @@ SymbolBody *SymbolTable<ELFT>::addSynthetic(StringRef Name, // file's symbol table. Such symbols are useful for some linker-defined symbols. template <class ELFT> SymbolBody *SymbolTable<ELFT>::addIgnored(StringRef Name) { - return addAbsolute(Name, ElfSym<ELFT>::IgnoredWeak); + return addAbsolute(Name, ElfSym<ELFT>::Ignored); } // Rename SYM as __wrap_SYM. The original symbol is preserved as __real_SYM. diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index 40f8f0960da..bc0db8aa575 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -122,8 +122,8 @@ std::unique_ptr<InputFile> Lazy::getMember() { template <class ELFT> static void doInitSymbols() { ElfSym<ELFT>::End.setBinding(STB_GLOBAL); - ElfSym<ELFT>::IgnoredWeak.setBinding(STB_WEAK); - ElfSym<ELFT>::IgnoredWeak.setVisibility(STV_HIDDEN); + ElfSym<ELFT>::Ignored.setBinding(STB_WEAK); + ElfSym<ELFT>::Ignored.setVisibility(STV_HIDDEN); } void elf2::initSymbols() { diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index 28cdb28939c..73b074ccd82 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -304,10 +304,9 @@ private: template <class ELFT> struct ElfSym { typedef typename llvm::object::ELFFile<ELFT>::Elf_Sym Elf_Sym; - // Used to represent an undefined symbol which we don't want - // to add to the output file's symbol table. The `IgnoredWeak` - // has weak binding and can be substituted. - static Elf_Sym IgnoredWeak; + // Used to represent an undefined symbol which we don't want to add to the + // output file's symbol table. It has weak binding and can be substituted. + static Elf_Sym Ignored; // The content for _end and end symbols. static Elf_Sym End; @@ -321,7 +320,7 @@ template <class ELFT> struct ElfSym { static Elf_Sym RelaIpltEnd; }; -template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::IgnoredWeak; +template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::Ignored; template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::End; template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::MipsGp; template <class ELFT> diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 9a05fd2830f..a8a5aca6b51 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -613,7 +613,7 @@ template <class ELFT> static bool includeInSymtab(const SymbolBody &B) { // Don't include synthetic symbols like __init_array_start in every output. if (auto *U = dyn_cast<DefinedRegular<ELFT>>(&B)) - if (&U->Sym == &ElfSym<ELFT>::IgnoredWeak) + if (&U->Sym == &ElfSym<ELFT>::Ignored) return false; return true; |