Skip to content

Commit

Permalink
kbuild: Ignore __this_module in gen_autoksyms.sh
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Steve Muckle <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Tested-by: Ramji Jiyani <[email protected]>
  • Loading branch information
samitolvanen authored and masahir0y committed Jun 25, 2022
1 parent 53632ba commit ff13976
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/gen_autoksyms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit ff13976

Please sign in to comment.