mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 23:34:05 +08:00
[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 <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4dc6d9cc38
commit
a1a8feed17
@ -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"))) \
|
||||
|
Loading…
Reference in New Issue
Block a user