Skip to content

Commit

Permalink
kpatch-build: fix KBUILD_MODNAME for OOT modules
Browse files Browse the repository at this point in the history
For consistency with what the kernel does (and what we already do for
in-tree modules), if the file has any dashes ('-'), replace them with
underscores in the objname (aka KBUILD_MODNAME).

Fixes dynup#1286.

Signed-off-by: Josh Poimboeuf <[email protected]>
  • Loading branch information
jpoimboe committed Aug 5, 2022
1 parent 67e4e20 commit fe45029
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kpatch-build/kpatch-build
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,7 @@ for i in $FILES; do
SYMVERS_FILE="$BUILDDIR/Module.symvers"
elif [[ "$(basename "$KOBJFILE")" = "$(basename "$OOT_MODULE")" ]]; then
KOBJFILE_NAME="$(basename --suffix=.ko "$OOT_MODULE")"
KOBJFILE_NAME="${KOBJFILE_NAME//-/_}"
KOBJFILE_PATH="$OOT_MODULE"
SYMTAB="${TEMPDIR}/module/${KOBJFILE_NAME}.symtab"
SYMVERS_FILE="$TEMPDIR/Module.symvers"
Expand Down

0 comments on commit fe45029

Please sign in to comment.