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()
443 if (!mod->arch.core_plt || !mod->arch.init_plt || !mod->arch.got || !mod->arch.opd) { in module_frob_arch_sections()
464 mod->arch.core_plt->sh_type = SHT_NOBITS; in module_frob_arch_sections()
465 mod->arch.core_plt->sh_flags = SHF_EXECINSTR | SHF_ALLOC; in module_frob_arch_sections()
466 mod->arch.core_plt->sh_addralign = 16; in module_frob_arch_sections()
467 mod->arch.core_plt->sh_size = core_plts * sizeof(struct plt_entry); in module_frob_arch_sections()
468 mod->arch.init_plt->sh_type = SHT_NOBITS; in module_frob_arch_sections()
469 mod->arch.init_plt->sh_flags = SHF_EXECINSTR | SHF_ALLOC; in module_frob_arch_sections()
470 mod->arch.init_plt->sh_addralign = 16; in module_frob_arch_sections()
471 mod->arch.init_plt->sh_size = init_plts * sizeof(struct plt_entry); in module_frob_arch_sections()
472 mod->arch.got->sh_type = SHT_NOBITS; in module_frob_arch_sections()
473 mod->arch.got->sh_flags = ARCH_SHF_SMALL | SHF_ALLOC; in module_frob_arch_sections()
474 mod->arch.got->sh_addralign = 8; in module_frob_arch_sections()
475 mod->arch.got->sh_size = gots * sizeof(struct got_entry); in module_frob_arch_sections()
476 mod->arch.opd->sh_type = SHT_NOBITS; in module_frob_arch_sections()
477 mod->arch.opd->sh_flags = SHF_ALLOC; in module_frob_arch_sections()
478 mod->arch.opd->sh_addralign = 8; in module_frob_arch_sections()
479 mod->arch.opd->sh_size = fdescs * sizeof(struct fdesc); in module_frob_arch_sections()
481 __func__, mod->arch.core_plt->sh_size, mod->arch.init_plt->sh_size, in module_frob_arch_sections()
482 mod->arch.got->sh_size, mod->arch.opd->sh_size); in module_frob_arch_sections()
515 got = (void *) mod->arch.got->sh_addr; in get_ltoff()
516 for (e = got; e < got + mod->arch.next_got_entry; ++e) in get_ltoff()
521 BUG_ON(e >= (struct got_entry *) (mod->arch.got->sh_addr + mod->arch.got->sh_size)); in get_ltoff()
524 ++mod->arch.next_got_entry; in get_ltoff()
526 return (uint64_t) e - mod->arch.gp; in get_ltoff()
532 return value - mod->arch.gp + MAX_LTOFF/2 < MAX_LTOFF; in gp_addressable()
546 plt = (void *) mod->arch.init_plt->sh_addr; in get_plt()
547 plt_end = (void *) plt + mod->arch.init_plt->sh_size; in get_plt()
549 plt = (void *) mod->arch.core_plt->sh_addr; in get_plt()
550 plt_end = (void *) plt + mod->arch.core_plt->sh_size; in get_plt()
585 struct fdesc *fdesc = (void *) mod->arch.opd->sh_addr; in get_fdesc()
606 if ((uint64_t) ++fdesc >= mod->arch.opd->sh_addr + mod->arch.opd->sh_size) in get_fdesc()
612 fdesc->gp = mod->arch.gp; in get_fdesc()
632 case RV_GPREL: val -= mod->arch.gp; break; in do_reloc()
716 val -= mod->arch.gp; in do_reloc()
807 if (!mod->arch.gp) { in apply_relocate_add()
822 mod->arch.gp = gp; in apply_relocate_add()
847 struct unw_table_entry *start = (void *) mod->arch.unwind->sh_addr; in register_unwind_table()
848 struct unw_table_entry *end = start + mod->arch.unwind->sh_size / sizeof (*start); in register_unwind_table()
884 mod->name, mod->arch.gp, num_init, num_core); in register_unwind_table()
890 mod->arch.core_unw_table = unw_add_unwind_table(mod->name, 0, mod->arch.gp, in register_unwind_table()
893 mod->arch.core_unw_table, core, core + num_core); in register_unwind_table()
896 mod->arch.init_unw_table = unw_add_unwind_table(mod->name, 0, mod->arch.gp, in register_unwind_table()
899 mod->arch.init_unw_table, init, init + num_init); in register_unwind_table()
907 if (mod->arch.unwind) in module_finalize()
915 if (mod->arch.init_unw_table) in module_arch_cleanup()
916 unw_remove_unwind_table(mod->arch.init_unw_table); in module_arch_cleanup()
917 if (mod->arch.core_unw_table) in module_arch_cleanup()
918 unw_remove_unwind_table(mod->arch.core_unw_table); in module_arch_cleanup()