• Home
  • Raw
  • Download

Lines Matching refs:RE

35   int64_t decodeAddend(const RelocationEntry &RE) const {  in decodeAddend()  argument
36 const SectionEntry &Section = Sections[RE.SectionID]; in decodeAddend()
37 uint8_t *LocalAddress = Section.getAddressWithOffset(RE.Offset); in decodeAddend()
38 unsigned NumBytes = 1 << RE.Size; in decodeAddend()
41 switch (RE.RelType) { in decodeAddend()
58 switch (RE.RelType) { in decodeAddend()
273 RelocationEntry RE(getRelocationEntry(SectionID, Obj, RelI)); in processRelocationRef()
274 RE.Addend = decodeAddend(RE); in processRelocationRef()
276 assert((ExplicitAddend == 0 || RE.Addend == 0) && "Relocation has "\ in processRelocationRef()
279 RE.Addend = ExplicitAddend; in processRelocationRef()
282 getRelocationValueRef(Obj, RelI, RE, ObjSectionToID)); in processRelocationRef()
285 if (!IsExtern && RE.IsPCRel) in processRelocationRef()
286 makeValueAddendPCRel(Value, RelI, 1 << RE.Size); in processRelocationRef()
288 RE.Addend = Value.Offset; in processRelocationRef()
290 if (RE.RelType == MachO::ARM64_RELOC_GOT_LOAD_PAGE21 || in processRelocationRef()
291 RE.RelType == MachO::ARM64_RELOC_GOT_LOAD_PAGEOFF12) in processRelocationRef()
292 processGOTRelocation(RE, Value, Stubs); in processRelocationRef()
295 addRelocationForSymbol(RE, Value.SymbolName); in processRelocationRef()
297 addRelocationForSection(RE, Value.SectionID); in processRelocationRef()
303 void resolveRelocation(const RelocationEntry &RE, uint64_t Value) override { in resolveRelocation() argument
304 DEBUG(dumpRelocationToResolve(RE, Value)); in resolveRelocation()
306 const SectionEntry &Section = Sections[RE.SectionID]; in resolveRelocation()
307 uint8_t *LocalAddress = Section.getAddressWithOffset(RE.Offset); in resolveRelocation()
309 static_cast<MachO::RelocationInfoType>(RE.RelType); in resolveRelocation()
315 assert(!RE.IsPCRel && "PCRel and ARM64_RELOC_UNSIGNED not supported"); in resolveRelocation()
318 if (RE.Size < 2) in resolveRelocation()
321 encodeAddend(LocalAddress, 1 << RE.Size, RelType, Value + RE.Addend); in resolveRelocation()
325 assert(RE.IsPCRel && "not PCRel and ARM64_RELOC_BRANCH26 not supported"); in resolveRelocation()
327 uint64_t FinalAddress = Section.getLoadAddressWithOffset(RE.Offset); in resolveRelocation()
328 int64_t PCRelVal = Value - FinalAddress + RE.Addend; in resolveRelocation()
334 assert(RE.IsPCRel && "not PCRel and ARM64_RELOC_PAGE21 not supported"); in resolveRelocation()
336 uint64_t FinalAddress = Section.getLoadAddressWithOffset(RE.Offset); in resolveRelocation()
338 ((Value + RE.Addend) & (-4096)) - (FinalAddress & (-4096)); in resolveRelocation()
344 assert(!RE.IsPCRel && "PCRel and ARM64_RELOC_PAGEOFF21 not supported"); in resolveRelocation()
346 Value += RE.Addend; in resolveRelocation()
367 void processGOTRelocation(const RelocationEntry &RE, in processGOTRelocation() argument
369 assert(RE.Size == 2); in processGOTRelocation()
370 SectionEntry &Section = Sections[RE.SectionID]; in processGOTRelocation()
387 RelocationEntry GOTRE(RE.SectionID, StubOffset, in processGOTRelocation()
397 RelocationEntry TargetRE(RE.SectionID, RE.Offset, RE.RelType, Offset, in processGOTRelocation()
398 RE.IsPCRel, RE.Size); in processGOTRelocation()
399 addRelocationForSection(TargetRE, RE.SectionID); in processGOTRelocation()