Lines Matching defs:module

2  * AVR32-specific kernel module loader
18 #include <linux/module.h>
22 void module_free(struct module *mod, void *module_region)
30 static inline int check_rela(Elf32_Rela *rela, struct module *module,
35 info = module->arch.syminfo + ELF32_R_SYM(rela->r_info);
51 info->got_offset = module->arch.got_size;
52 module->arch.got_size += sizeof(void *);
63 char *secstrings, struct module *module)
81 printk(KERN_ERR "module %s: no symbol table\n", module->name);
86 module->arch.nsyms = symtab->sh_size / sizeof(Elf_Sym);
87 module->arch.syminfo = vmalloc(module->arch.nsyms
89 if (!module->arch.syminfo)
94 for (i = 0; i < module->arch.nsyms; i++) {
100 module->arch.syminfo[i].got_offset = -1UL;
101 module->arch.syminfo[i].got_initialized = 0;
105 module->arch.got_size = 0;
112 ret = check_rela(rela + j, module,
123 module->core_size = ALIGN(module->core_size, 4);
124 module->arch.got_offset = module->core_size;
125 module->core_size += module->arch.got_size;
130 vfree(module->arch.syminfo);
131 module->arch.syminfo = NULL;
136 static inline int reloc_overflow(struct module *module, const char *reloc_name,
139 printk(KERN_ERR "module %s: Value %lx does not fit relocation %s\n",
140 module->name, (unsigned long)relocation, reloc_name);
149 struct module *module)
169 info = module->arch.syminfo + ELF32_R_SYM(rel->r_info);
182 gotent = (module->module_core
183 + module->arch.got_offset
202 return reloc_overflow(module,
218 return reloc_overflow(module,
231 return reloc_overflow(module,
242 return reloc_overflow(module,
259 relocation, module->arch.got_offset,
260 module->module_core);
261 relocation -= ((unsigned long)module->module_core
262 + module->arch.got_offset);
268 return reloc_overflow(module, "R_AVR32_GOT18SW",
275 return reloc_overflow(module, "R_AVR32_GOT16S",
286 printk(KERN_ERR "module %s: Unknown relocation: %u\n",
287 module->name, ELF32_R_TYPE(rel->r_info));
296 struct module *module)
298 vfree(module->arch.syminfo);
299 module->arch.syminfo = NULL;