diff options
Diffstat (limited to 'include/linux/module.h')
-rw-r--r-- | include/linux/module.h | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 3e03b1acbc94..fce15ebd0e1c 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -249,27 +249,30 @@ struct module | |||
249 | 249 | ||
250 | /* Exported symbols */ | 250 | /* Exported symbols */ |
251 | const struct kernel_symbol *syms; | 251 | const struct kernel_symbol *syms; |
252 | unsigned int num_syms; | ||
253 | const unsigned long *crcs; | 252 | const unsigned long *crcs; |
253 | unsigned int num_syms; | ||
254 | 254 | ||
255 | /* GPL-only exported symbols. */ | 255 | /* GPL-only exported symbols. */ |
256 | const struct kernel_symbol *gpl_syms; | ||
257 | unsigned int num_gpl_syms; | 256 | unsigned int num_gpl_syms; |
257 | const struct kernel_symbol *gpl_syms; | ||
258 | const unsigned long *gpl_crcs; | 258 | const unsigned long *gpl_crcs; |
259 | 259 | ||
260 | #ifdef CONFIG_UNUSED_SYMBOLS | ||
260 | /* unused exported symbols. */ | 261 | /* unused exported symbols. */ |
261 | const struct kernel_symbol *unused_syms; | 262 | const struct kernel_symbol *unused_syms; |
262 | unsigned int num_unused_syms; | ||
263 | const unsigned long *unused_crcs; | 263 | const unsigned long *unused_crcs; |
264 | unsigned int num_unused_syms; | ||
265 | |||
264 | /* GPL-only, unused exported symbols. */ | 266 | /* GPL-only, unused exported symbols. */ |
265 | const struct kernel_symbol *unused_gpl_syms; | ||
266 | unsigned int num_unused_gpl_syms; | 267 | unsigned int num_unused_gpl_syms; |
268 | const struct kernel_symbol *unused_gpl_syms; | ||
267 | const unsigned long *unused_gpl_crcs; | 269 | const unsigned long *unused_gpl_crcs; |
270 | #endif | ||
268 | 271 | ||
269 | /* symbols that will be GPL-only in the near future. */ | 272 | /* symbols that will be GPL-only in the near future. */ |
270 | const struct kernel_symbol *gpl_future_syms; | 273 | const struct kernel_symbol *gpl_future_syms; |
271 | unsigned int num_gpl_future_syms; | ||
272 | const unsigned long *gpl_future_crcs; | 274 | const unsigned long *gpl_future_crcs; |
275 | unsigned int num_gpl_future_syms; | ||
273 | 276 | ||
274 | /* Exception table */ | 277 | /* Exception table */ |
275 | unsigned int num_exentries; | 278 | unsigned int num_exentries; |
@@ -285,10 +288,10 @@ struct module | |||
285 | void *module_core; | 288 | void *module_core; |
286 | 289 | ||
287 | /* Here are the sizes of the init and core sections */ | 290 | /* Here are the sizes of the init and core sections */ |
288 | unsigned long init_size, core_size; | 291 | unsigned int init_size, core_size; |
289 | 292 | ||
290 | /* The size of the executable code in each section. */ | 293 | /* The size of the executable code in each section. */ |
291 | unsigned long init_text_size, core_text_size; | 294 | unsigned int init_text_size, core_text_size; |
292 | 295 | ||
293 | /* The handle returned from unwind_add_table. */ | 296 | /* The handle returned from unwind_add_table. */ |
294 | void *unwind_info; | 297 | void *unwind_info; |
@@ -300,29 +303,15 @@ struct module | |||
300 | 303 | ||
301 | #ifdef CONFIG_GENERIC_BUG | 304 | #ifdef CONFIG_GENERIC_BUG |
302 | /* Support for BUG */ | 305 | /* Support for BUG */ |
306 | unsigned num_bugs; | ||
303 | struct list_head bug_list; | 307 | struct list_head bug_list; |
304 | struct bug_entry *bug_table; | 308 | struct bug_entry *bug_table; |
305 | unsigned num_bugs; | ||
306 | #endif | ||
307 | |||
308 | #ifdef CONFIG_MODULE_UNLOAD | ||
309 | /* Reference counts */ | ||
310 | struct module_ref ref[NR_CPUS]; | ||
311 | |||
312 | /* What modules depend on me? */ | ||
313 | struct list_head modules_which_use_me; | ||
314 | |||
315 | /* Who is waiting for us to be unloaded */ | ||
316 | struct task_struct *waiter; | ||
317 | |||
318 | /* Destruction function. */ | ||
319 | void (*exit)(void); | ||
320 | #endif | 309 | #endif |
321 | 310 | ||
322 | #ifdef CONFIG_KALLSYMS | 311 | #ifdef CONFIG_KALLSYMS |
323 | /* We keep the symbol and string tables for kallsyms. */ | 312 | /* We keep the symbol and string tables for kallsyms. */ |
324 | Elf_Sym *symtab; | 313 | Elf_Sym *symtab; |
325 | unsigned long num_symtab; | 314 | unsigned int num_symtab; |
326 | char *strtab; | 315 | char *strtab; |
327 | 316 | ||
328 | /* Section attributes */ | 317 | /* Section attributes */ |
@@ -342,6 +331,21 @@ struct module | |||
342 | struct marker *markers; | 331 | struct marker *markers; |
343 | unsigned int num_markers; | 332 | unsigned int num_markers; |
344 | #endif | 333 | #endif |
334 | |||
335 | #ifdef CONFIG_MODULE_UNLOAD | ||
336 | /* What modules depend on me? */ | ||
337 | struct list_head modules_which_use_me; | ||
338 | |||
339 | /* Who is waiting for us to be unloaded */ | ||
340 | struct task_struct *waiter; | ||
341 | |||
342 | /* Destruction function. */ | ||
343 | void (*exit)(void); | ||
344 | |||
345 | /* Reference counts */ | ||
346 | struct module_ref ref[NR_CPUS]; | ||
347 | #endif | ||
348 | |||
345 | }; | 349 | }; |
346 | #ifndef MODULE_ARCH_INIT | 350 | #ifndef MODULE_ARCH_INIT |
347 | #define MODULE_ARCH_INIT {} | 351 | #define MODULE_ARCH_INIT {} |