1 //===-- RuntimeDyldCOFF.h - Run-time dynamic linker for MC-JIT ---*- C++ -*-==//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // COFF support for MC-JIT runtime dynamic linker.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_RUNTIME_DYLD_COFF_H
15 #define LLVM_RUNTIME_DYLD_COFF_H
17 #include "RuntimeDyldImpl.h"
18 #include "llvm/ADT/DenseMap.h"
20 #define DEBUG_TYPE "dyld"
26 // Common base class for COFF dynamic linker support.
27 // Concrete subclasses for each target can be found in ./Targets.
28 class RuntimeDyldCOFF : public RuntimeDyldImpl {
31 std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
32 loadObject(const object::ObjectFile &Obj) override;
33 bool isCompatibleFile(const object::ObjectFile &Obj) const override;
35 static std::unique_ptr<RuntimeDyldCOFF>
36 create(Triple::ArchType Arch, RuntimeDyld::MemoryManager &MemMgr,
37 RuntimeDyld::SymbolResolver &Resolver);
40 RuntimeDyldCOFF(RuntimeDyld::MemoryManager &MemMgr,
41 RuntimeDyld::SymbolResolver &Resolver)
42 : RuntimeDyldImpl(MemMgr, Resolver) {}
43 uint64_t getSymbolOffset(const SymbolRef &Sym);
46 } // end namespace llvm