aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/module.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h35
1 files changed, 25 insertions, 10 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index eaec13ddd667..9e9dc7c24d95 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -6,7 +6,6 @@
6 * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 6 * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996
7 * Rewritten again by Rusty Russell, 2002 7 * Rewritten again by Rusty Russell, 2002
8 */ 8 */
9#include <linux/config.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
11#include <linux/spinlock.h> 10#include <linux/spinlock.h>
12#include <linux/list.h> 11#include <linux/list.h>
@@ -106,6 +105,8 @@ extern struct module __this_module;
106 * "GPL and additional rights" [GNU Public License v2 rights and more] 105 * "GPL and additional rights" [GNU Public License v2 rights and more]
107 * "Dual BSD/GPL" [GNU Public License v2 106 * "Dual BSD/GPL" [GNU Public License v2
108 * or BSD license choice] 107 * or BSD license choice]
108 * "Dual MIT/GPL" [GNU Public License v2
109 * or MIT license choice]
109 * "Dual MPL/GPL" [GNU Public License v2 110 * "Dual MPL/GPL" [GNU Public License v2
110 * or Mozilla license choice] 111 * or Mozilla license choice]
111 * 112 *
@@ -202,6 +203,15 @@ void *__symbol_get_gpl(const char *symbol);
202#define EXPORT_SYMBOL_GPL_FUTURE(sym) \ 203#define EXPORT_SYMBOL_GPL_FUTURE(sym) \
203 __EXPORT_SYMBOL(sym, "_gpl_future") 204 __EXPORT_SYMBOL(sym, "_gpl_future")
204 205
206
207#ifdef CONFIG_UNUSED_SYMBOLS
208#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused")
209#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl")
210#else
211#define EXPORT_UNUSED_SYMBOL(sym)
212#define EXPORT_UNUSED_SYMBOL_GPL(sym)
213#endif
214
205#endif 215#endif
206 216
207struct module_ref 217struct module_ref
@@ -260,6 +270,15 @@ struct module
260 unsigned int num_gpl_syms; 270 unsigned int num_gpl_syms;
261 const unsigned long *gpl_crcs; 271 const unsigned long *gpl_crcs;
262 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
263 /* symbols that will be GPL-only in the near future. */ 282 /* symbols that will be GPL-only in the near future. */
264 const struct kernel_symbol *gpl_future_syms; 283 const struct kernel_symbol *gpl_future_syms;
265 unsigned int num_gpl_future_syms; 284 unsigned int num_gpl_future_syms;
@@ -284,6 +303,9 @@ struct module
284 /* The size of the executable code in each section. */ 303 /* The size of the executable code in each section. */
285 unsigned long init_text_size, core_text_size; 304 unsigned long init_text_size, core_text_size;
286 305
306 /* The handle returned from unwind_add_table. */
307 void *unwind_info;
308
287 /* Arch-specific module values */ 309 /* Arch-specific module values */
288 struct mod_arch_specific arch; 310 struct mod_arch_specific arch;
289 311
@@ -452,6 +474,8 @@ void module_remove_driver(struct device_driver *);
452#define EXPORT_SYMBOL(sym) 474#define EXPORT_SYMBOL(sym)
453#define EXPORT_SYMBOL_GPL(sym) 475#define EXPORT_SYMBOL_GPL(sym)
454#define EXPORT_SYMBOL_GPL_FUTURE(sym) 476#define EXPORT_SYMBOL_GPL_FUTURE(sym)
477#define EXPORT_UNUSED_SYMBOL(sym)
478#define EXPORT_UNUSED_SYMBOL_GPL(sym)
455 479
456/* Given an address, look for it in the exception tables. */ 480/* Given an address, look for it in the exception tables. */
457static inline const struct exception_table_entry * 481static inline const struct exception_table_entry *
@@ -557,13 +581,4 @@ static inline void module_remove_driver(struct device_driver *driver)
557 581
558#define __MODULE_STRING(x) __stringify(x) 582#define __MODULE_STRING(x) __stringify(x)
559 583
560/* Use symbol_get and symbol_put instead. You'll thank me. */
561#define HAVE_INTER_MODULE
562extern void __deprecated inter_module_register(const char *,
563 struct module *, const void *);
564extern void __deprecated inter_module_unregister(const char *);
565extern const void * __deprecated inter_module_get_request(const char *,
566 const char *);
567extern void __deprecated inter_module_put(const char *);
568
569#endif /* _LINUX_MODULE_H */ 584#endif /* _LINUX_MODULE_H */