mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Implement containsSymbol with other lower level methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241112 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -567,21 +567,6 @@ bool MachOObjectFile::isSectionVirtual(DataRefImpl Sec) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MachOObjectFile::sectionContainsSymbol(DataRefImpl Sec,
|
||||
DataRefImpl Symb) const {
|
||||
SymbolRef::Type ST = getSymbolType(Symb);
|
||||
if (ST == SymbolRef::ST_Unknown)
|
||||
return false;
|
||||
|
||||
uint64_t SectBegin = getSectionAddress(Sec);
|
||||
uint64_t SectEnd = getSectionSize(Sec);
|
||||
SectEnd += SectBegin;
|
||||
|
||||
uint64_t SymAddr;
|
||||
getSymbolAddress(Symb, SymAddr);
|
||||
return (SymAddr >= SectBegin) && (SymAddr < SectEnd);
|
||||
}
|
||||
|
||||
relocation_iterator MachOObjectFile::section_rel_begin(DataRefImpl Sec) const {
|
||||
DataRefImpl Ret;
|
||||
Ret.d.a = Sec.d.a;
|
||||
|
Reference in New Issue
Block a user