mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-29 12:49:07 +08:00
libbpf: Extend linker API to support in-memory ELF files
The new_fd and add_fd functions correspond to the original new and add_file functions, but accept an FD instead of a file name. This gives API consumers the option of using anonymous files/memfds to avoid writing ELFs to disk. This new API will be useful for performing linking as part of bpftrace's JIT compilation. The add_buf function is a convenience wrapper that does the work of creating a memfd for the caller. Signed-off-by: Alastair Robertson <ajor@meta.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241211164030.573042-3-ajor@meta.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
f00fad0951
commit
d2f1f4490b
@@ -432,4 +432,8 @@ LIBBPF_1.5.0 {
|
||||
} LIBBPF_1.4.0;
|
||||
|
||||
LIBBPF_1.6.0 {
|
||||
global:
|
||||
bpf_linker__add_buf;
|
||||
bpf_linker__add_fd;
|
||||
bpf_linker__new_fd;
|
||||
} LIBBPF_1.5.0;
|
||||
|
||||
Reference in New Issue
Block a user