Skip to content

Commit

Permalink
kbuild: handle old pahole more gracefully when generating BTF
Browse files Browse the repository at this point in the history
When CONFIG_DEBUG_INFO_BTF is enabled but available version of pahole is too
old to support BTF generation, build script is supposed to emit warning and
proceed with the build. Due to using exit instead of return from BASH function,
existing handling code prematurely exits exit code 0, not completing some of
the build steps. This patch fixes issue by correctly returning just from
gen_btf() function only.

Fixes: e83b9f5 ("kbuild: add ability to generate BTF type info for vmlinux")
Cc: Masahiro Yamada <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Cc: Yonghong Song <[email protected]>
Cc: Martin KaFai Lau <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Song Liu <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
  • Loading branch information
anakryiko authored and borkmann committed Apr 16, 2019
1 parent c342dc1 commit 68e5ab1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/link-vmlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ gen_btf()
pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/')
if [ "${pahole_ver}" -lt "113" ]; then
info "BTF" "${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.13"
exit 0
return 0
fi

info "BTF" ${1}
Expand Down

0 comments on commit 68e5ab1

Please sign in to comment.