Lines Matching +full:re +full:-
1 //===-- RuntimeDyldMachO.cpp - Run-time dynamic linker for MC-JIT -*- C++ -*-=//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // Implementation of the MC-JIT runtime dynamic linker.
11 //===----------------------------------------------------------------------===//
46 int64_t RuntimeDyldMachO::memcpyAddend(const RelocationEntry &RE) const { in memcpyAddend()
47 unsigned NumBytes = 1 << RE.Size; in memcpyAddend()
48 uint8_t *Src = Sections[RE.SectionID].getAddress() + RE.Offset; in memcpyAddend()
61 MachO::any_relocation_info RE = in processScatteredVANILLA() local
62 Obj.getRelocation(RelI->getRawDataRefImpl()); in processScatteredVANILLA()
65 uint32_t RelocType = Obj.getAnyRelocationType(RE); in processScatteredVANILLA()
66 bool IsPCRel = Obj.getAnyRelocationPCRel(RE); in processScatteredVANILLA()
67 unsigned Size = Obj.getAnyRelocationLength(RE); in processScatteredVANILLA()
68 uint64_t Offset = RelI->getOffset(); in processScatteredVANILLA()
73 unsigned SymbolBaseAddr = Obj.getScatteredRelocationValue(RE); in processScatteredVANILLA()
76 uint64_t SectionBaseAddr = TargetSI->getAddress(); in processScatteredVANILLA()
86 Addend -= SectionBaseAddr; in processScatteredVANILLA()
99 const RelocationEntry &RE, ObjSectionToIDMap &ObjSectionToID) { in getRelocationValueRef() argument
104 Obj.getRelocation(RI->getRawDataRefImpl()); in getRelocationValueRef()
109 symbol_iterator Symbol = RI->getSymbol(); in getRelocationValueRef()
111 if (auto TargetNameOrErr = Symbol->getName()) in getRelocationValueRef()
118 const auto &SymInfo = SI->second; in getRelocationValueRef()
120 Value.Offset = SymInfo.getOffset() + RE.Addend; in getRelocationValueRef()
123 Value.Offset = RE.Addend; in getRelocationValueRef()
134 Value.Offset = RE.Addend - Addr; in getRelocationValueRef()
143 auto &O = *cast<MachOObjectFile>(RI->getObject()); in makeValueAddendPCRel()
145 Value.Offset += RI->getOffset() + OffsetToNextPC + SecI->getAddress(); in makeValueAddendPCRel()
148 void RuntimeDyldMachO::dumpRelocationToResolve(const RelocationEntry &RE, in dumpRelocationToResolve() argument
150 const SectionEntry &Section = Sections[RE.SectionID]; in dumpRelocationToResolve()
151 uint8_t *LocalAddress = Section.getAddress() + RE.Offset; in dumpRelocationToResolve()
152 uint64_t FinalAddress = Section.getLoadAddress() + RE.Offset; in dumpRelocationToResolve()
154 dbgs() << "resolveRelocation Section: " << RE.SectionID in dumpRelocationToResolve()
157 << " Value: " << format("0x%016" PRIx64, Value) << " Addend: " << RE.Addend in dumpRelocationToResolve()
158 << " isPCRel: " << RE.IsPCRel << " MachoType: " << RE.RelType in dumpRelocationToResolve()
159 << " Size: " << (1 << RE.Size) << "\n"; in dumpRelocationToResolve()
169 uint64_t SAddr = SI->getAddress(); in getSectionByAddress()
170 uint64_t SSize = SI->getSize(); in getSectionByAddress()
185 "Pointer table section not supported in 64-bit MachO."); in populateIndirectSymbolPointersSection()
208 if (auto IndirectSymbolNameOrErr = SI->getName()) in populateIndirectSymbolPointersSection()
214 RelocationEntry RE(PTSectionID, PTEntryOffset, in populateIndirectSymbolPointersSection() local
216 addRelocationForSymbol(RE, IndirectSymbolName); in populateIndirectSymbolPointersSection()
242 // if they're present. Otherwise call down to the impl to handle other in finalizeLoad()
264 if (auto Err = impl().finalizeSection(Obj, I->second, Section)) in finalizeLoad()
291 TargetPtrT NewLocation = FDELocation - DeltaForText; in processFDE()
303 TargetPtrT NewLSDA = LSDA - DeltaForEH; in processFDE()
311 int64_t ObjDistance = static_cast<int64_t>(A->getObjAddress()) - in computeDelta()
312 static_cast<int64_t>(B->getObjAddress()); in computeDelta()
313 int64_t MemDistance = A->getLoadAddress() - B->getLoadAddress(); in computeDelta()
314 return ObjDistance - MemDistance; in computeDelta()
336 uint8_t *P = EHFrame->getAddress(); in registerEHFrames()
337 uint8_t *End = P + EHFrame->getSize(); in registerEHFrames()
342 MemMgr.registerEHFrames(EHFrame->getAddress(), EHFrame->getLoadAddress(), in registerEHFrames()
343 EHFrame->getSize()); in registerEHFrames()