4 remove
=$
(echo ${bin_dir}/..
/smatch_data
/kernel.paholes.remove
)
5 tmp
=$
(mktemp
/tmp
/smatch.XXXX
)
7 if [ ! -e vmlinux
] ; then
8 echo "No vmlinux file. Not going to create kernel.paholes."
12 for i
in $
(find -name \
*.ko
) ; do
13 pahole
-E $i 2> /dev
/null
14 done |
$bin_dir/find_expanded_holes.pl |
sort -u > $tmp
16 pahole
-E vmlinux |
$bin_dir/find_expanded_holes.pl |
sort -u >> $tmp
18 sort -u $tmp > kernel.paholes
19 mv kernel.paholes
$tmp
21 echo "// list of functions and the argument they free." > kernel.paholes
22 echo '// generated by `gen_paholes.sh`' >> kernel.paholes
24 cat $tmp $remove $remove 2> /dev
/null |
sort |
uniq -u >> kernel.paholes
27 echo "Generated kernel.paholes"