]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Add btf__new_empty() to create an empty BTF object
authorAndrii Nakryiko <andriin@fb.com>
Sat, 26 Sep 2020 01:13:54 +0000 (18:13 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 29 Sep 2020 00:27:32 +0000 (17:27 -0700)
commit5e42fe6b753a33b4bcf553da9beab21138350b59
treefca80aa038de4a1ff389b3f1e3edc1138f10b4b5
parent48f5acfc0172c8fbdb4239998aff8010bd3c6020
libbpf: Add btf__new_empty() to create an empty BTF object

Add an ability to create an empty BTF object from scratch. This is going to be
used by pahole for BTF encoding. And also by selftest for convenient creation
of BTF objects.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200926011357.2366158-7-andriin@fb.com
tools/lib/bpf/btf.c
tools/lib/bpf/btf.h
tools/lib/bpf/libbpf.map