mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-11 21:38:19 +00:00
Object: Add isSymbolWeak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142316 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -331,6 +331,7 @@ protected:
|
||||
virtual error_code getSymbolNMTypeChar(DataRefImpl Symb, char &Res) const;
|
||||
virtual error_code isSymbolInternal(DataRefImpl Symb, bool &Res) const;
|
||||
virtual error_code isSymbolGlobal(DataRefImpl Symb, bool &Res) const;
|
||||
virtual error_code isSymbolWeak(DataRefImpl Symb, bool &Res) const;
|
||||
virtual error_code getSymbolType(DataRefImpl Symb, SymbolRef::Type &Res) const;
|
||||
|
||||
virtual error_code getSectionNext(DataRefImpl Sec, SectionRef &Res) const;
|
||||
@ -641,6 +642,17 @@ error_code ELFObjectFile<target_endianness, is64Bits>
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
template<support::endianness target_endianness, bool is64Bits>
|
||||
error_code ELFObjectFile<target_endianness, is64Bits>
|
||||
::isSymbolWeak(DataRefImpl Symb,
|
||||
bool &Result) const {
|
||||
validateSymbol(Symb);
|
||||
const Elf_Sym *symb = getSymbol(Symb);
|
||||
|
||||
Result = symb->getBinding() == ELF::STB_WEAK;
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
template<support::endianness target_endianness, bool is64Bits>
|
||||
error_code ELFObjectFile<target_endianness, is64Bits>
|
||||
::isSymbolInternal(DataRefImpl Symb,
|
||||
|
Reference in New Issue
Block a user