Lines Matching refs:Rel

1273   const Relocation *Rel = BC->getDynamicRelocationAt(TargetAddress);  in createPLTBinaryFunction()  local
1274 if (!Rel || !Rel->Symbol) in createPLTBinaryFunction()
1279 BF = BC->createBinaryFunction(Rel->Symbol->getName().str() + "@PLT", *Section, in createPLTBinaryFunction()
1282 setPLTSymbol(BF, Rel->Symbol->getName()); in createPLTBinaryFunction()
1783 DataRefImpl Rel = RelRef.getRawDataRefImpl(); in getRelocationAddend() local
1784 const ELFShdrTy *RelocationSection = cantFail(EF.getSection(Rel.d.a)); in getRelocationAddend()
1791 const Elf_Rela *RelA = Obj->getRela(Rel); in getRelocationAddend()
1801 const RelocationRef &Rel) { in getRelocationAddend() argument
1803 return getRelocationAddend(ELF32LE, Rel); in getRelocationAddend()
1805 return getRelocationAddend(ELF64LE, Rel); in getRelocationAddend()
1807 return getRelocationAddend(ELF32BE, Rel); in getRelocationAddend()
1809 return getRelocationAddend(ELF64BE, Rel); in getRelocationAddend()
1818 DataRefImpl Rel = RelRef.getRawDataRefImpl(); in getRelocationSymbol() local
1819 const ELFShdrTy *RelocationSection = cantFail(EF.getSection(Rel.d.a)); in getRelocationSymbol()
1824 Symbol = Obj->getRel(Rel)->getSymbol(EF.isMips64EL()); in getRelocationSymbol()
1827 Symbol = Obj->getRela(Rel)->getSymbol(EF.isMips64EL()); in getRelocationSymbol()
1835 const RelocationRef &Rel) { in getRelocationSymbol() argument
1837 return getRelocationSymbol(ELF32LE, Rel); in getRelocationSymbol()
1839 return getRelocationSymbol(ELF64LE, Rel); in getRelocationSymbol()
1841 return getRelocationSymbol(ELF32BE, Rel); in getRelocationSymbol()
1843 return getRelocationSymbol(ELF64BE, Rel); in getRelocationSymbol()
1848 const RelocationRef &Rel, uint64_t RType, std::string &SymbolName, in analyzeRelocation() argument
1860 BC->getUnsignedValueAtAddress(Rel.getOffset(), RelSize); in analyzeRelocation()
1865 ExtractedValue = Relocation::extractValue(RType, *Value, Rel.getOffset()); in analyzeRelocation()
1866 Addend = getRelocationAddend(InputFile, Rel); in analyzeRelocation()
1869 const uint64_t PCRelOffset = IsPCRelative && !IsAArch64 ? Rel.getOffset() : 0; in analyzeRelocation()
1871 auto SymbolIter = Rel.getSymbol(); in analyzeRelocation()
1938 << Twine::utohexstr(Rel.getOffset()) in analyzeRelocation()
2228 for (const RelocationRef &Rel : Section.relocations()) { in readDynamicRelocations() local
2229 const uint64_t RType = Rel.getType(); in readDynamicRelocations()
2236 const uint64_t Addend = getRelocationAddend(InputFile, Rel); in readDynamicRelocations()
2238 symbol_iterator SymbolIter = Rel.getSymbol(); in readDynamicRelocations()
2250 Rel.getTypeName(TypeName); in readDynamicRelocations()
2252 << Twine::utohexstr(Rel.getOffset()) << " : " << TypeName in readDynamicRelocations()
2261 SymbolIndex[Symbol] = getRelocationSymbol(InputFile, Rel); in readDynamicRelocations()
2263 BC->addDynamicRelocation(Rel.getOffset(), Symbol, RType, Addend); in readDynamicRelocations()
2303 auto printRelocationInfo = [&](const RelocationRef &Rel, in readRelocations()
2309 Rel.getTypeName(TypeName); in readRelocations()
2313 << Twine::utohexstr(Rel.getOffset()) in readRelocations()
2323 Rel.getOffset(), false, IsAArch64)) in readRelocations()
2326 dbgs() << BC->getSectionForAddress(Rel.getOffset())->getName() << "\n"; in readRelocations()
2329 for (const RelocationRef &Rel : Section.relocations()) { in readRelocations() argument
2331 Rel.getTypeName(TypeName); in readRelocations()
2332 uint64_t RType = Rel.getType(); in readRelocations()
2353 if (!IsAArch64 && BC->getDynamicRelocationAt(Rel.getOffset())) { in readRelocations()
2356 << Twine::utohexstr(Rel.getOffset()) in readRelocations()
2368 if (!analyzeRelocation(Rel, RType, SymbolName, IsSectionRelocation, in readRelocations()
2371 << "offset = 0x" << Twine::utohexstr(Rel.getOffset()) in readRelocations()
2379 << Twine::utohexstr(Rel.getOffset()) in readRelocations()
2387 Rel, SymbolName, SymbolAddress, Addend, ExtractedValue)); in readRelocations()
2392 BC->getBinaryFunctionContainingAddress(Rel.getOffset(), in readRelocations()
2396 if (!IsAArch64 && !ContainingBF->containsAddress(Rel.getOffset())) { in readRelocations()
2432 BC->addPCRelativeDataRelocation(Rel.getOffset()); in readRelocations()
2437 ContainingBF->addRelocation(Rel.getOffset(), ReferencedSymbol, RType, in readRelocations()
2442 << Twine::utohexstr(Rel.getOffset()) << " for " << SymbolName in readRelocations()
2477 << Twine::utohexstr(Rel.getOffset()) << '\n'; in readRelocations()
2478 LLVM_DEBUG(printRelocationInfo(Rel, SymbolName, SymbolAddress, Addend, in readRelocations()
2501 const Relocation &Rel = RelKV.second; in readRelocations() local
2502 if (Rel.Symbol == RogueBF->getSymbol() && in readRelocations()
2503 !Relocation::isPCRelative(Rel.Type)) { in readRelocations()
2549 << Twine::utohexstr(Rel.getOffset()) << '\n'; in readRelocations()
2612 SymbolRef Symbol = *Rel.getSymbol(); in readRelocations()
2645 printRelocationInfo(Rel, ReferencedSymbol->getName(), SymbolAddress, in readRelocations()
2658 ContainingBF->addRelocation(Rel.getOffset(), ReferencedSymbol, RType, in readRelocations()
2661 BC->addRelocation(Rel.getOffset(), ReferencedSymbol, RType, Addend, in readRelocations()
4937 for (const Relocation &Rel : Section.dynamicRelocations()) { in patchELFAllocatableRelaSections() local
4938 const bool IsRelative = Rel.isRelative(); in patchELFAllocatableRelaSections()
4949 MCSymbol *Symbol = Rel.Symbol; in patchELFAllocatableRelaSections()
4951 uint64_t Addend = Rel.Addend; in patchELFAllocatableRelaSections()
4953 if (Rel.Symbol) { in patchELFAllocatableRelaSections()
4962 NewRelA.setSymbolAndType(SymbolIdx, Rel.Type, EF.isMips64EL()); in patchELFAllocatableRelaSections()
4963 NewRelA.r_offset = SectionAddress + Rel.Offset; in patchELFAllocatableRelaSections()
4967 !!(IsJmpRelocation.find(Rel.Type) != IsJmpRelocation.end()); in patchELFAllocatableRelaSections()