1 /* SPDX-License-Identifier: LGPL-2.1 */
2 /* Copyright (c) 2018 Facebook */
7 #include <linux/types.h>
9 #define BTF_ELF_SEC ".BTF"
14 typedef int (*btf_print_fn_t)(const char *, ...)
15 __attribute__((format(printf, 1, 2)));
17 void btf__free(struct btf *btf);
18 struct btf *btf__new(__u8 *data, __u32 size, btf_print_fn_t err_log);
19 __s32 btf__find_by_name(const struct btf *btf, const char *type_name);
20 const struct btf_type *btf__type_by_id(const struct btf *btf, __u32 id);
21 __s64 btf__resolve_size(const struct btf *btf, __u32 type_id);
22 int btf__fd(const struct btf *btf);