Lines Matching refs:me
84 me->name, strtab + sym->st_name, (unsigned long)val, bits); \
101 static inline int in_init(struct module *me, void *loc) in in_init() argument
103 return (loc >= me->module_init && in in_init()
104 loc <= (me->module_init + me->init_size)); in in_init()
107 static inline int in_core(struct module *me, void *loc) in in_core() argument
109 return (loc >= me->module_core && in in_core()
110 loc <= (me->module_core + me->core_size)); in in_core()
113 static inline int in_local(struct module *me, void *loc) in in_local() argument
115 return in_init(me, loc) || in_core(me, loc); in in_local()
321 struct module *me) in module_frob_arch_sections() argument
326 len = hdr->e_shnum * sizeof(me->arch.section[0]); in module_frob_arch_sections()
327 me->arch.section = kzalloc(len, GFP_KERNEL); in module_frob_arch_sections()
328 if (!me->arch.section) in module_frob_arch_sections()
338 me->arch.unwind_section = i; in module_frob_arch_sections()
363 WARN_ON(me->arch.section[s].stub_entries); in module_frob_arch_sections()
366 me->arch.section[s].stub_entries += count; in module_frob_arch_sections()
370 me->core_size = ALIGN(me->core_size, 16); in module_frob_arch_sections()
371 me->arch.got_offset = me->core_size; in module_frob_arch_sections()
372 me->core_size += gots * sizeof(struct got_entry); in module_frob_arch_sections()
374 me->core_size = ALIGN(me->core_size, 16); in module_frob_arch_sections()
375 me->arch.fdesc_offset = me->core_size; in module_frob_arch_sections()
376 me->core_size += fdescs * sizeof(Elf_Fdesc); in module_frob_arch_sections()
378 me->arch.got_max = gots; in module_frob_arch_sections()
379 me->arch.fdesc_max = fdescs; in module_frob_arch_sections()
385 static Elf64_Word get_got(struct module *me, unsigned long value, long addend) in get_got() argument
394 got = me->module_core + me->arch.got_offset; in get_got()
399 BUG_ON(++me->arch.got_count > me->arch.got_max); in get_got()
410 static Elf_Addr get_fdesc(struct module *me, unsigned long value) in get_fdesc() argument
412 Elf_Fdesc *fdesc = me->module_core + me->arch.fdesc_offset; in get_fdesc()
415 printk(KERN_ERR "%s: zero OPD requested!\n", me->name); in get_fdesc()
426 BUG_ON(++me->arch.fdesc_count > me->arch.fdesc_max); in get_fdesc()
430 fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset; in get_fdesc()
441 static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, in get_stub() argument
448 if (!me->arch.section[targetsec].stub_offset) { in get_stub()
449 loc0 -= (me->arch.section[targetsec].stub_entries + 1) * in get_stub()
453 me->arch.section[targetsec].stub_offset = loc0; in get_stub()
457 stub = (void *) me->arch.section[targetsec].stub_offset; in get_stub()
458 me->arch.section[targetsec].stub_offset += sizeof(struct stub_entry); in get_stub()
461 BUG_ON(0 == me->arch.section[targetsec].stub_entries--); in get_stub()
499 d = get_got(me, value, addend); in get_stub()
542 struct module *me) in apply_relocate_add() argument
569 me->name, strtab + sym->st_name); in apply_relocate_add()
641 val = get_stub(me, sym->st_value, addend, in apply_relocate_add()
656 val = get_stub(me, sym->st_value, addend, in apply_relocate_add()
666 me->name, ELF32_R_TYPE(rel[i].r_info)); in apply_relocate_add()
679 struct module *me) in apply_relocate_add() argument
705 me->name, strtab + sym->st_name); in apply_relocate_add()
733 val = get_got(me, val, addend); in apply_relocate_add()
743 val = get_got(me, val, addend); in apply_relocate_add()
757 if (in_local(me, (void *)val)) { in apply_relocate_add()
766 val = get_stub(me, sym->st_value, in apply_relocate_add()
778 val = get_stub(me, val, addend, ELF_STUB_MILLI, in apply_relocate_add()
781 val = get_stub(me, val, addend, ELF_STUB_GOT, in apply_relocate_add()
804 if(in_local(me, (void *)(val + addend))) { in apply_relocate_add()
805 *loc64 = get_fdesc(me, val+addend); in apply_relocate_add()
822 me->name, ELF64_R_TYPE(rel[i].r_info)); in apply_relocate_add()
831 register_unwind_table(struct module *me, in register_unwind_table() argument
837 if (!me->arch.unwind_section) in register_unwind_table()
840 table = (unsigned char *)sechdrs[me->arch.unwind_section].sh_addr; in register_unwind_table()
841 end = table + sechdrs[me->arch.unwind_section].sh_size; in register_unwind_table()
842 gp = (Elf_Addr)me->module_core + me->arch.got_offset; in register_unwind_table()
845 me->arch.unwind_section, table, end, gp); in register_unwind_table()
846 me->arch.unwind = unwind_table_add(me->name, 0, gp, table, end); in register_unwind_table()
850 deregister_unwind_table(struct module *me) in deregister_unwind_table() argument
852 if (me->arch.unwind) in deregister_unwind_table()
853 unwind_table_remove(me->arch.unwind); in deregister_unwind_table()
858 struct module *me) in module_finalize() argument
869 entry = (Elf_Fdesc *)me->init; in module_finalize()
877 me->arch.got_count, me->arch.got_max, in module_finalize()
878 me->arch.fdesc_count, me->arch.fdesc_max); in module_finalize()
881 register_unwind_table(me, sechdrs); in module_finalize()
899 me->name, strtab, symhdr); in module_finalize()
901 if(me->arch.got_count > MAX_GOTS) { in module_finalize()
903 me->name, me->arch.got_count, MAX_GOTS); in module_finalize()
907 kfree(me->arch.section); in module_finalize()
908 me->arch.section = NULL; in module_finalize()