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()
327 struct module *me) in module_frob_arch_sections() argument
332 len = hdr->e_shnum * sizeof(me->arch.section[0]); in module_frob_arch_sections()
333 me->arch.section = kzalloc(len, GFP_KERNEL); in module_frob_arch_sections()
334 if (!me->arch.section) in module_frob_arch_sections()
344 me->arch.unwind_section = i; in module_frob_arch_sections()
369 WARN_ON(me->arch.section[s].stub_entries); in module_frob_arch_sections()
372 me->arch.section[s].stub_entries += count; in module_frob_arch_sections()
376 me->core_size = ALIGN(me->core_size, 16); in module_frob_arch_sections()
377 me->arch.got_offset = me->core_size; in module_frob_arch_sections()
378 me->core_size += gots * sizeof(struct got_entry); in module_frob_arch_sections()
380 me->core_size = ALIGN(me->core_size, 16); in module_frob_arch_sections()
381 me->arch.fdesc_offset = me->core_size; in module_frob_arch_sections()
382 me->core_size += fdescs * sizeof(Elf_Fdesc); in module_frob_arch_sections()
384 me->arch.got_max = gots; in module_frob_arch_sections()
385 me->arch.fdesc_max = fdescs; in module_frob_arch_sections()
391 static Elf64_Word get_got(struct module *me, unsigned long value, long addend) in get_got() argument
400 got = me->module_core + me->arch.got_offset; in get_got()
405 BUG_ON(++me->arch.got_count > me->arch.got_max); in get_got()
416 static Elf_Addr get_fdesc(struct module *me, unsigned long value) in get_fdesc() argument
418 Elf_Fdesc *fdesc = me->module_core + me->arch.fdesc_offset; in get_fdesc()
421 printk(KERN_ERR "%s: zero OPD requested!\n", me->name); in get_fdesc()
432 BUG_ON(++me->arch.fdesc_count > me->arch.fdesc_max); in get_fdesc()
436 fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset; in get_fdesc()
447 static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, in get_stub() argument
454 if (!me->arch.section[targetsec].stub_offset) { in get_stub()
455 loc0 -= (me->arch.section[targetsec].stub_entries + 1) * in get_stub()
459 me->arch.section[targetsec].stub_offset = loc0; in get_stub()
463 stub = (void *) me->arch.section[targetsec].stub_offset; in get_stub()
464 me->arch.section[targetsec].stub_offset += sizeof(struct stub_entry); in get_stub()
467 BUG_ON(0 == me->arch.section[targetsec].stub_entries--); in get_stub()
505 d = get_got(me, value, addend); in get_stub()
548 struct module *me) in apply_relocate_add() argument
575 me->name, strtab + sym->st_name); in apply_relocate_add()
647 val = get_stub(me, sym->st_value, addend, in apply_relocate_add()
662 val = get_stub(me, sym->st_value, addend, in apply_relocate_add()
672 me->name, ELF32_R_TYPE(rel[i].r_info)); in apply_relocate_add()
685 struct module *me) in apply_relocate_add() argument
711 me->name, strtab + sym->st_name); in apply_relocate_add()
739 val = get_got(me, val, addend); in apply_relocate_add()
749 val = get_got(me, val, addend); in apply_relocate_add()
763 if (in_local(me, (void *)val)) { in apply_relocate_add()
772 val = get_stub(me, sym->st_value, in apply_relocate_add()
784 val = get_stub(me, val, addend, ELF_STUB_MILLI, in apply_relocate_add()
787 val = get_stub(me, val, addend, ELF_STUB_GOT, in apply_relocate_add()
810 if(in_local(me, (void *)(val + addend))) { in apply_relocate_add()
811 *loc64 = get_fdesc(me, val+addend); in apply_relocate_add()
828 me->name, ELF64_R_TYPE(rel[i].r_info)); in apply_relocate_add()
837 register_unwind_table(struct module *me, in register_unwind_table() argument
843 if (!me->arch.unwind_section) in register_unwind_table()
846 table = (unsigned char *)sechdrs[me->arch.unwind_section].sh_addr; in register_unwind_table()
847 end = table + sechdrs[me->arch.unwind_section].sh_size; in register_unwind_table()
848 gp = (Elf_Addr)me->module_core + me->arch.got_offset; in register_unwind_table()
851 me->arch.unwind_section, table, end, gp); in register_unwind_table()
852 me->arch.unwind = unwind_table_add(me->name, 0, gp, table, end); in register_unwind_table()
856 deregister_unwind_table(struct module *me) in deregister_unwind_table() argument
858 if (me->arch.unwind) in deregister_unwind_table()
859 unwind_table_remove(me->arch.unwind); in deregister_unwind_table()
864 struct module *me) in module_finalize() argument
875 entry = (Elf_Fdesc *)me->init; in module_finalize()
883 me->arch.got_count, me->arch.got_max, in module_finalize()
884 me->arch.fdesc_count, me->arch.fdesc_max); in module_finalize()
887 register_unwind_table(me, sechdrs); in module_finalize()
905 me->name, strtab, symhdr); in module_finalize()
907 if(me->arch.got_count > MAX_GOTS) { in module_finalize()
909 me->name, me->arch.got_count, MAX_GOTS); in module_finalize()
913 kfree(me->arch.section); in module_finalize()
914 me->arch.section = NULL; in module_finalize()