diff options
author | Rui Ueyama <ruiu@google.com> | 2016-01-12 19:24:55 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2016-01-12 19:24:55 +0000 |
commit | 09eb0b3b3fd079f8ab4c5772bbcbdbf9cfc45814 (patch) | |
tree | c9bdc240417b90fe41292b5bc2daddde79680373 | |
parent | df5ddf2c7a60adb19a83dc046feefd805918973d (diff) | |
download | bcm5719-llvm-09eb0b3b3fd079f8ab4c5772bbcbdbf9cfc45814.tar.gz bcm5719-llvm-09eb0b3b3fd079f8ab4c5772bbcbdbf9cfc45814.zip |
Rename IgnoredUndef -> Ignored since it is not an undefined symbol.
Also rename Ignored -> IgnoredWeak and IgnoredStrong -> Ignored,
since strong symbol is a norm.
llvm-svn: 257507
-rw-r--r-- | lld/ELF/SymbolTable.cpp | 4 | ||||
-rw-r--r-- | lld/ELF/Symbols.cpp | 8 | ||||
-rw-r--r-- | lld/ELF/Symbols.h | 15 | ||||
-rw-r--r-- | lld/ELF/Writer.cpp | 4 |
4 files changed, 15 insertions, 16 deletions
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index a66bb04df3e..65f5dff9d7a 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -120,14 +120,14 @@ 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>::IgnoreUndef); + return addAbsolute(Name, ElfSym<ELFT>::IgnoredWeak); } // The 'strong' variant of the addIgnored. Adds symbol which has a global // binding and cannot be substituted. template <class ELFT> SymbolBody *SymbolTable<ELFT>::addIgnoredStrong(StringRef Name) { - return addAbsolute(Name, ElfSym<ELFT>::IgnoreUndefStrong); + 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 6bc9e1f79ce..3c864cbe2b6 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -120,10 +120,10 @@ std::unique_ptr<InputFile> Lazy::getMember() { template <class ELFT> static void doInitSymbols() { ElfSym<ELFT>::End.setBinding(STB_GLOBAL); - ElfSym<ELFT>::IgnoreUndef.setBinding(STB_WEAK); - ElfSym<ELFT>::IgnoreUndef.setVisibility(STV_HIDDEN); - ElfSym<ELFT>::IgnoreUndefStrong.setBinding(STB_GLOBAL); - ElfSym<ELFT>::IgnoreUndefStrong.setVisibility(STV_HIDDEN); + ElfSym<ELFT>::IgnoredWeak.setBinding(STB_WEAK); + ElfSym<ELFT>::IgnoredWeak.setVisibility(STV_HIDDEN); + ElfSym<ELFT>::Ignored.setBinding(STB_GLOBAL); + ElfSym<ELFT>::Ignored.setVisibility(STV_HIDDEN); } void elf2::initSymbols() { diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index 3eea383f8dd..6f65ea1a72e 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -300,11 +300,11 @@ 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 `IgnoreUndef` - // has weak binding and can be substituted. The `InoreUndefStrong` - // has global binding and gets priority over symbols from shared libs. - static Elf_Sym IgnoreUndef; - static Elf_Sym IgnoreUndefStrong; + // to add to the output file's symbol table. The `IgnoredWeak` + // has weak binding and can be substituted. The `Ignore` has + // global binding and gets priority over symbols from shared libs. + static Elf_Sym IgnoredWeak; + static Elf_Sym Ignored; // The content for _end and end symbols. static Elf_Sym End; @@ -318,9 +318,8 @@ template <class ELFT> struct ElfSym { static Elf_Sym RelaIpltEnd; }; -template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::IgnoreUndef; -template <class ELFT> -typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::IgnoreUndefStrong; +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 9143024c615..fbecfc601ac 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -606,8 +606,8 @@ 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>::IgnoreUndef || - &U->Sym == &ElfSym<ELFT>::IgnoreUndefStrong) + if (&U->Sym == &ElfSym<ELFT>::IgnoredWeak || + &U->Sym == &ElfSym<ELFT>::Ignored) return false; return true; |