OSDN Git Service

bpftool: Add support for BTF_KIND_TAG
authorYonghong Song <yhs@fb.com>
Tue, 14 Sep 2021 22:30:31 +0000 (15:30 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 15 Sep 2021 01:45:52 +0000 (18:45 -0700)
commit5c07f2fec00361fb5e8cff8ba7fdede7b29f38bd
tree8c9eadaf39802c7525770453312cb1ce3376d0b4
parent5b84bd10363e36ceb7c4c1ae749a3fc8adf8df45
bpftool: Add support for BTF_KIND_TAG

Added bpftool support to dump BTF_KIND_TAG information.
The new bpftool will be used in later patches to dump
btf in the test bpf program object file.

Currently, the tags are not emitted with
  bpftool btf dump file <path> format c
and they are silently ignored.  The tag information is
mostly used in the kernel for verification purpose and the kernel
uses its own btf to check. With adding these tags
to vmlinux.h, tags will be encoded in program's btf but
they will not be used by the kernel, at least for now.
So let us delay adding these tags to format C header files
until there is a real need.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210914223031.246951-1-yhs@fb.com
tools/bpf/bpftool/btf.c