From: Patrick McHardy Date: Fri, 24 Mar 2006 06:07:34 +0000 (-0800) Subject: [MODULES]: Don't allow statically declared exports X-Git-Tag: firefly_0821_release~37161^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a1a8feed1743ec8d2af1dafa7c5321679f0a3e4f;p=firefly-linux-kernel-4.4.55.git [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 70bd843c71cb..d9569151c182 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"))) \