Libbpf userspace function btf__add_type_tag
Append new BTF_KIND_TYPE_TAG
type to BTF object.
Definition
int btf__add_type_tag(struct btf *btf, const char *value, int ref_type_id);
Parameters
btf
: pointer to astruct btf
objectvalue
: tag value, can't beNULL
or empty;ref_type_id
: referenced type ID, it might not exist yet;
Return
>0
, type ID of newly added BTF type; <0
, on error.
Usage
Set info->kflag
to 1
, indicating this tag is an __attribute__
.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome