diff options
author | Daniel Müller <deso@posteo.net> | 2022-06-28 16:01:19 +0000 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-07-05 20:26:18 -0700 |
commit | 633e7ceb2cbbae9b2f5ca69106b0de65728c5988 (patch) | |
tree | 47cfcd9c4be1697a22fedf2ca36b1b03718de0cc /tools/lib/bpf | |
parent | 3c660a5d86f4c01cf641bfea004a49f5860a5bed (diff) | |
download | linux-633e7ceb2cbbae9b2f5ca69106b0de65728c5988.tar.bz2 |
bpftool: Honor BPF_CORE_TYPE_MATCHES relocation
bpftool needs to know about the newly introduced BPF_CORE_TYPE_MATCHES
relocation for its 'gen min_core_btf' command to work properly in the
present of this relocation.
Specifically, we need to make sure to mark types and fields so that they
are present in the minimized BTF for "type match" checks to work out.
However, contrary to the existing btfgen_record_field_relo, we need to
rely on the BTF -- and not the spec -- to find fields. With this change
we handle this new variant correctly. The functionality will be tested
with follow on changes to BPF selftests, which already run against a
minimized BTF created with bpftool.
Signed-off-by: Daniel Müller <deso@posteo.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20220628160127.607834-3-deso@posteo.net
Diffstat (limited to 'tools/lib/bpf')
0 files changed, 0 insertions, 0 deletions