LLVM: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDMACHO_H

14#define LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDMACHO_H

15

19

20namespace llvm {

22protected:

27

40

41

42

43

45

49

50

51

53

54

55

56

57

58

66

67 bool IsPCRel = Obj.getAnyRelocationPCRel(RelInfo);

68 unsigned Size = Obj.getAnyRelocationLength(RelInfo);

72

74 }

75

76

81 bool TargetIsLocalThumbFunc = false);

82

83

84

85

86

87

88

89

90

91

97

98

101 unsigned OffsetToNextPC);

102

103

105

106

109

110

111

114 unsigned PTSectionID);

115

116public:

117

118

119 static std::unique_ptr

123

124 std::unique_ptrRuntimeDyld::LoadedObjectInfo

126

128

130};

131

132

133

134

135

136

137

138

139template

141private:

142 Impl &impl() { return static_cast<Impl &>(*this); }

143 const Impl &impl() const { return static_cast<const Impl &>(*this); }

144

145 unsigned char *processFDE(uint8_t *P, int64_t DeltaForText,

146 int64_t DeltaForEH);

147

148public:

152

156};

157

158}

159

160#endif

#define RTDYLD_INVALID_SECTION_ID

Lightweight error class with error context and mandatory checking.

Tagged union holding either a T or a Error.

Symbol resolution interface.

RelocationEntry - used to represent relocations internally in the dynamic linker.

Interface for looking up the initializer for a variable name, used by Init::resolveReferences.

std::map< SectionRef, unsigned > ObjSectionToIDMap

RuntimeDyldImpl(RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)

JITSymbolResolver & Resolver

RuntimeDyld::MemoryManager & MemMgr

void registerEHFrames() override

RuntimeDyldMachOCRTPBase(RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)

Definition RuntimeDyldMachO.h:149

Error finalizeLoad(const ObjectFile &Obj, ObjSectionToIDMap &SectionMap) override

RuntimeDyldMachO(RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)

Definition RuntimeDyldMachO.h:46

static std::unique_ptr< RuntimeDyldMachO > create(Triple::ArchType Arch, RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)

Create a RuntimeDyldMachO instance for the given target architecture.

static section_iterator getSectionByAddress(const MachOObjectFile &Obj, uint64_t Addr)

int64_t memcpyAddend(const RelocationEntry &RE) const

This convenience method uses memcpy to extract a contiguous addend (the addend size and offset are ta...

SmallVector< EHFrameRelatedSections, 2 > UnregisteredEHFrameSections

Definition RuntimeDyldMachO.h:44

std::unique_ptr< RuntimeDyld::LoadedObjectInfo > loadObject(const object::ObjectFile &O) override

SectionEntry & getSection(unsigned SectionID)

Definition RuntimeDyldMachO.h:127

Error populateIndirectSymbolPointersSection(const MachOObjectFile &Obj, const SectionRef &PTSection, unsigned PTSectionID)

void makeValueAddendPCRel(RelocationValueRef &Value, const relocation_iterator &RI, unsigned OffsetToNextPC)

Make the RelocationValueRef addend PC-relative.

RelocationEntry getRelocationEntry(unsigned SectionID, const ObjectFile &BaseTObj, const relocation_iterator &RI) const

Given a relocation_iterator for a non-scattered relocation, construct a RelocationEntry and fill in t...

Definition RuntimeDyldMachO.h:59

Expected< RelocationValueRef > getRelocationValueRef(const ObjectFile &BaseTObj, const relocation_iterator &RI, const RelocationEntry &RE, ObjSectionToIDMap &ObjSectionToID)

Construct a RelocationValueRef representing the relocation target.

Expected< relocation_iterator > processScatteredVANILLA(unsigned SectionID, relocation_iterator RelI, const ObjectFile &BaseObjT, RuntimeDyldMachO::ObjSectionToIDMap &ObjSectionToID, bool TargetIsLocalThumbFunc=false)

Process a scattered vanilla relocation.

bool isCompatibleFile(const object::ObjectFile &Obj) const override

void dumpRelocationToResolve(const RelocationEntry &RE, uint64_t Value) const

Dump information about the relocation entry (RE) and resolved value.

SectionEntry - represents a section emitted into memory by the dynamic linker.

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

LLVM Value Representation.

This class is the base class for all object file types.

uint64_t getOffset() const

DataRefImpl getRawDataRefImpl() const

This is a value type class that represents a single section in the list of sections in the object fil...

content_iterator< SectionRef > section_iterator

content_iterator< RelocationRef > relocation_iterator

This is an optimization pass for GlobalISel generic memory operations.

Definition RuntimeDyldMachO.h:23

unsigned SectionID

Definition RuntimeDyldMachO.h:24

uint64_t Offset

Definition RuntimeDyldMachO.h:25