mbox series

[bpf-next,v3,0/2] libbpf: Extend linker API to support in-memory ELF files

Message ID 20241211164030.573042-1-ajor@meta.com (mailing list archive)
Headers show
Series libbpf: Extend linker API to support in-memory ELF files | expand

Message

Alastair Robertson Dec. 11, 2024, 4:40 p.m. UTC
This gives API consumers the option of using anonymous files/memfds to
avoid writing temporary ELFs to disk, which will be useful for performing
linking as part of bpftrace's JIT compilation.

v3:
- Removed "filename" option. Now always generate our own filename for
  passed-in FDs and buffers.
- Use a common function (bpf_linker_add_file) for shared
  implementation of bpf_linker__add_file, bpf_linker__add_fd and
  bpf_linker__add_buf.

Alastair Robertson (2):
  libbpf: Pull file-opening logic up to top-level functions
  libbpf: Extend linker API to support in-memory ELF files

 tools/lib/bpf/libbpf.h   |   5 +
 tools/lib/bpf/libbpf.map |   4 +
 tools/lib/bpf/linker.c   | 228 ++++++++++++++++++++++++++++++---------
 3 files changed, 184 insertions(+), 53 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 12, 2024, 11:30 p.m. UTC | #1
Hello:

This series was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Wed, 11 Dec 2024 08:40:28 -0800 you wrote:
> This gives API consumers the option of using anonymous files/memfds to
> avoid writing temporary ELFs to disk, which will be useful for performing
> linking as part of bpftrace's JIT compilation.
> 
> v3:
> - Removed "filename" option. Now always generate our own filename for
>   passed-in FDs and buffers.
> - Use a common function (bpf_linker_add_file) for shared
>   implementation of bpf_linker__add_file, bpf_linker__add_fd and
>   bpf_linker__add_buf.
> 
> [...]

Here is the summary with links:
  - [bpf-next,v3,1/2] libbpf: Pull file-opening logic up to top-level functions
    https://git.kernel.org/bpf/bpf-next/c/b641712925bf
  - [bpf-next,v3,2/2] libbpf: Extend linker API to support in-memory ELF files
    https://git.kernel.org/bpf/bpf-next/c/6d5e5e5d7ce1

You are awesome, thank you!