mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-03 07:09:06 +08:00
libbpf: Add generic BTF type shallow copy API
Add btf__add_type() API that performs shallow copy of a given BTF type from the source BTF into the destination BTF. All the information and type IDs are preserved, but all the strings encountered are added into the destination BTF and corresponding offsets are rewritten. BTF type IDs are assumed to be correct or such that will be (somehow) modified afterwards. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210318194036.3521577-6-andrii@kernel.org
This commit is contained in:
committed by
Andrii Nakryiko
parent
861ad35ceb
commit
4fdc36418d
@@ -354,4 +354,5 @@ LIBBPF_0.3.0 {
|
||||
LIBBPF_0.4.0 {
|
||||
global:
|
||||
btf__add_float;
|
||||
btf__add_type;
|
||||
} LIBBPF_0.3.0;
|
||||
|
||||
Reference in New Issue
Block a user