[patch] 2.4.11-pre2 for EXPORT_SYMBOL_GPL()

Keith Owens (kaos@ocs.com.au)
Thu, 04 Oct 2001 09:28:21 +1000


AC's original EXPORT_SYMBOL_GPL() was incorrect, it has been fixed in
2.4.10-ac but not in 2.4.11-pre. Patch against 2.4.11-pre2.

Index: 11-pre2.1/include/linux/module.h
--- 11-pre2.1/include/linux/module.h Tue, 02 Oct 2001 11:04:33 +1000 kaos (linux-2.4/c/b/46_module.h 1.1.1.1.2.4 644)
+++ 10.30/include/linux/module.h Tue, 02 Oct 2001 11:25:49 +1000 kaos (linux-2.4/c/b/46_module.h 1.1.1.1.1.6 644)
@@ -366,10 +366,10 @@ __attribute__((section("__ksymtab"))) =

#define __EXPORT_SYMBOL_GPL(sym, str) \
const char __kstrtab_##sym[] \
-__attribute__((section(".kstrtab"))) = str; \
-const struct module_symbol __ksymtab_GPLONLY_##sym \
+__attribute__((section(".kstrtab"))) = "GPLONLY_" str; \
+const struct module_symbol __ksymtab_##sym \
__attribute__((section("__ksymtab"))) = \
-{ (unsigned long)&sym, __kstrtab_GPLONLY_##sym }
+{ (unsigned long)&sym, __kstrtab_##sym }

#if defined(MODVERSIONS) || !defined(CONFIG_MODVERSIONS)
#define EXPORT_SYMBOL(var) __EXPORT_SYMBOL(var, __MODULE_STRING(var))

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/