Lines Matching refs:arch

310 	if (mod->arch.init_unw_table) {  in module_arch_freeing_init()
311 unw_remove_unwind_table(mod->arch.init_unw_table); in module_arch_freeing_init()
312 mod->arch.init_unw_table = NULL; in module_arch_freeing_init()
433 mod->arch.core_plt = s; in module_frob_arch_sections()
435 mod->arch.init_plt = s; in module_frob_arch_sections()
437 mod->arch.got = s; in module_frob_arch_sections()
439 mod->arch.opd = s; in module_frob_arch_sections()
441 mod->arch.unwind = s; in module_frob_arch_sections()
445 mod->arch.paravirt_bundles = s; in module_frob_arch_sections()
448 mod->arch.paravirt_insts = s; in module_frob_arch_sections()
451 if (!mod->arch.core_plt || !mod->arch.init_plt || !mod->arch.got || !mod->arch.opd) { in module_frob_arch_sections()
472 mod->arch.core_plt->sh_type = SHT_NOBITS; in module_frob_arch_sections()
473 mod->arch.core_plt->sh_flags = SHF_EXECINSTR | SHF_ALLOC; in module_frob_arch_sections()
474 mod->arch.core_plt->sh_addralign = 16; in module_frob_arch_sections()
475 mod->arch.core_plt->sh_size = core_plts * sizeof(struct plt_entry); in module_frob_arch_sections()
476 mod->arch.init_plt->sh_type = SHT_NOBITS; in module_frob_arch_sections()
477 mod->arch.init_plt->sh_flags = SHF_EXECINSTR | SHF_ALLOC; in module_frob_arch_sections()
478 mod->arch.init_plt->sh_addralign = 16; in module_frob_arch_sections()
479 mod->arch.init_plt->sh_size = init_plts * sizeof(struct plt_entry); in module_frob_arch_sections()
480 mod->arch.got->sh_type = SHT_NOBITS; in module_frob_arch_sections()
481 mod->arch.got->sh_flags = ARCH_SHF_SMALL | SHF_ALLOC; in module_frob_arch_sections()
482 mod->arch.got->sh_addralign = 8; in module_frob_arch_sections()
483 mod->arch.got->sh_size = gots * sizeof(struct got_entry); in module_frob_arch_sections()
484 mod->arch.opd->sh_type = SHT_NOBITS; in module_frob_arch_sections()
485 mod->arch.opd->sh_flags = SHF_ALLOC; in module_frob_arch_sections()
486 mod->arch.opd->sh_addralign = 8; in module_frob_arch_sections()
487 mod->arch.opd->sh_size = fdescs * sizeof(struct fdesc); in module_frob_arch_sections()
489 __func__, mod->arch.core_plt->sh_size, mod->arch.init_plt->sh_size, in module_frob_arch_sections()
490 mod->arch.got->sh_size, mod->arch.opd->sh_size); in module_frob_arch_sections()
523 got = (void *) mod->arch.got->sh_addr; in get_ltoff()
524 for (e = got; e < got + mod->arch.next_got_entry; ++e) in get_ltoff()
529 BUG_ON(e >= (struct got_entry *) (mod->arch.got->sh_addr + mod->arch.got->sh_size)); in get_ltoff()
532 ++mod->arch.next_got_entry; in get_ltoff()
534 return (uint64_t) e - mod->arch.gp; in get_ltoff()
540 return value - mod->arch.gp + MAX_LTOFF/2 < MAX_LTOFF; in gp_addressable()
554 plt = (void *) mod->arch.init_plt->sh_addr; in get_plt()
555 plt_end = (void *) plt + mod->arch.init_plt->sh_size; in get_plt()
557 plt = (void *) mod->arch.core_plt->sh_addr; in get_plt()
558 plt_end = (void *) plt + mod->arch.core_plt->sh_size; in get_plt()
593 struct fdesc *fdesc = (void *) mod->arch.opd->sh_addr; in get_fdesc()
614 if ((uint64_t) ++fdesc >= mod->arch.opd->sh_addr + mod->arch.opd->sh_size) in get_fdesc()
620 fdesc->gp = mod->arch.gp; in get_fdesc()
640 case RV_GPREL: val -= mod->arch.gp; break; in do_reloc()
724 val -= mod->arch.gp; in do_reloc()
815 if (!mod->arch.gp) { in apply_relocate_add()
830 mod->arch.gp = gp; in apply_relocate_add()
855 struct unw_table_entry *start = (void *) mod->arch.unwind->sh_addr; in register_unwind_table()
856 struct unw_table_entry *end = start + mod->arch.unwind->sh_size / sizeof (*start); in register_unwind_table()
892 mod->name, mod->arch.gp, num_init, num_core); in register_unwind_table()
898 mod->arch.core_unw_table = unw_add_unwind_table(mod->name, 0, mod->arch.gp, in register_unwind_table()
901 mod->arch.core_unw_table, core, core + num_core); in register_unwind_table()
904 mod->arch.init_unw_table = unw_add_unwind_table(mod->name, 0, mod->arch.gp, in register_unwind_table()
907 mod->arch.init_unw_table, init, init + num_init); in register_unwind_table()
915 if (mod->arch.unwind) in module_finalize()
918 if (mod->arch.paravirt_bundles) { in module_finalize()
921 mod->arch.paravirt_bundles->sh_addr; in module_finalize()
924 (mod->arch.paravirt_bundles->sh_addr + in module_finalize()
925 mod->arch.paravirt_bundles->sh_size); in module_finalize()
929 if (mod->arch.paravirt_insts) { in module_finalize()
932 mod->arch.paravirt_insts->sh_addr; in module_finalize()
935 (mod->arch.paravirt_insts->sh_addr + in module_finalize()
936 mod->arch.paravirt_insts->sh_size); in module_finalize()
947 if (mod->arch.init_unw_table) in module_arch_cleanup()
948 unw_remove_unwind_table(mod->arch.init_unw_table); in module_arch_cleanup()
949 if (mod->arch.core_unw_table) in module_arch_cleanup()
950 unw_remove_unwind_table(mod->arch.core_unw_table); in module_arch_cleanup()