Lines Matching refs:isec
208 static bool branchDestInFirstRegion(const InputSection *isec, uint64_t off, in branchDestInFirstRegion() argument
210 uint64_t sourceAddr = isec->getVA(0) + off; in branchDestInFirstRegion()
231 static bool patchInRange(const InputSection *isec, uint64_t off, in patchInRange() argument
239 isBcc(instr) ? R_ARM_THM_JUMP19 : R_ARM_THM_JUMP24, isec->getVA(off), in patchInRange()
240 isec->getVA() + isec->getSize() + 0x100); in patchInRange()
257 static ScanResult scanCortexA8Errata657417(InputSection *isec, uint64_t &off, in scanCortexA8Errata657417() argument
259 uint64_t isecAddr = isec->getVA(0); in scanCortexA8Errata657417()
271 const uint8_t *buf = isec->data().begin(); in scanCortexA8Errata657417()
286 auto relIt = llvm::find_if(isec->relocations, [=](const Relocation &r) { in scanCortexA8Errata657417()
291 if (relIt != isec->relocations.end()) in scanCortexA8Errata657417()
293 if (branchDestInFirstRegion(isec, branchOff, instr2, scanRes.rel)) { in scanCortexA8Errata657417()
294 if (patchInRange(isec, branchOff, instr2)) { in scanCortexA8Errata657417()
298 warn(toString(isec->file) + in scanCortexA8Errata657417()
300 isec->name + " is too large to patch"); in scanCortexA8Errata657417()
380 for (const InputSection *isec : isd.sections) { in insertPatches() local
381 isecLimit = isec->outSecOff + isec->getSize(); in insertPatches()
416 static void implementPatch(ScanResult sr, InputSection *isec, in implementPatch() argument
420 utohexstr(isec->getVA(sr.off)) + " in unpatched output."); in implementPatch()
450 psec = make<Patch657417Section>(isec, sr.off, sr.instr, destIsARM); in implementPatch()
468 psec = make<Patch657417Section>(isec, sr.off, sr.instr, isBLX(sr.instr)); in implementPatch()
476 isec->relocations.push_back( in implementPatch()
489 for (InputSection *isec : isd.sections) { in patchInputSectionDescription()
491 if (isa<SyntheticSection>(isec)) in patchInputSectionDescription()
498 std::vector<const Defined *> &mapSyms = sectionMap[isec]; in patchInputSectionDescription()
504 uint64_t limit = (nonThumbSym == mapSyms.end()) ? isec->data().size() in patchInputSectionDescription()
508 ScanResult sr = scanCortexA8Errata657417(isec, off, limit); in patchInputSectionDescription()
510 implementPatch(sr, isec, patches); in patchInputSectionDescription()