1 //===-- RuntimeDyldMachO.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 // MachO support for MC-JIT runtime dynamic linker.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_RUNTIME_DYLD_MACHO_H
15 #define LLVM_RUNTIME_DYLD_MACHO_H
17 #include "llvm/ADT/IndexedMap.h"
18 #include "llvm/Object/MachOObject.h"
19 #include "llvm/Support/Format.h"
20 #include "RuntimeDyldImpl.h"
23 using namespace llvm::object;
27 class RuntimeDyldMachO : public RuntimeDyldImpl {
29 bool resolveX86_64Relocation(uint8_t *LocalAddress,
30 uint64_t FinalAddress,
36 bool resolveARMRelocation(uint8_t *LocalAddress,
37 uint64_t FinalAddress,
44 virtual void processRelocationRef(const ObjRelocationInfo &Rel,
45 const ObjectFile &Obj,
46 ObjSectionToIDMap &ObjSectionToID,
47 LocalSymbolMap &Symbols, StubMap &Stubs);
50 virtual void resolveRelocation(uint8_t *LocalAddress,
51 uint64_t FinalAddress,
56 RuntimeDyldMachO(RTDyldMemoryManager *mm) : RuntimeDyldImpl(mm) {}
58 bool isCompatibleFormat(const MemoryBuffer *InputBuffer) const;
61 } // end namespace llvm