Libbpf userspace function bpf_linker__new
Create a new struct bpf_linker
object from a file.
Definition
struct bpf_linker *bpf_linker__new(const char *filename, struct bpf_linker_opts *opts);
Parameters
filename
: The name of the first file to load the BPF object from. Onbpf_linker__finalize
, the linker will write the linked ELF file to this path.opts
: A pointer to astruct bpf_linker_opts
object that contains options for the linker.
struct bpf_linker_opts
struct bpf_linker_opts {
/* size of this struct, for forward/backward compatibility */
size_t sz;
};
Usage
This function creates a new BPF linker. The linker is used to link statically link multiple BPF objects together into a single ELF file.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome