OSDN Git Service

tools: Allow specifying base BTF file in resolve_btfids
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Sat, 2 Oct 2021 01:17:52 +0000 (06:47 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 6 Oct 2021 00:07:41 +0000 (17:07 -0700)
commitf614f2c755b6125c646d680d1c990b3b262bd0a9
treec030b8dee4999c536216f7ac5fd968325b1fe823
parent14f267d95fe4b08831a022c8e15a2eb8991edbf6
tools: Allow specifying base BTF file in resolve_btfids

This commit allows specifying the base BTF for resolving btf id
lists/sets during link time in the resolve_btfids tool. The base BTF is
set to NULL if no path is passed. This allows resolving BTF ids for
module kernel objects.

Also, drop the --no-fail option, as it is only used in case .BTF_ids
section is not present, instead make no-fail the default mode. The long
option name is same as that of pahole.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211002011757.311265-5-memxor@gmail.com
tools/bpf/resolve_btfids/main.c
tools/testing/selftests/bpf/Makefile