mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-28 12:19:07 +08:00
libbpf: Expose BTF-to-C type declaration emitting API
Expose API that allows to emit type declaration and field/variable definition (if optional field name is specified) in valid C syntax for any provided BTF type. This is going to be used by bpftool when emitting data section layout as a struct. As part of making this API useful in a stand-alone fashion, move initialization of some of the internal btf_dump state to earlier phase. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20191214014341.3442258-8-andriin@fb.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
600ba1c5e1
commit
5ec0ba6530
@@ -211,6 +211,7 @@ LIBBPF_0.0.6 {
|
||||
|
||||
LIBBPF_0.0.7 {
|
||||
global:
|
||||
btf_dump__emit_type_decl;
|
||||
bpf_program__attach;
|
||||
btf__align_of;
|
||||
} LIBBPF_0.0.6;
|
||||
|
||||
Reference in New Issue
Block a user