Commit 6cd25474 authored by Kai Germaschewski's avatar Kai Germaschewski

EXPORT_SYMBOL: Remove the option of implicitly exporting symbols

We now always allocate the section __ksymtab, which to modutils means
not to implicitly export any symbols.

That means that EXPORT_NO_SYMBOLS is now default, and thus can go away
in the sources.
parent d0f0cde1
......@@ -349,13 +349,6 @@ extern struct module *module_list;
/* We want the EXPORT_SYMBOL tag left intact for recognition. */
#elif !defined(AUTOCONF_INCLUDED)
#define __EXPORT_SYMBOL(sym,str) error config_must_be_included_before_module
#define EXPORT_SYMBOL(var) error config_must_be_included_before_module
#define EXPORT_SYMBOL_NOVERS(var) error config_must_be_included_before_module
#define EXPORT_SYMBOL_GPL(var) error config_must_be_included_before_module
#elif !defined(CONFIG_MODULES)
#define __EXPORT_SYMBOL(sym,str)
......@@ -370,8 +363,6 @@ extern struct module *module_list;
#define EXPORT_SYMBOL_NOVERS(var) error this_object_must_be_defined_as_export_objs_in_the_Makefile
#define EXPORT_SYMBOL_GPL(var) error this_object_must_be_defined_as_export_objs_in_the_Makefile
__asm__(".section __ksymtab,\"a\"\n.previous");
#else
#define __EXPORT_SYMBOL(sym, str) \
......@@ -400,12 +391,23 @@ __attribute__((section("__ksymtab"))) = \
#endif /* __GENKSYMS__ */
#ifdef MODULE
/* Force a module to export no symbols. */
#define EXPORT_NO_SYMBOLS __asm__(".section __ksymtab\n.previous")
#else
/*
* Force a module to export no symbols.
* EXPORT_NO_SYMBOLS is default now, leave the define around for sources
* which still have it
*/
#define EXPORT_NO_SYMBOLS
#endif /* MODULE */
#ifdef CONFIG_MODULES
/*
* Always allocate a section "__ksymtab". If we encounter EXPORT_SYMBOL,
* the exported symbol will be added to it.
* If it remains empty, that tells modutils that we do not want to
* export any symbols (as opposed to it not being present, which means
* "export all symbols" to modutils)
*/
__asm__(".section __ksymtab,\"a\"\n.previous");
#endif
#ifdef CONFIG_MODULES
#define SET_MODULE_OWNER(some_struct) do { (some_struct)->owner = THIS_MODULE; } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment