mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-03 23:29:06 +08:00
selftests/bpf: Test BTF writing APIs
Add selftests for BTF writer APIs. 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/20200929020533.711288-4-andriin@fb.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
6f90197ab0
commit
f007a6bfdf
@@ -31,10 +31,10 @@ struct btf {
|
|||||||
__u32 raw_size;
|
__u32 raw_size;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When BTF is loaded from ELF or raw memory it is stored
|
* When BTF is loaded from an ELF or raw memory it is stored
|
||||||
* in contiguous memory block, pointed to by raw_data pointer, and
|
* in a contiguous memory block. The hdr, type_data, and, strs_data
|
||||||
* hdr, types_data, and strs_data point inside that memory region to
|
* point inside that memory region to their respective parts of BTF
|
||||||
* respective parts of BTF representation:
|
* representation:
|
||||||
*
|
*
|
||||||
* +--------------------------------+
|
* +--------------------------------+
|
||||||
* | Header | Types | Strings |
|
* | Header | Types | Strings |
|
||||||
|
|||||||
Reference in New Issue
Block a user