]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Add btf__parse_raw() and generic btf__parse() APIs
authorAndrii Nakryiko <andriin@fb.com>
Sun, 2 Aug 2020 01:32:17 +0000 (18:32 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 3 Aug 2020 14:39:48 +0000 (16:39 +0200)
commitd1714140867abcf26e541551ebcd1bb9c39ff393
tree819907a5a52a2fd723e3995302aa002e6d9fcef4
parented186635e5a47e8031356f4db8324193b818874d
libbpf: Add btf__parse_raw() and generic btf__parse() APIs

Add public APIs to parse BTF from raw data file (e.g.,
/sys/kernel/btf/vmlinux), as well as generic btf__parse(), which will try to
determine correct format, currently either raw or ELF.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200802013219.864880-2-andriin@fb.com
tools/lib/bpf/btf.c
tools/lib/bpf/btf.h
tools/lib/bpf/libbpf.map