All of lore.kernel.org
 help / color / mirror / Atom feed
* Help with eBPF's use of ELF for developing an alternative to `bpftool`
@ 2026-12-03  0:19 Josh Marshall
  2026-12-03  1:15 ` Alexei Starovoitov
  0 siblings, 1 reply; 2+ messages in thread
From: Josh Marshall @ 2026-12-03  0:19 UTC (permalink / raw)
  To: bpf

Hello all,

I've been trying to make an alternative to `bpftool` because I
disagree with how it does a few things.  This has involved digging
through documentation and source files largely between the eBPF man
pages, Linux eBPF subsystem, libbpf, and bpftool.  I need help.  I
need help understanding what the actual ELF usage is.  I need help in
figuring out which syscalls get called on which binary blobs from ELF
files, and with what ordering of dependencies between those syscalls.
I need help in finding out the parts that I don't know that I don't
know.

My current code is at https://gitlab.com/anadon/abpf .  It does some
things which I think are good.  It uses C++ in ways which I think
simplify wrangling data.  It uses a compile-time regex with a
stand-alone template file (use: src/cli.cpp:123, template:
src/userspace_template.hpp) which is easier to work with than a series
of partial strings with distributed modification and assembly.  I
think that the data structuring for eBPF ELF object parsing in
include/types.hpp:356 has a more intuitive structure and meaning.  I
think that the ELF parsing structure in include/bpf_elf.hpp:67 is
easier to grok.  But this work is still broken and incorrect.

I'd like some help in understanding and filling out this code and
documentation.  I believe what would help me the most is for someone
knowledgeable to look at the ELF parsing at include/bpf_elf.hpp:67,
figuring out what should be used in include/userspace_template.hpp,
and completing the documentation in README.rst.

I've been spending a lot of time on my own with this project.  I could
really use some guidance at this juncture.  I'm happy to fix things up
to make the project more standard and easier for others to help me
with.  I just need to be directed at what to do.


Happy holidays,
Josh Marshall

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Help with eBPF's use of ELF for developing an alternative to `bpftool`
  2026-12-03  0:19 Help with eBPF's use of ELF for developing an alternative to `bpftool` Josh Marshall
@ 2026-12-03  1:15 ` Alexei Starovoitov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexei Starovoitov @ 2026-12-03  1:15 UTC (permalink / raw)
  To: Josh Marshall, bpf

On Wed, Dec 02, 2026 at 04:19 PM Josh Marshall <joshua.r.marshall.1991@gmail.com> wrote:
> I've been trying to make an alternative to `bpftool` because I
> disagree with how it does a few things.  This has involved digging

Which things? If it's a bug or a missing feature pls send a patch
for bpftool.

bpftool doesn't parse BPF objects. It calls bpf_object__open_file()
or bpf_object__open_mem(), and libbpf does the rest.
Your tool can link with libbpf too. It works from C++.
If you're writing your own ELF parser and libbpf alternative
then you came to a wrong place to ask questions. sorry.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-03  1:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  0:19 Help with eBPF's use of ELF for developing an alternative to `bpftool` Josh Marshall
2026-12-03  1:15 ` Alexei Starovoitov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.