conditions: preserve the type in select assignments
[smatch.git] / smatch_scripts / gen_paholes.sh
blobfb62a838076b3af302721a91d1e68a5af4f0a0ca
1 #!/bin/bash
3 bin_dir=$(dirname $0)
4 remove=$(echo ${bin_dir}/../smatch_data/kernel.paholes.remove)
5 tmp=$(mktemp /tmp/smatch.XXXX)
7 for i in $(find -name \*.ko) ; do
8 pahole -E $i 2> /dev/null
9 done | $bin_dir/find_expanded_holes.pl | sort -u > $tmp
11 pahole -E vmlinux | $bin_dir/find_expanded_holes.pl | sort -u >> $tmp
13 sort -u $tmp > kernel.paholes
14 mv kernel.paholes $tmp
16 echo "// list of functions and the argument they free." > kernel.paholes
17 echo '// generated by `gen_paholes.sh`' >> kernel.paholes
19 cat $tmp $remove $remove 2> /dev/null | sort | uniq -u >> kernel.paholes
21 rm $tmp
22 echo "Generated kernel.paholes"