LLVM: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h Source File (original) (raw)
25
28 uint64_t SymOffset = 0, SID SectionID = 0);
29
33
36
39
40 bool resolveAArch64ShortBranch(unsigned SectionID, relocation_iterator RelI,
42
45
48
49 void resolveLoongArch64Relocation(const SectionEntry &Section,
52
53 bool resolveLoongArch64ShortBranch(unsigned SectionID,
56
57 void resolveLoongArch64Branch(unsigned SectionID,
60
63
66
69
72
75 SID SectionID);
76
79 return 20;
81 return 8;
83 return 16;
85 return 32;
87 return 20;
89 return 44;
91 return 6;
93 return 16;
94 else
95 return 0;
96 }
97
101 else
103 }
104
105 void setMipsABI(const ObjectFile &Obj) override;
106
113
114protected:
116
117private:
119
120
121 uint64_t allocateGOTEntries(unsigned no);
122
123
125 unsigned GOTRelType);
126
127
128
129 void resolveGOTOffsetRelocation(unsigned SectionID, uint64_t Offset,
131
132
133
135 unsigned Type);
136
137
138 void *computePlaceholderAddress(unsigned SectionID, uint64_t Offset) const;
139
140
141
143
144
146 bool IsLocal = false) const;
147
148
149 unsigned GOTSectionID;
150
151
152
153
154 unsigned CurrentGOTIndex;
155
156protected:
157
158
160
161private:
162
164
165
166
167
168
169
171
172
173
174
176
177
178 std::map<RelocationValueRef, uint64_t> GOTOffsetMap;
179
180
181 unsigned IFuncStubSectionID = 0;
182
183 uint64_t IFuncStubOffset = 0;
184
185
186 struct IFuncStub {
187
189
191 };
192
193
195
196
197
198
199
200 void createIFuncResolver(uint8_t *Addr) const;
201
202
203
204
205
206 void createIFuncStub(unsigned IFuncStubSectionID,
208 unsigned IFuncSectionID, uint64_t IFuncOffset);
209
210 unsigned getMaxIFuncStubSize() const;
211
212 void processNewSymbol(const SymbolRef &ObjSymbol,
214 bool relocationNeedsGot(const RelocationRef &R) const override;
215 bool relocationNeedsStub(const RelocationRef &R) const override;
216
217
218
219 void processX86_64GOTTPOFFRelocation(unsigned SectionID, uint64_t Offset,
221 int64_t Addend);
222
223
224 void processX86_64TLSRelocation(unsigned SectionID, uint64_t Offset,
226 int64_t Addend,
228
229public:
233
234 static std::unique_ptr
237
238 std::unique_ptrRuntimeDyld::LoadedObjectInfo
240
246 StubMap &Stubs) override;
251};