LLVM  14.0.0git
RuntimeDyldELFMips.h
Go to the documentation of this file.
1 //===-- RuntimeDyldELFMips.h ---- ELF/Mips specific code. -------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_TARGETS_RUNTIMEDYLDELFMIPS_H
10 #define LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_TARGETS_RUNTIMEDYLDELFMIPS_H
11 
12 #include "../RuntimeDyldELF.h"
13 #include <string>
14 
15 #define DEBUG_TYPE "dyld"
16 
17 namespace llvm {
18 
20 public:
21 
23 
26  : RuntimeDyldELF(MM, Resolver) {}
27 
28  void resolveRelocation(const RelocationEntry &RE, uint64_t Value) override;
29 
30 protected:
32  uint32_t Value, uint32_t Type, int32_t Addend);
34  uint64_t Value, uint32_t Type, int64_t Addend,
35  uint64_t SymOffset, SID SectionID);
37  uint64_t Value, uint32_t Type, int64_t Addend,
38  uint64_t SymOffset, SID SectionID);
39 
40 private:
41  /// A object file specific relocation resolver
42  /// \param RE The relocation to be resolved
43  /// \param Value Target symbol address to apply the relocation action
44  uint64_t evaluateRelocation(const RelocationEntry &RE, uint64_t Value,
45  uint64_t Addend);
46 
47  /// A object file specific relocation resolver
48  /// \param RE The relocation to be resolved
49  /// \param Value Target symbol address to apply the relocation action
50  void applyRelocation(const RelocationEntry &RE, uint64_t Value);
51 
52  int64_t evaluateMIPS32Relocation(const SectionEntry &Section, uint64_t Offset,
54  int64_t evaluateMIPS64Relocation(const SectionEntry &Section,
56  uint32_t Type, int64_t Addend,
57  uint64_t SymOffset, SID SectionID);
58 
59  void applyMIPSRelocation(uint8_t *TargetPtr, int64_t CalculatedValue,
60  uint32_t Type);
61 
62 };
63 }
64 
65 #undef DEBUG_TYPE
66 
67 #endif
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::RuntimeDyldELFMips::resolveMIPSN32Relocation
void resolveMIPSN32Relocation(const SectionEntry &Section, uint64_t Offset, uint64_t Value, uint32_t Type, int64_t Addend, uint64_t SymOffset, SID SectionID)
Definition: RuntimeDyldELFMips.cpp:265
llvm::ARMBuildAttrs::Section
@ Section
Legacy Tags.
Definition: ARMBuildAttributes.h:78
llvm::Resolver
Interface for looking up the initializer for a variable name, used by Init::resolveReferences.
Definition: Record.h:2000
llvm::RuntimeDyldImpl::SID
unsigned SID
Definition: RuntimeDyldImpl.h:256
llvm::RuntimeDyldELFMips::resolveMIPSN64Relocation
void resolveMIPSN64Relocation(const SectionEntry &Section, uint64_t Offset, uint64_t Value, uint32_t Type, int64_t Addend, uint64_t SymOffset, SID SectionID)
Definition: RuntimeDyldELFMips.cpp:274
llvm::RelocationEntry
RelocationEntry - used to represent relocations internally in the dynamic linker.
Definition: RuntimeDyldImpl.h:117
uint64_t
llvm::SectionEntry
SectionEntry - represents a section emitted into memory by the dynamic linker.
Definition: RuntimeDyldImpl.h:45
llvm::RuntimeDyldELFMips::resolveMIPSO32Relocation
void resolveMIPSO32Relocation(const SectionEntry &Section, uint64_t Offset, uint32_t Value, uint32_t Type, int32_t Addend)
Definition: RuntimeDyldELFMips.cpp:303
uint32_t
llvm::RuntimeDyldELFMips
Definition: RuntimeDyldELFMips.h:19
llvm::RuntimeDyldELF
Definition: RuntimeDyldELF.h:26
llvm::JITSymbolResolver
Symbol resolution interface.
Definition: JITSymbol.h:371
llvm::RuntimeDyldELFMips::RuntimeDyldELFMips
RuntimeDyldELFMips(RuntimeDyld::MemoryManager &MM, JITSymbolResolver &Resolver)
Definition: RuntimeDyldELFMips.h:24
llvm::RuntimeDyldELFMips::resolveRelocation
void resolveRelocation(const RelocationEntry &RE, uint64_t Value) override
A object file specific relocation resolver.
Definition: RuntimeDyldELFMips.cpp:14
llvm::RuntimeDyldELFMips::TargetPtrT
uint64_t TargetPtrT
Definition: RuntimeDyldELFMips.h:22
llvm::Value
LLVM Value Representation.
Definition: Value.h:75
llvm::RuntimeDyld::MemoryManager
Memory Management.
Definition: RuntimeDyld.h:92