23 using namespace llvm::object;
25 #define DEBUG_TYPE "dyld"
29 class LoadedCOFFObjectInfo final
32 LoadedCOFFObjectInfo(
RuntimeDyldImpl &RTDyld, ObjSectionToIDMap ObjSecToIDMap)
33 : LoadedObjectInfoHelper(RTDyld, std::move(ObjSecToIDMap)) {}
36 getObjectForDebug(
const ObjectFile &Obj)
const override {
44 std::unique_ptr<RuntimeDyldCOFF>
51 return make_unique<RuntimeDyldCOFFI386>(MemMgr, Resolver);
53 return make_unique<RuntimeDyldCOFFThumb>(MemMgr, Resolver);
55 return make_unique<RuntimeDyldCOFFX86_64>(MemMgr, Resolver);
59 std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
61 if (
auto ObjSectionToIDOrErr = loadObjectImpl(O)) {
62 return llvm::make_unique<LoadedCOFFObjectInfo>(*
this, *ObjSectionToIDOrErr);
bool isCompatibleFile(const object::ObjectFile &Obj) const override
void logAllUnhandledErrors(Error E, raw_ostream &OS, Twine ErrorBanner)
Log all errors (if any) in E to OS.
This class is the base class for all object file types.
uint64_t getSymbolOffset(const SymbolRef &Sym)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is a value type class that represents a single symbol in the list of symbols in the object file...
static std::unique_ptr< RuntimeDyldCOFF > create(Triple::ArchType Arch, RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)
A raw_ostream that writes to an std::string.
uint64_t getValue() const
Return the value of the symbol depending on the object this can be an offset or a virtual address...
std::unique_ptr< RuntimeDyld::LoadedObjectInfo > loadObject(const object::ObjectFile &Obj) override