2022-09-04 16:19:00 +03:00
|
|
|
#!/bin/sh
|
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
extra_paholeopt=
|
|
|
|
|
|
|
|
if ! [ -x "$(command -v ${PAHOLE})" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2022-02-01 23:56:22 +03:00
|
|
|
pahole_ver=$($(dirname $0)/pahole-version.sh ${PAHOLE})
|
2022-09-04 16:19:00 +03:00
|
|
|
|
|
|
|
if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then
|
|
|
|
# pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars
|
|
|
|
extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_vars"
|
|
|
|
fi
|
|
|
|
if [ "${pahole_ver}" -ge "121" ]; then
|
|
|
|
extra_paholeopt="${extra_paholeopt} --btf_gen_floats"
|
|
|
|
fi
|
|
|
|
|
2022-09-04 16:19:01 +03:00
|
|
|
if [ "${pahole_ver}" -ge "124" ]; then
|
|
|
|
extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64"
|
|
|
|
fi
|
2023-05-10 16:02:41 +03:00
|
|
|
if [ "${pahole_ver}" -ge "125" ]; then
|
|
|
|
extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_inconsistent_proto --btf_gen_optimized"
|
|
|
|
fi
|
2022-09-04 16:19:01 +03:00
|
|
|
|
2022-09-04 16:19:00 +03:00
|
|
|
echo ${extra_paholeopt}
|