Lines Matching full:me
29 * if (in_init(me, (void *)val))
30 * val -= (uint32_t)me->mem[MOD_INIT_TEXT].base;
32 * val -= (uint32_t)me->mem[MOD_TEXT].base;
63 me->name, strtab + sym->st_name, (unsigned long)val, bits); \
270 struct module *me) in module_frob_arch_sections() argument
276 len = hdr->e_shnum * sizeof(me->arch.section[0]); in module_frob_arch_sections()
277 me->arch.section = kzalloc(len, GFP_KERNEL); in module_frob_arch_sections()
278 if (!me->arch.section) in module_frob_arch_sections()
288 me->arch.unwind_section = i; in module_frob_arch_sections()
313 WARN_ON(me->arch.section[s].stub_entries); in module_frob_arch_sections()
316 me->arch.section[s].stub_entries += count; in module_frob_arch_sections()
319 mod_mem = &me->mem[MOD_TEXT]; in module_frob_arch_sections()
322 me->arch.got_offset = mod_mem->size; in module_frob_arch_sections()
326 me->arch.fdesc_offset = mod_mem->size; in module_frob_arch_sections()
329 me->arch.got_max = gots; in module_frob_arch_sections()
330 me->arch.fdesc_max = fdescs; in module_frob_arch_sections()
336 static Elf64_Word get_got(struct module *me, unsigned long value, long addend) in get_got() argument
345 got = me->mem[MOD_TEXT].base + me->arch.got_offset; in get_got()
350 BUG_ON(++me->arch.got_count > me->arch.got_max); in get_got()
361 static Elf_Addr get_fdesc(struct module *me, unsigned long value) in get_fdesc() argument
363 Elf_Fdesc *fdesc = me->mem[MOD_TEXT].base + me->arch.fdesc_offset; in get_fdesc()
366 printk(KERN_ERR "%s: zero OPD requested!\n", me->name); in get_fdesc()
377 BUG_ON(++me->arch.fdesc_count > me->arch.fdesc_max); in get_fdesc()
381 fdesc->gp = (Elf_Addr)me->mem[MOD_TEXT].base + me->arch.got_offset; in get_fdesc()
392 static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, in get_stub() argument
399 if (!me->arch.section[targetsec].stub_offset) { in get_stub()
400 loc0 -= (me->arch.section[targetsec].stub_entries + 1) * in get_stub()
404 me->arch.section[targetsec].stub_offset = loc0; in get_stub()
408 stub = (void *) me->arch.section[targetsec].stub_offset; in get_stub()
409 me->arch.section[targetsec].stub_offset += sizeof(struct stub_entry); in get_stub()
412 BUG_ON(0 == me->arch.section[targetsec].stub_entries--); in get_stub()
450 d = get_got(me, value, addend); in get_stub()
493 struct module *me) in apply_relocate_add() argument
520 me->name, strtab + sym->st_name); in apply_relocate_add()
596 val = get_stub(me, sym->st_value, addend, in apply_relocate_add()
611 val = get_stub(me, sym->st_value, addend, in apply_relocate_add()
625 me->name, ELF32_R_TYPE(rel[i].r_info)); in apply_relocate_add()
638 struct module *me) in apply_relocate_add() argument
664 me->name, strtab + sym->st_name); in apply_relocate_add()
692 val = get_got(me, val, addend); in apply_relocate_add()
702 val = get_got(me, val, addend); in apply_relocate_add()
716 if (within_module(val, me)) { in apply_relocate_add()
725 val = get_stub(me, sym->st_value, in apply_relocate_add()
737 val = get_stub(me, val, addend, ELF_STUB_MILLI, in apply_relocate_add()
740 val = get_stub(me, val, addend, ELF_STUB_GOT, in apply_relocate_add()
775 if (within_module(val + addend, me)) { in apply_relocate_add()
776 *loc64 = get_fdesc(me, val+addend); in apply_relocate_add()
793 me->name, ELF64_R_TYPE(rel[i].r_info)); in apply_relocate_add()
802 register_unwind_table(struct module *me, in register_unwind_table() argument
808 if (!me->arch.unwind_section) in register_unwind_table()
811 table = (unsigned char *)sechdrs[me->arch.unwind_section].sh_addr; in register_unwind_table()
812 end = table + sechdrs[me->arch.unwind_section].sh_size; in register_unwind_table()
813 gp = (Elf_Addr)me->mem[MOD_TEXT].base + me->arch.got_offset; in register_unwind_table()
816 me->arch.unwind_section, table, end, gp); in register_unwind_table()
817 me->arch.unwind = unwind_table_add(me->name, 0, gp, table, end); in register_unwind_table()
821 deregister_unwind_table(struct module *me) in deregister_unwind_table() argument
823 if (me->arch.unwind) in deregister_unwind_table()
824 unwind_table_remove(me->arch.unwind); in deregister_unwind_table()
829 struct module *me) in module_finalize() argument
843 entry = (Elf_Fdesc *)me->init; in module_finalize()
851 me->arch.got_count, me->arch.got_max, in module_finalize()
852 me->arch.fdesc_count, me->arch.fdesc_max); in module_finalize()
855 register_unwind_table(me, sechdrs); in module_finalize()
857 /* haven't filled in me->symtab yet, so have to find it in module_finalize()
874 me->name, strtab, symhdr); in module_finalize()
876 if(me->arch.got_count > MAX_GOTS) { in module_finalize()
878 me->name, me->arch.got_count, MAX_GOTS); in module_finalize()
882 kfree(me->arch.section); in module_finalize()
883 me->arch.section = NULL; in module_finalize()
918 apply_alternatives(aseg, aseg + s->sh_size, me->name); in module_finalize()
930 s - sechdrs, me); in module_finalize()
934 s - sechdrs, me); in module_finalize()