}
bool RuntimeDyldCheckerImpl::isSymbolValid(StringRef Symbol) const {
- return getRTDyld().getSymbolLocalAddress(Symbol) != nullptr;
+ if (getRTDyld().getSymbol(Symbol))
+ return true;
+ return !!getRTDyld().Resolver.findSymbol(Symbol);
}
uint64_t RuntimeDyldCheckerImpl::getSymbolLocalAddr(StringRef Symbol) const {
unsigned SectionID = SectionInfo->SectionID;
uint64_t Addr;
if (IsInsideLoad)
- Addr =
- static_cast<uint64_t>(
- reinterpret_cast<uintptr_t>(getRTDyld().Sections[SectionID].Address));
+ Addr = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(
+ getRTDyld().Sections[SectionID].getAddress()));
else
- Addr = getRTDyld().Sections[SectionID].LoadAddress;
+ Addr = getRTDyld().Sections[SectionID].getLoadAddress();
return std::make_pair(Addr, std::string(""));
}
uint64_t Addr;
if (IsInsideLoad) {
- uintptr_t SectionBase =
- reinterpret_cast<uintptr_t>(getRTDyld().Sections[SectionID].Address);
+ uintptr_t SectionBase = reinterpret_cast<uintptr_t>(
+ getRTDyld().Sections[SectionID].getAddress());
Addr = static_cast<uint64_t>(SectionBase) + StubOffset;
} else {
- uint64_t SectionBase = getRTDyld().Sections[SectionID].LoadAddress;
+ uint64_t SectionBase = getRTDyld().Sections[SectionID].getLoadAddress();
Addr = SectionBase + StubOffset;
}
const auto &SymInfo = pos->second;
uint8_t *SectionAddr = getRTDyld().getSectionAddress(SymInfo.getSectionID());
return StringRef(reinterpret_cast<const char *>(SectionAddr) +
- SymInfo.getOffset(),
- getRTDyld().Sections[SymInfo.getSectionID()].Size -
- SymInfo.getOffset());
+ SymInfo.getOffset(),
+ getRTDyld().Sections[SymInfo.getSectionID()].getSize() -
+ SymInfo.getOffset());
}
void RuntimeDyldCheckerImpl::registerSection(
StringRef FilePath, unsigned SectionID) {
StringRef FileName = sys::path::filename(FilePath);
const SectionEntry &Section = getRTDyld().Sections[SectionID];
- StringRef SectionName = Section.Name;
+ StringRef SectionName = Section.getName();
Stubs[FileName][SectionName].SectionID = SectionID;
}
const RuntimeDyldImpl::StubMap &RTDyldStubs) {
StringRef FileName = sys::path::filename(FilePath);
const SectionEntry &Section = getRTDyld().Sections[SectionID];
- StringRef SectionName = Section.Name;
+ StringRef SectionName = Section.getName();
Stubs[FileName][SectionName].SectionID = SectionID;