UPSTREAM: 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 <samitolvanen@google.com>
Tested-by: Steve Muckle <smuckle@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit ff139766764675b9df12bcbc8928a02149b7ba95)
Bug: 235776933
Change-Id: I1152458cbc6ea5488a48516f92eef54f2c314860
Signed-off-by: Steve Muckle <smuckle@google.com>
(cherry picked from commit 5b6fcb222235c26fa1fe13ebb7f1545267a1d027)
This commit is contained in:
Sami Tolvanen
2022-06-16 19:57:59 +00:00
committed by Ramji Jiyani
parent 69ebf9d1df
commit 2a2b87673e

View File

@@ -61,4 +61,7 @@ EOT
# point addresses. # point addresses.
sed -e 's/^\.//' | sed -e 's/^\.//' |
sort -u | 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" sed -e 's/\(.*\)/#define __KSYM_\1 1/' >> "$output_file"