summaryrefslogtreecommitdiff
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2025-02-21 15:02:56 +0100
committerIngo Molnar <mingo@kernel.org>2025-02-21 15:02:56 +0100
commitaffe678f355738db56361d124757c38c09401341 (patch)
treeb3583e474859a83c42b0c469c3a20342e0f51423 /include/linux/module.h
parent675204778c69c2b3e0f6a4e2dbfeb4f3e89194ba (diff)
parent0ad2507d5d93f39619fc42372c347d6006b64319 (diff)
Merge tag 'v6.14-rc3' into x86/mm, to pick up fixes before merging new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index a76928c93692..9937e71a3b5b 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -306,7 +306,10 @@ extern int modules_disabled; /* for sysctl */
/* Get/put a kernel symbol (calls must be symmetric) */
void *__symbol_get(const char *symbol);
void *__symbol_get_gpl(const char *symbol);
-#define symbol_get(x) ((typeof(&x))(__symbol_get(__stringify(x))))
+#define symbol_get(x) ({ \
+ static const char __notrim[] \
+ __used __section(".no_trim_symbol") = __stringify(x); \
+ (typeof(&x))(__symbol_get(__stringify(x))); })
/* modules using other modules: kdb wants to see this. */
struct module_use {