Lines Matching full:re

62   Expected<int64_t> decodeAddend(const RelocationEntry &RE) const {  in decodeAddend()  argument
63 const SectionEntry &Section = Sections[RE.SectionID]; in decodeAddend()
64 uint8_t *LocalAddress = Section.getAddressWithOffset(RE.Offset); in decodeAddend()
66 switch (RE.RelType) { in decodeAddend()
68 return memcpyAddend(RE); in decodeAddend()
159 RelocationEntry RE(getRelocationEntry(SectionID, Obj, RelI)); in processRelocationRef()
160 if (auto AddendOrErr = decodeAddend(RE)) in processRelocationRef()
161 RE.Addend = *AddendOrErr; in processRelocationRef()
164 RE.IsTargetThumbFunc = TargetIsLocalThumbFunc; in processRelocationRef()
167 if (auto ValueOrErr = getRelocationValueRef(Obj, RelI, RE, ObjSectionToID)) in processRelocationRef()
175 if (RE.RelType == MachO::ARM_THUMB_RELOC_BR22) in processRelocationRef()
178 if (RE.IsPCRel) in processRelocationRef()
180 (RE.RelType == MachO::ARM_THUMB_RELOC_BR22) ? 4 : 8); in processRelocationRef()
186 RE.IsTargetThumbFunc = isAddrTargetThumb(Value.SectionID, Value.Offset); in processRelocationRef()
188 if (RE.RelType == MachO::ARM_RELOC_BR24 || in processRelocationRef()
189 RE.RelType == MachO::ARM_THUMB_RELOC_BR22) in processRelocationRef()
190 processBranchRelocation(RE, Value, Stubs); in processRelocationRef()
192 RE.Addend = Value.Offset; in processRelocationRef()
194 addRelocationForSymbol(RE, Value.SymbolName); in processRelocationRef()
196 addRelocationForSection(RE, Value.SectionID); in processRelocationRef()
202 void resolveRelocation(const RelocationEntry &RE, uint64_t Value) override { in resolveRelocation() argument
203 LLVM_DEBUG(dumpRelocationToResolve(RE, Value)); in resolveRelocation()
204 const SectionEntry &Section = Sections[RE.SectionID]; in resolveRelocation()
205 uint8_t *LocalAddress = Section.getAddressWithOffset(RE.Offset); in resolveRelocation()
209 if (RE.IsPCRel) { in resolveRelocation()
210 uint64_t FinalAddress = Section.getLoadAddressWithOffset(RE.Offset); in resolveRelocation()
214 Value -= (RE.RelType == MachO::ARM_THUMB_RELOC_BR22) ? 4 : 8; in resolveRelocation()
217 switch (RE.RelType) { in resolveRelocation()
219 Value += RE.Addend; in resolveRelocation()
236 if (RE.IsTargetThumbFunc) in resolveRelocation()
238 writeBytesUnaligned(Value + RE.Addend, LocalAddress, 1 << RE.Size); in resolveRelocation()
243 Value += RE.Addend; in resolveRelocation()
259 uint64_t SectionABase = Sections[RE.Sections.SectionA].getLoadAddress(); in resolveRelocation()
260 uint64_t SectionBBase = Sections[RE.Sections.SectionB].getLoadAddress(); in resolveRelocation()
263 Value = SectionABase - SectionBBase + RE.Addend; in resolveRelocation()
264 if (RE.Size & 0x1) // :upper16: in resolveRelocation()
267 bool IsThumb = RE.Size & 0x2; in resolveRelocation()
304 void processBranchRelocation(const RelocationEntry &RE, in processBranchRelocation() argument
309 SectionEntry &Section = Sections[RE.SectionID]; in processBranchRelocation()
319 if (RE.RelType == MachO::ARM_RELOC_BR24) in processBranchRelocation()
321 else if (RE.RelType == MachO::ARM_THUMB_RELOC_BR22) in processBranchRelocation()
329 RE.SectionID, StubTargetAddr - Section.getAddress(), in processBranchRelocation()
331 StubRE.IsTargetThumbFunc = RE.IsTargetThumbFunc; in processBranchRelocation()
338 RelocationEntry TargetRE(RE.SectionID, RE.Offset, RE.RelType, 0, in processBranchRelocation()
339 RE.IsPCRel, RE.Size); in processBranchRelocation()
349 MachO::any_relocation_info RE = in processHALFSECTDIFFRelocation() local
356 unsigned HalfDiffKindBits = MachO.getAnyRelocationLength(RE); in processHALFSECTDIFFRelocation()
360 uint32_t RelocType = MachO.getAnyRelocationType(RE); in processHALFSECTDIFFRelocation()
361 bool IsPCRel = MachO.getAnyRelocationPCRel(RE); in processHALFSECTDIFFRelocation()
377 uint32_t AddrA = MachO.getScatteredRelocationValue(RE); in processHALFSECTDIFFRelocation()