testmod/doit.sh: add .kpatch.checksum to test module

This commit is contained in:
Jessica Yu 2014-09-09 03:36:00 -07:00
parent 0c9a54645c
commit 8f06a11962
1 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,9 @@ make || exit 1
cd ../../kmod/patch || exit 1
make clean || exit 1
cp ../../test/testmod/output.o . || exit 1
md5sum output.o | awk '{printf "%s\0", $1}' > checksum.tmp || exit 1
objcopy --add-section .kpatch.checksum=checksum.tmp --set-section-flags .kpatch.checksum=alloc,load,contents,readonly output.o || exit 1
rm -f checksum.tmp
KBUILD_EXTRA_SYMBOLS="$(readlink -e ../../kmod/core/Module.symvers)" make || exit 1
cd ../../test/testmod