BPF List
 help / color / mirror / Atom feed
From: Alastair Robertson <ajor@meta.com>
To: <bpf@vger.kernel.org>, <andrii@kernel.org>
Cc: Alastair Robertson <ajor@meta.com>
Subject: [PATCH bpf-next v3 0/2] libbpf: Extend linker API to support in-memory ELF files
Date: Wed, 11 Dec 2024 08:40:28 -0800	[thread overview]
Message-ID: <20241211164030.573042-1-ajor@meta.com> (raw)

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(-)

-- 
2.43.5


             reply	other threads:[~2024-12-11 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11 16:40 Alastair Robertson [this message]
2024-12-11 16:40 ` [PATCH bpf-next v3 1/2] libbpf: Pull file-opening logic up to top-level functions Alastair Robertson
2024-12-12 23:29   ` Andrii Nakryiko
2024-12-11 16:40 ` [PATCH bpf-next v3 2/2] libbpf: Extend linker API to support in-memory ELF files Alastair Robertson
2024-12-12 23:29   ` Andrii Nakryiko
2024-12-12 23:30 ` [PATCH bpf-next v3 0/2] " patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241211164030.573042-1-ajor@meta.com \
    --to=ajor@meta.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox