mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
bpf: btf: Add BTF support to libbpf
If the ".BTF" elf section exists, libbpf will try to create a btf_fd (through BPF_BTF_LOAD). If that fails, it will still continue loading the bpf prog/map without the BTF. If the bpf_object has a BTF loaded, it will create a map with the btf_fd. libbpf will try to figure out the btf_key_id and btf_value_id of a map by finding the BTF type with name "<map_name>_key" and "<map_name>_value". If they cannot be found, it will continue without using the BTF. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Alexei Starovoitov <ast@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
3bd86a8409
commit
8a138aed4a
7 changed files with 627 additions and 32 deletions
|
@ -1 +1 @@
|
|||
libbpf-y := libbpf.o bpf.o nlattr.o
|
||||
libbpf-y := libbpf.o bpf.o nlattr.o btf.o
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue