]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpftool: Add support for custom BTF path in prog load/loadall
authorJiayuan Chen <jiayuan.chen@linux.dev>
Fri, 16 May 2025 14:47:02 +0000 (22:47 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 27 May 2025 17:31:20 +0000 (10:31 -0700)
commit1ae7a84ed85317b12a3395470f0cfcc900b2a61a
treefa66b2c3432e424c9fed17c17eddc38ef458c829
parent92de53d247dffdf29d2abecf7deb4760dde98d6c
bpftool: Add support for custom BTF path in prog load/loadall

This patch exposes the btf_custom_path feature to bpftool, allowing users
to specify a custom BTF file when loading BPF programs using prog load or
prog loadall commands.

The argument 'btf_custom_path' in libbpf is used for those kernels that
don't have CONFIG_DEBUG_INFO_BTF enabled but still want to perform CO-RE
relocations.

Suggested-by: Quentin Monnet <qmo@kernel.org>
Reviewed-by: Quentin Monnet <qmo@kernel.org>
Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Link: https://lore.kernel.org/r/20250516144708.298652-1-jiayuan.chen@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/Documentation/bpftool-prog.rst
tools/bpf/bpftool/bash-completion/bpftool
tools/bpf/bpftool/prog.c