• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4extra_paholeopt=
5
6if ! [ -x "$(command -v ${PAHOLE})" ]; then
7	exit 0
8fi
9
10pahole_ver=$($(dirname $0)/pahole-version.sh ${PAHOLE})
11
12if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then
13	# pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars
14	extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_vars"
15fi
16if [ "${pahole_ver}" -ge "121" ]; then
17	extra_paholeopt="${extra_paholeopt} --btf_gen_floats"
18fi
19
20if [ "${pahole_ver}" -ge "124" ]; then
21	extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64"
22fi
23if [ "${pahole_ver}" -ge "125" ]; then
24	extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_inconsistent_proto --btf_gen_optimized"
25fi
26
27echo ${extra_paholeopt}
28