Lines Matching refs:isec
206 static bool branchDestInFirstRegion(const InputSection *isec, uint64_t off, in branchDestInFirstRegion() argument
208 uint64_t sourceAddr = isec->getVA(0) + off; in branchDestInFirstRegion()
229 static bool patchInRange(const InputSection *isec, uint64_t off, in patchInRange() argument
237 isBcc(instr) ? R_ARM_THM_JUMP19 : R_ARM_THM_JUMP24, isec->getVA(off), in patchInRange()
238 isec->getVA() + isec->getSize() + 0x100); in patchInRange()
255 static ScanResult scanCortexA8Errata657417(InputSection *isec, uint64_t &off, in scanCortexA8Errata657417() argument
257 uint64_t isecAddr = isec->getVA(0); in scanCortexA8Errata657417()
269 const uint8_t *buf = isec->content().begin(); in scanCortexA8Errata657417()
284 auto relIt = llvm::find_if(isec->relocs(), [=](const Relocation &r) { in scanCortexA8Errata657417()
289 if (relIt != isec->relocs().end()) in scanCortexA8Errata657417()
291 if (branchDestInFirstRegion(isec, branchOff, instr2, scanRes.rel)) { in scanCortexA8Errata657417()
292 if (patchInRange(isec, branchOff, instr2)) { in scanCortexA8Errata657417()
296 warn(toString(isec->file) + in scanCortexA8Errata657417()
298 isec->name + " is too large to patch"); in scanCortexA8Errata657417()
377 for (const InputSection *isec : isd.sections) { in insertPatches() local
378 isecLimit = isec->outSecOff + isec->getSize(); in insertPatches()
413 static void implementPatch(ScanResult sr, InputSection *isec, in implementPatch() argument
417 utohexstr(isec->getVA(sr.off)) + " in unpatched output."); in implementPatch()
447 psec = make<Patch657417Section>(isec, sr.off, sr.instr, destIsARM); in implementPatch()
465 psec = make<Patch657417Section>(isec, sr.off, sr.instr, isBLX(sr.instr)); in implementPatch()
473 isec->addReloc(Relocation{R_PC, type, sr.off, -4, psec->patchSym}); in implementPatch()
485 for (InputSection *isec : isd.sections) { in patchInputSectionDescription()
487 if (isa<SyntheticSection>(isec)) in patchInputSectionDescription()
494 std::vector<const Defined *> &mapSyms = sectionMap[isec]; in patchInputSectionDescription()
500 uint64_t limit = nonThumbSym == mapSyms.end() ? isec->content().size() in patchInputSectionDescription()
504 ScanResult sr = scanCortexA8Errata657417(isec, off, limit); in patchInputSectionDescription()
506 implementPatch(sr, isec, patches); in patchInputSectionDescription()