Libbpf userspace function btf__relocate
Will check the split BTF btf
for references to base BTF kinds, and verify those references are compatible with base_btf
; if they are, btf
is adjusted such that is re-parented to base_btf
and type ids and strings are adjusted to accommodate this.
Definition
int btf__relocate(struct btf *btf, const struct btf *base_btf);
Parameters
btf
: pointer to astruct btf
objectbase_btf
: pointer to astruct btf
object
Return
If successful, 0 is returned and btf
now has base_btf
as its base.
A negative value is returned on error and the thread-local errno
variable is set to the error code as well.
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