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 void resolveX86_64Relocation(uint8_t *LocalAddress,
26 uint64_t FinalAddress,
31 void resolveX86Relocation(uint8_t *LocalAddress,
32 uint32_t FinalAddress,
37 void resolveARMRelocation(uint8_t *LocalAddress,
38 uint32_t FinalAddress,
43 void resolveMIPSRelocation(uint8_t *LocalAddress,
44 uint32_t FinalAddress,
49 void resolvePPC64Relocation(uint8_t *LocalAddress,
50 uint64_t FinalAddress,
55 virtual void resolveRelocation(uint8_t *LocalAddress,
56 uint64_t FinalAddress,
61 virtual void processRelocationRef(const ObjRelocationInfo &Rel,
63 ObjSectionToIDMap &ObjSectionToID,
64 const SymbolTableMap &Symbols,
67 virtual ObjectImage *createObjectImage(ObjectBuffer *InputBuffer);
69 uint64_t findPPC64TOC() const;
70 void findOPDEntrySection(ObjectImage &Obj,
71 ObjSectionToIDMap &LocalSections,
72 RelocationValueRef &Rel);
75 RuntimeDyldELF(RTDyldMemoryManager *mm)
76 : RuntimeDyldImpl(mm) {}
78 virtual ~RuntimeDyldELF();
80 bool isCompatibleFormat(const ObjectBuffer *Buffer) const;
83 } // end namespace llvm