summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/libbpf_internal.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2020-12-03 12:46:23 -0800
committerAlexei Starovoitov <ast@kernel.org>2020-12-03 17:38:20 -0800
commita19f93cfafdf85851c69bc9f677aa4f40c53610f (patch)
tree08c46ad0d0f0a2f5ec14b0257d475edc6f719d6c /tools/lib/bpf/libbpf_internal.h
parent2fe8890848c799515a881502339a0a7b2b555988 (diff)
downloadlwn-a19f93cfafdf85851c69bc9f677aa4f40c53610f.tar.gz
lwn-a19f93cfafdf85851c69bc9f677aa4f40c53610f.zip
libbpf: Add internal helper to load BTF data by FD
Add a btf_get_from_fd() helper, which constructs struct btf from in-kernel BTF data by FD. This is used for loading module BTFs. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20201203204634.1325171-4-andrii@kernel.org
Diffstat (limited to 'tools/lib/bpf/libbpf_internal.h')
-rw-r--r--tools/lib/bpf/libbpf_internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/libbpf_internal.h
index d99bc847bf84..e569ae63808e 100644
--- a/tools/lib/bpf/libbpf_internal.h
+++ b/tools/lib/bpf/libbpf_internal.h
@@ -155,6 +155,7 @@ int bpf_object__section_size(const struct bpf_object *obj, const char *name,
__u32 *size);
int bpf_object__variable_offset(const struct bpf_object *obj, const char *name,
__u32 *off);
+struct btf *btf_get_from_fd(int btf_fd, struct btf *base_btf);
struct btf_ext_info {
/*