linuxkm: use EXPORT_SYMBOL_NS(x, WOLFSSL) if available, else fall back to EXPORT_SYMBOL(x).

This commit is contained in:
Daniel Pouzzner
2020-10-21 14:37:43 -05:00
parent c910c94824
commit b468ea77ea
2 changed files with 6 additions and 2 deletions

View File

@ -83,9 +83,9 @@ $(src)/linuxkm/module_exports.c: $(src)/linuxkm/module_exports.c.template $(WOLF
awk '/^ *[0-9]+: / { \
if ($$8 !~ /^(wc_|wolf)/){next;} \
if (($$4 == "FUNC") && ($$5 == "GLOBAL") && ($$6 == "DEFAULT")) { \
print "EXPORT_SYMBOL(" $$8 ");"; \
print "EXPORT_SYMBOL_NS(" $$8 ", WOLFSSL);"; \
} \
}' >> $@
@echo -e '#ifndef NO_CRYPT_TEST\nEXPORT_SYMBOL(wolfcrypt_test);\n#endif' >> $@
@echo -e '#ifndef NO_CRYPT_TEST\nEXPORT_SYMBOL_NS(wolfcrypt_test, WOLFSSL);\n#endif' >> $@
clean-files := module_exports.c

View File

@ -33,6 +33,10 @@
#include <linux/delay.h>
#endif
#ifndef EXPORT_SYMBOL_NS
#define EXPORT_SYMBOL_NS(sym, ns) EXPORT_SYMBOL(sym)
#endif
#include <wolfssl/wolfcrypt/memory.h>
#include <wolfssl/wolfcrypt/wc_port.h>
#include <wolfssl/wolfcrypt/logging.h>