mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible
Make the ksymtab symbols for EXPORT_SYMBOL visible. This prevents the LTO compiler from adding a .NUMBER prefix, which avoids various problems in later export processing. Cc: rusty@rustcorp.com.au Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
eb3057df73
commit
e0f244c63f
2 changed files with 3 additions and 3 deletions
|
@ -43,7 +43,7 @@ extern struct module __this_module;
|
|||
/* Mark the CRC weak since genksyms apparently decides not to
|
||||
* generate a checksums for some symbols */
|
||||
#define __CRC_SYMBOL(sym, sec) \
|
||||
extern void *__crc_##sym __attribute__((weak)); \
|
||||
extern __visible void *__crc_##sym __attribute__((weak)); \
|
||||
static const unsigned long __kcrctab_##sym \
|
||||
__used \
|
||||
__attribute__((section("___kcrctab" sec "+" #sym), unused)) \
|
||||
|
@ -59,7 +59,7 @@ extern struct module __this_module;
|
|||
static const char __kstrtab_##sym[] \
|
||||
__attribute__((section("__ksymtab_strings"), aligned(1))) \
|
||||
= VMLINUX_SYMBOL_STR(sym); \
|
||||
static const struct kernel_symbol __ksymtab_##sym \
|
||||
__visible const struct kernel_symbol __ksymtab_##sym \
|
||||
__used \
|
||||
__attribute__((section("___ksymtab" sec "+" #sym), unused)) \
|
||||
= { (unsigned long)&sym, __kstrtab_##sym }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue