mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 15:04:27 +08:00
2d6c9810eb
Use pahole-version.sh to get pahole's version code to reduce the amount of duplication across the tree. Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20220201205624.652313-4-nathan@kernel.org
21 lines
502 B
Bash
Executable File
21 lines
502 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
extra_paholeopt=
|
|
|
|
if ! [ -x "$(command -v ${PAHOLE})" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
pahole_ver=$($(dirname $0)/pahole-version.sh ${PAHOLE})
|
|
|
|
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
|
|
|
|
echo ${extra_paholeopt}
|