1 //===-- RuntimeDyldELF.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 // ELF support for MC-JIT runtime dynamic linker.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_RUNTIME_DYLD_ELF_H
15 #define LLVM_RUNTIME_DYLD_ELF_H
17 #include "RuntimeDyldImpl.h"
23 class RuntimeDyldELF : public RuntimeDyldImpl {
25 ObjectImage *LoadedObject;
27 void resolveX86_64Relocation(uint8_t *LocalAddress,
28 uint64_t FinalAddress,
33 void resolveX86Relocation(uint8_t *LocalAddress,
34 uint32_t FinalAddress,
39 void resolveARMRelocation(uint8_t *LocalAddress,
40 uint32_t FinalAddress,
45 void resolveMIPSRelocation(uint8_t *LocalAddress,
46 uint32_t FinalAddress,
51 virtual void resolveRelocation(uint8_t *LocalAddress,
52 uint64_t FinalAddress,
57 virtual void processRelocationRef(const ObjRelocationInfo &Rel,
59 ObjSectionToIDMap &ObjSectionToID,
60 const SymbolTableMap &Symbols,
63 virtual ObjectImage *createObjectImage(const MemoryBuffer *InputBuffer);
64 virtual void handleObjectLoaded(ObjectImage *Obj);
67 RuntimeDyldELF(RTDyldMemoryManager *mm)
68 : RuntimeDyldImpl(mm), LoadedObject(0) {}
70 virtual ~RuntimeDyldELF();
72 bool isCompatibleFormat(const MemoryBuffer *InputBuffer) const;
75 } // end namespace llvm