forked from OSchip/llvm-project
ELF2: Inititalize other symbols only once as well.
llvm-svn: 249645
This commit is contained in:
parent
b7fca57493
commit
aca48ffb41
|
@ -105,8 +105,6 @@ void SymbolTable::addSyntheticSym(StringRef Name, OutputSection<ELFT> &Section,
|
|||
}
|
||||
|
||||
template <class ELFT> void SymbolTable::addIgnoredSym(StringRef Name) {
|
||||
DefinedAbsolute<ELFT>::IgnoreUndef.setBinding(STB_WEAK);
|
||||
DefinedAbsolute<ELFT>::IgnoreUndef.setVisibility(STV_HIDDEN);
|
||||
auto Sym = new (Alloc)
|
||||
DefinedAbsolute<ELFT>(Name, DefinedAbsolute<ELFT>::IgnoreUndef);
|
||||
resolve<ELFT>(Sym);
|
||||
|
|
|
@ -86,11 +86,17 @@ std::unique_ptr<InputFile> Lazy::getMember() {
|
|||
return createELFFile<ObjectFile>(MBRef);
|
||||
}
|
||||
|
||||
template <class ELFT> static void doInitSymbols() {
|
||||
DefinedAbsolute<ELFT>::IgnoreUndef.setBinding(STB_WEAK);
|
||||
DefinedAbsolute<ELFT>::IgnoreUndef.setVisibility(STV_HIDDEN);
|
||||
Undefined<ELFT>::Optional.setVisibility(STV_HIDDEN);
|
||||
}
|
||||
|
||||
void lld::elf2::initSymbols() {
|
||||
Undefined<ELF32LE>::Optional.setVisibility(STV_HIDDEN);
|
||||
Undefined<ELF32BE>::Optional.setVisibility(STV_HIDDEN);
|
||||
Undefined<ELF64LE>::Optional.setVisibility(STV_HIDDEN);
|
||||
Undefined<ELF64BE>::Optional.setVisibility(STV_HIDDEN);
|
||||
doInitSymbols<ELF32LE>();
|
||||
doInitSymbols<ELF32BE>();
|
||||
doInitSymbols<ELF64LE>();
|
||||
doInitSymbols<ELF64BE>();
|
||||
}
|
||||
|
||||
template int SymbolBody::compare<ELF32LE>(SymbolBody *Other);
|
||||
|
|
Loading…
Reference in New Issue