RuntimeDyldCOFF.h 1.4 KB

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