Declare the symbol pointers as static, otherwise the compiler will add
them to the data section instead of bss.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/358
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
#define DLSYM_ARG(symbol__) &sym_##symbol__, STRINGIFY(symbol__),
/* For symbols being dynamically loaded */
-#define DECLARE_DLSYM(symbol) typeof(symbol) *sym_##symbol = NULL
+#define DECLARE_DLSYM(symbol) static typeof(symbol) *sym_##symbol = NULL
/* Pointer indirection to support linking directly */
-#define DECLARE_PTRSYM(symbol) typeof(symbol) *sym_##symbol = symbol
+#define DECLARE_PTRSYM(symbol) static typeof(symbol) *sym_##symbol = symbol
/*
* Helper defines, to be done locally before including this header to switch between