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 "RuntimeDyldImpl.h"
18 #include "llvm/ADT/IndexedMap.h"
19 #include "llvm/Object/MachO.h"
20 #include "llvm/Support/Format.h"
23 using namespace llvm::object;
27 class RuntimeDyldMachO : public RuntimeDyldImpl {
28 bool resolveI386Relocation(uint8_t *LocalAddress,
29 uint64_t FinalAddress,
35 bool resolveX86_64Relocation(uint8_t *LocalAddress,
36 uint64_t FinalAddress,
42 bool resolveARMRelocation(uint8_t *LocalAddress,
43 uint64_t FinalAddress,
50 void resolveRelocation(const SectionEntry &Section,
58 RuntimeDyldMachO(RTDyldMemoryManager *mm) : RuntimeDyldImpl(mm) {}
60 virtual void resolveRelocation(const RelocationEntry &RE, uint64_t Value);
61 virtual void processRelocationRef(unsigned SectionID,
64 ObjSectionToIDMap &ObjSectionToID,
65 const SymbolTableMap &Symbols,
67 virtual bool isCompatibleFormat(const ObjectBuffer *Buffer) const;
68 virtual StringRef getEHFrameSection();
71 } // end namespace llvm