From: Sami Tolvanen Date: Thu, 16 Jun 2022 19:57:59 +0000 (+0000) Subject: kbuild: Ignore __this_module in gen_autoksyms.sh X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ff139766764675b9df12bcbc8928a02149b7ba95;p=linux.git kbuild: Ignore __this_module in gen_autoksyms.sh Module object files can contain an undefined reference to __this_module, which isn't resolved until we link the final .ko. The kernel doesn't export this symbol, so ignore it in gen_autoksyms.sh. Signed-off-by: Sami Tolvanen Tested-by: Steve Muckle Reviewed-by: Nick Desaulniers Tested-by: Ramji Jiyani --- diff --git a/scripts/gen_autoksyms.sh b/scripts/gen_autoksyms.sh index faacf70621221..653fadbad302f 100755 --- a/scripts/gen_autoksyms.sh +++ b/scripts/gen_autoksyms.sh @@ -56,4 +56,7 @@ EOT # point addresses. sed -e 's/^\.//' | sort -u | +# Ignore __this_module. It's not an exported symbol, and will be resolved +# when the final .ko's are linked. +grep -v '^__this_module$' | sed -e 's/\(.*\)/#define __KSYM_\1 1/' >> "$output_file"