Libbpf userspace function btf__parse_elf
Parse BTF from an ELF file.
Definition
struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext);
Parameters
path
: path to the ELF file containing BTF databtf_ext
: double pointer, will be populated with BTF extension data if present
Return
Return a pointer to a struct btf
object on success, or NULL
on failure. The caller is responsible for freeing the returned object with btf__free
.
If btf_ext
is not NULL
, it will be populated with a pointer to a struct btf_ext
object on success, or NULL
on failure. The caller is responsible for freeing the returned object with btf_ext__free
.
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome