Libbpf userspace function bpf_linker__add_buf
Add a ELF file as memory buffer to the linker.
Definition
int bpf_linker__add_buf(struct bpf_linker *linker, void *buf, size_t buf_sz, const struct bpf_linker_file_opts *opts);
Parameters
linker
: pointer to astruct bpf_linker
objectbuf
: pointer to the ELF file bufferbuf_sz
: size of the ELF file bufferopts
: pointer to astruct bpf_linker_file_opts
object that contains options for the file
Return
0
, on success; On error negative error code, and errno
is set to the error code.
struct bpf_linker_file_opts
struct bpf_linker_file_opts {
/* size of this struct, for forward/backward compatibility */
size_t sz;
};
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