Lines Matching refs:rel

327                                              const coff_relocation &rel) {  in maybeReportRelocationToDiscarded()  argument
343 check(file->getCOFFObj()->getSymbol(rel.SymbolTableIndex)); in maybeReportRelocationToDiscarded()
348 getSymbolLocations(file, rel.SymbolTableIndex); in maybeReportRelocationToDiscarded()
368 for (const coff_relocation &rel : getRelocs()) { in writeTo() local
373 if (rel.VirtualAddress >= inputSize) { in writeTo()
378 applyRelocation(buf + rel.VirtualAddress, rel); in writeTo()
383 const coff_relocation &rel) const { in applyRelocation()
384 auto *sym = dyn_cast_or_null<Defined>(file->getSymbol(rel.SymbolTableIndex)); in applyRelocation()
398 maybeReportRelocationToDiscarded(this, sym, rel); in applyRelocation()
405 uint64_t p = rva + rel.VirtualAddress; in applyRelocation()
408 applyRelX64(off, rel.Type, os, s, p); in applyRelocation()
411 applyRelX86(off, rel.Type, os, s, p); in applyRelocation()
414 applyRelARM(off, rel.Type, os, s, p); in applyRelocation()
417 applyRelARM64(off, rel.Type, os, s, p); in applyRelocation()
452 const coff_relocation &rel = relocsData[nextRelocIndex]; in writeAndRelocateSubsection() local
456 if (rel.VirtualAddress < vaBegin) in writeAndRelocateSubsection()
458 if (rel.VirtualAddress + 1 >= vaEnd) in writeAndRelocateSubsection()
460 applyRelocation(&buf[rel.VirtualAddress - vaBegin], rel); in writeAndRelocateSubsection()
482 static uint8_t getBaserelType(const coff_relocation &rel) { in getBaserelType() argument
485 if (rel.Type == IMAGE_REL_AMD64_ADDR64) in getBaserelType()
487 if (rel.Type == IMAGE_REL_AMD64_ADDR32) in getBaserelType()
491 if (rel.Type == IMAGE_REL_I386_DIR32) in getBaserelType()
495 if (rel.Type == IMAGE_REL_ARM_ADDR32) in getBaserelType()
497 if (rel.Type == IMAGE_REL_ARM_MOV32T) in getBaserelType()
501 if (rel.Type == IMAGE_REL_ARM64_ADDR64) in getBaserelType()
514 for (const coff_relocation &rel : getRelocs()) { in getBaserels() local
515 uint8_t ty = getBaserelType(rel); in getBaserels()
518 Symbol *target = file->getSymbol(rel.SymbolTableIndex); in getBaserels()
521 res->emplace_back(rva + rel.VirtualAddress, ty); in getBaserels()
610 for (const coff_relocation &rel : getRelocs()) { in getRuntimePseudoRelocs() local
612 dyn_cast_or_null<Defined>(file->getSymbol(rel.SymbolTableIndex)); in getRuntimePseudoRelocs()
615 int sizeInBits = getRuntimePseudoRelocSize(rel.Type); in getRuntimePseudoRelocs()
619 file->getCOFFObj()->getRelocationTypeName(rel.Type) + " in " + in getRuntimePseudoRelocs()
626 RuntimePseudoReloc(target, this, rel.VirtualAddress, sizeInBits)); in getRuntimePseudoRelocs()