diff options
Diffstat (limited to 'lld/ELF/Symbols.h')
-rw-r--r-- | lld/ELF/Symbols.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index 59135bfe1f5..3eea383f8dd 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -300,8 +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. + // 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; // The content for _end and end symbols. static Elf_Sym End; @@ -316,6 +319,8 @@ template <class ELFT> struct ElfSym { }; 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>::End; template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::MipsGp; template <class ELFT> |