#include "RuntimeDyldMachO.h"
#include "Targets/RuntimeDyldMachOAArch64.h"
#include "Targets/RuntimeDyldMachOARM.h"
#include "Targets/RuntimeDyldMachOI386.h"
#include "Targets/RuntimeDyldMachOX86_64.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
usingnamespacellvm;
usingnamespacellvm::object;
#define DEBUG_TYPE …
namespace {
class LoadedMachOObjectInfo final
: public LoadedObjectInfoHelper<LoadedMachOObjectInfo,
RuntimeDyld::LoadedObjectInfo> { … };
}
namespace llvm {
int64_t RuntimeDyldMachO::memcpyAddend(const RelocationEntry &RE) const { … }
Expected<relocation_iterator>
RuntimeDyldMachO::processScatteredVANILLA(
unsigned SectionID, relocation_iterator RelI,
const ObjectFile &BaseObjT,
RuntimeDyldMachO::ObjSectionToIDMap &ObjSectionToID,
bool TargetIsLocalThumbFunc) { … }
Expected<RelocationValueRef>
RuntimeDyldMachO::getRelocationValueRef(
const ObjectFile &BaseTObj, const relocation_iterator &RI,
const RelocationEntry &RE, ObjSectionToIDMap &ObjSectionToID) { … }
void RuntimeDyldMachO::makeValueAddendPCRel(RelocationValueRef &Value,
const relocation_iterator &RI,
unsigned OffsetToNextPC) { … }
void RuntimeDyldMachO::dumpRelocationToResolve(const RelocationEntry &RE,
uint64_t Value) const { … }
section_iterator
RuntimeDyldMachO::getSectionByAddress(const MachOObjectFile &Obj,
uint64_t Addr) { … }
Error RuntimeDyldMachO::populateIndirectSymbolPointersSection(
const MachOObjectFile &Obj,
const SectionRef &PTSection,
unsigned PTSectionID) { … }
bool RuntimeDyldMachO::isCompatibleFile(const object::ObjectFile &Obj) const { … }
template <typename Impl>
Error
RuntimeDyldMachOCRTPBase<Impl>::finalizeLoad(const ObjectFile &Obj,
ObjSectionToIDMap &SectionMap) { … }
template <typename Impl>
unsigned char *RuntimeDyldMachOCRTPBase<Impl>::processFDE(uint8_t *P,
int64_t DeltaForText,
int64_t DeltaForEH) { … }
static int64_t computeDelta(SectionEntry *A, SectionEntry *B) { … }
template <typename Impl>
void RuntimeDyldMachOCRTPBase<Impl>::registerEHFrames() { … }
std::unique_ptr<RuntimeDyldMachO>
RuntimeDyldMachO::create(Triple::ArchType Arch,
RuntimeDyld::MemoryManager &MemMgr,
JITSymbolResolver &Resolver) { … }
std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
RuntimeDyldMachO::loadObject(const object::ObjectFile &O) { … }
}