]> git.baikalelectronics.ru Git - kernel.git/commit
btf: expose API to work with raw btf_ext data
authorAndrii Nakryiko <andriin@fb.com>
Fri, 8 Feb 2019 19:19:38 +0000 (11:19 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 8 Feb 2019 20:04:13 +0000 (12:04 -0800)
commit2b35ee05f3b14af3d46f0aeaf8f9a7b98aa74465
treead5082a6f997ab16fadfbea5fb31f457d04e7eda
parent861efd03480d0b93094664e1bc7e2d15c5cf383a
btf: expose API to work with raw btf_ext data

This patch changes struct btf_ext to retain original data in sequential
block of memory, which makes it possible to expose
btf_ext__get_raw_data() interface similar to btf__get_raw_data(), allowing
users of libbpf to get access to raw representation of .BTF.ext section.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/btf.c
tools/lib/bpf/btf.h
tools/lib/bpf/libbpf.map