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)
commit94a1fedd63edb672933bef44ca9213937e377c05
tree819907a5a52a2fd723e3995302aa002e6d9fcef4
parent041549b7b2c7811ec40e705c439211f00ade2dda
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