- struct boot_modent* modents = bhctx->mods.entries;
- for (size_t i = 0; i < bhctx->mods.mods_num; i++) {
- struct boot_modent* mod = &bhctx->mods.entries[i];
- if (streq(mod->str, "modksyms")) {
- // In case boot loader does not place our ksyms on page boundary
- ptr_t start = PG_ALIGN(mod->start);
- ptr_t end = ROUNDUP(mod->end, PG_SIZE);
- ptr_t ksym_va = (ptr_t)ioremap(start, (end - start));
-
- trace_ctx.ksym_table =
- (struct ksyms*)(ksym_va + (mod->start - start));
- }
- }