struct module
247 {
248 enum module_state state;
249
250 /* Member of list of modules */
251 struct list_head list;
252
253 /* Unique handle for this module */
254 char name[MODULE_NAME_LEN];
255
256 /* Sysfs stuff. */
257 struct module_kobject mkobj;
258 struct module_param_attrs *param_attrs;
259 struct module_attribute *modinfo_attrs;
260 const char *version;
261 const char *srcversion;
262
263 /* Exported symbols */
264 const struct kernel_symbol *syms;
265 unsigned int num_syms;
266 const unsigned long *crcs; 267
268 /* GPL-only exported symbols. */
269 const struct kernel_symbol *gpl_syms;
270 unsigned int num_gpl_syms;
271 const unsigned long *gpl_crcs;
272
273 /* unused exported symbols. */
274 const struct kernel_symbol *unused_syms;
275 unsigned int num_unused_syms;
276 const unsigned long *unused_crcs;
277 /* GPL-only, unused exported symbols. */
278 const struct kernel_symbol *unused_gpl_syms;
279 unsigned int num_unused_gpl_syms;
280 const unsigned long *unused_gpl_crcs;
281
282 /* symbols that will be GPL-only in the near future. */
283 const struct kernel_symbol *gpl_future_syms;
284 unsigned int num_gpl_future_syms;
285 const unsigned long *gpl_future_crcs;
286
287 /* Exception table */
288 unsigned int num_exentries;
289 const struct exception_table_entry *extable;
290
291 /* Startup function. */
292 int (*init)(void);
293
294 /* If this is non-NULL, vfree after init() returns */
295 void *module_init;
296
297 /* Here is the actual code + data, vfree'd on unload. */
298 void *module_core;
299
300 /* Here are the sizes of the init and core sections */
301 unsigned long init_size, core_size;
302
303 /* The size of the executable code in each section. */
304 unsigned long init_text_size, core_text_size;
305
306 /* The handle returned from unwind_add_table. */
307 void *unwind_info;
308
309 /* Arch-specific module values */
310 struct mod_arch_specific arch;
311
312 /* Am I unsafe to unload? */
313 int unsafe;
314
315 /* Am I GPL-compatible */
316 int license_gplok;
317
318 #ifdef CONFIG_MODULE_UNLOAD
319 /* Reference counts */
320 struct module_ref ref[NR_CPUS];
321
322 /* What modules depend on me? */
323 struct list_head modules_which_use_me;
324
325 /* Who is waiting for us to be unloaded */
326 struct task_struct *waiter;
327
328 /* Destruction function. */
329 void (*exit)(void);
330 #endif
331
332 #ifdef CONFIG_KALLSYMS
333 /* We keep the symbol and string tables for kallsyms. */
334 Elf_Sym *symtab;
335 unsigned long num_symtab;
336 char *strtab;
337
338 /* Section attributes */
339 struct module_sect_attrs *sect_attrs;
340 #endif
341
342 /* Per-cpu data. */
343 void *percpu;
344
345 /* The command line arguments (may be mangled). People like
346 keeping pointers to this stuff */
347 char *args;
348 };
247 {
248 enum module_state state;
249
250 /* Member of list of modules */
251 struct list_head list;
252
253 /* Unique handle for this module */
254 char name[MODULE_NAME_LEN];
255
256 /* Sysfs stuff. */
257 struct module_kobject mkobj;
258 struct module_param_attrs *param_attrs;
259 struct module_attribute *modinfo_attrs;
260 const char *version;
261 const char *srcversion;
262
263 /* Exported symbols */
264 const struct kernel_symbol *syms;
265 unsigned int num_syms;
266 const unsigned long *crcs; 267
268 /* GPL-only exported symbols. */
269 const struct kernel_symbol *gpl_syms;
270 unsigned int num_gpl_syms;
271 const unsigned long *gpl_crcs;
272
273 /* unused exported symbols. */
274 const struct kernel_symbol *unused_syms;
275 unsigned int num_unused_syms;
276 const unsigned long *unused_crcs;
277 /* GPL-only, unused exported symbols. */
278 const struct kernel_symbol *unused_gpl_syms;
279 unsigned int num_unused_gpl_syms;
280 const unsigned long *unused_gpl_crcs;
281
282 /* symbols that will be GPL-only in the near future. */
283 const struct kernel_symbol *gpl_future_syms;
284 unsigned int num_gpl_future_syms;
285 const unsigned long *gpl_future_crcs;
286
287 /* Exception table */
288 unsigned int num_exentries;
289 const struct exception_table_entry *extable;
290
291 /* Startup function. */
292 int (*init)(void);
293
294 /* If this is non-NULL, vfree after init() returns */
295 void *module_init;
296
297 /* Here is the actual code + data, vfree'd on unload. */
298 void *module_core;
299
300 /* Here are the sizes of the init and core sections */
301 unsigned long init_size, core_size;
302
303 /* The size of the executable code in each section. */
304 unsigned long init_text_size, core_text_size;
305
306 /* The handle returned from unwind_add_table. */
307 void *unwind_info;
308
309 /* Arch-specific module values */
310 struct mod_arch_specific arch;
311
312 /* Am I unsafe to unload? */
313 int unsafe;
314
315 /* Am I GPL-compatible */
316 int license_gplok;
317
318 #ifdef CONFIG_MODULE_UNLOAD
319 /* Reference counts */
320 struct module_ref ref[NR_CPUS];
321
322 /* What modules depend on me? */
323 struct list_head modules_which_use_me;
324
325 /* Who is waiting for us to be unloaded */
326 struct task_struct *waiter;
327
328 /* Destruction function. */
329 void (*exit)(void);
330 #endif
331
332 #ifdef CONFIG_KALLSYMS
333 /* We keep the symbol and string tables for kallsyms. */
334 Elf_Sym *symtab;
335 unsigned long num_symtab;
336 char *strtab;
337
338 /* Section attributes */
339 struct module_sect_attrs *sect_attrs;
340 #endif
341
342 /* Per-cpu data. */
343 void *percpu;
344
345 /* The command line arguments (may be mangled). People like
346 keeping pointers to this stuff */
347 char *args;
348 };