Skip to content

Commit

Permalink
[MODULES]: Don't allow statically declared exports
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Mar 24, 2006
1 parent 4dc6d9c commit a1a8fee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"))) \
Expand Down

0 comments on commit a1a8fee

Please sign in to comment.