File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
drivers/firmware/efi/libstub Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 23
23
* _ctype[] in lib/ctype.c is needed by isspace() of linux/ctype.h.
24
24
* While both lib/ctype.c and lib/cmdline.c will bring EXPORT_SYMBOL
25
25
* which is meaningless and will cause compiling error in some cases.
26
- * So do not include linux/export.h and define EXPORT_SYMBOL(sym)
27
- * as empty.
28
26
*/
29
- #define _LINUX_EXPORT_H
30
- #define EXPORT_SYMBOL (sym )
27
+ #define __DISABLE_EXPORTS
31
28
32
29
#include "misc.h"
33
30
#include "error.h"
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ KBUILD_CFLAGS := $(cflags-y) -DDISABLE_BRANCH_PROFILING \
24
24
-D__NO_FORTIFY \
25
25
$(call cc-option,-ffreestanding) \
26
26
$(call cc-option,-fno-stack-protector) \
27
+ -D__DISABLE_EXPORTS
27
28
28
29
GCOV_PROFILE := n
29
30
KASAN_SANITIZE := n
Original file line number Diff line number Diff line change @@ -66,7 +66,16 @@ extern struct module __this_module;
66
66
__attribute__((section("___ksymtab" sec "+" #sym), used)) \
67
67
= { (unsigned long)&sym, __kstrtab_##sym }
68
68
69
- #if defined(__KSYM_DEPS__ )
69
+ #if defined(__DISABLE_EXPORTS )
70
+
71
+ /*
72
+ * Allow symbol exports to be disabled completely so that C code may
73
+ * be reused in other execution contexts such as the UEFI stub or the
74
+ * decompressor.
75
+ */
76
+ #define __EXPORT_SYMBOL (sym , sec )
77
+
78
+ #elif defined(__KSYM_DEPS__ )
70
79
71
80
/*
72
81
* For fine grained build dependencies, we want to tell the build system
You can’t perform that action at this time.
0 commit comments