/* cache the address, ELF header is available only during module load */ if (!pltsec->plt_ent)
pltsec->plt_ent = (struct plt_entries *)pltsec->plt->sh_addr;
plt = pltsec->plt_ent;
prealloc_fixed(pltsec, plt);
for (idx = 0; idx < ARRAY_SIZE(fixed_plts); ++idx) if (plt->lit[idx] == val) return (u32)&plt->ldr[idx];
staticint cmp_rel(constvoid *a, constvoid *b)
{ const Elf32_Rel *x = a, *y = b; int i;
/* sort by type and symbol index */
i = cmp_3way(ELF32_R_TYPE(x->r_info), ELF32_R_TYPE(y->r_info)); if (i == 0)
i = cmp_3way(ELF32_R_SYM(x->r_info), ELF32_R_SYM(y->r_info)); return i;
}
/* Count how many PLT entries we may need */ staticunsignedint count_plts(const Elf32_Sym *syms, Elf32_Addr base, const Elf32_Rel *rel, int num, Elf32_Word dstidx)
{ unsignedint ret = 0; const Elf32_Sym *s; int i;
for (i = 0; i < num; i++) { switch (ELF32_R_TYPE(rel[i].r_info)) { case R_ARM_CALL: case R_ARM_PC24: case R_ARM_JUMP24: case R_ARM_THM_CALL: case R_ARM_THM_JUMP24: /* *Weonlyhavetoconsiderbranchtargetsthatresolve *tosymbolsthataredefinedinadifferentsection. *Thisisnotsimplyaheuristic,itisafundamental *limitation,sincethereisnoguaranteedwaytoemit *PLTentriessufficientlyclosetothebranchifthe *sectionsizeexceedstherangeofabranch *instruction.Soignorerelocationsagainstdefined *symbolsiftheyliveinthesamesectionasthe *relocationtarget.
*/
s = syms + ELF32_R_SYM(rel[i].r_info); if (s->st_shndx == dstidx) break;
guard(rcu)();
mod = __module_text_address(loc);
ret = mod && (loc - (u32)mod->arch.core.plt_ent < mod->arch.core.plt_count * PLT_ENT_SIZE ||
loc - (u32)mod->arch.init.plt_ent < mod->arch.init.plt_count * PLT_ENT_SIZE); return ret;
}
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.14Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-10-12)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.