summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorQuentin Perret <qperret@google.com>2021-02-03 17:19:30 +0300
committerMarc Zyngier <maz@kernel.org>2021-02-03 19:42:57 +0300
commit54effa653246c35997f5e990e0134be5be09f9d1 (patch)
treeeedb4eb10c0c6eb4ea4a029bf7dcc3b577a9b9cc /include/asm-generic
parent87b26801f02ca9d7a110eb598dae8cd5d3bcace2 (diff)
downloadlinux-54effa653246c35997f5e990e0134be5be09f9d1.tar.xz
asm-generic: export: Stub EXPORT_SYMBOL with __DISABLE_EXPORTS
It is currently possible to stub EXPORT_SYMBOL() macros in C code using __DISABLE_EXPORTS, which is necessary to run in constrained environments such as the EFI stub or the decompressor. But this currently doesn't apply to exports from assembly, which can lead to somewhat confusing situations. Consolidate the __DISABLE_EXPORTS infrastructure by checking it from asm-generic/export.h as well. Signed-off-by: Quentin Perret <qperret@google.com> Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210203141931.615898-2-qperret@google.com
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/export.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h
index 365345f9a9e3..07a36a874dca 100644
--- a/include/asm-generic/export.h
+++ b/include/asm-generic/export.h
@@ -33,7 +33,7 @@
*/
.macro ___EXPORT_SYMBOL name,val,sec
-#ifdef CONFIG_MODULES
+#if defined(CONFIG_MODULES) && !defined(__DISABLE_EXPORTS)
.section ___ksymtab\sec+\name,"a"
.balign KSYM_ALIGN
__ksymtab_\name: