From: Patrick McHardy Date: Fri, 24 Mar 2006 06:07:34 +0000 (-0800) Subject: [MODULES]: Don't allow statically declared exports X-Git-Tag: v2.6.17-rc1~738^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1a8feed1743ec8d2af1dafa7c5321679f0a3e4f;p=linux-2.6 [MODULES]: Don't allow statically declared exports Add an extern declaration for exported symbols to make the compiler warn on symbols declared statically. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/include/linux/module.h b/include/linux/module.h index 70bd843c71..d9569151c1 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -183,6 +183,7 @@ void *__symbol_get_gpl(const char *symbol); /* For every exported symbol, place a struct in the __ksymtab section */ #define __EXPORT_SYMBOL(sym, sec) \ + extern typeof(sym) sym; \ __CRC_SYMBOL(sym, sec) \ static const char __kstrtab_##sym[] \ __attribute__((section("__ksymtab_strings"))) \