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 virtual void resolveRelocation(uint8_t *LocalAddress,
46 uint64_t FinalAddress,
51 virtual void processRelocationRef(const ObjRelocationInfo &Rel,
53 ObjSectionToIDMap &ObjSectionToID,
54 LocalSymbolMap &Symbols, StubMap &Stubs);
56 virtual ObjectImage *createObjectImage(const MemoryBuffer *InputBuffer);
57 virtual void handleObjectLoaded(ObjectImage *Obj);
60 RuntimeDyldELF(RTDyldMemoryManager *mm)
61 : RuntimeDyldImpl(mm), LoadedObject(0) {}
63 virtual ~RuntimeDyldELF();
65 bool isCompatibleFormat(const MemoryBuffer *InputBuffer) const;
68 } // end namespace llvm