Skip to content

Feature fix libbpf examples - #327

Draft
hp77-creator wants to merge 7 commits into
eunomia-bpf:masterfrom
hp77-creator:feature_fix_libbpf_examples
Draft

Feature fix libbpf examples#327
hp77-creator wants to merge 7 commits into
eunomia-bpf:masterfrom
hp77-creator:feature_fix_libbpf_examples

Conversation

@hp77-creator

Copy link
Copy Markdown
Contributor

Adding example to run a sample ebpf program which uses a map and updates a value in the map.

Comment thread example/bpfmap/README.md
@@ -0,0 +1,5 @@
## BPF map example

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be better to rename the example to map-op?

And, can you try loading a eBPF program and running it in the kernel?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure @yunwei37

Comment thread example/bpfmap/main.cpp
@yunwei37

yunwei37 commented Sep 1, 2024

Copy link
Copy Markdown
Member

Hi @hp77-creator , is it ready to merge?

@hp77-creator

Copy link
Copy Markdown
Contributor Author

Hi @yunwei37 , so I am able to compile the example but when I try to run it using LD_PRELOAD, I am getting following error:

LD_PRELOAD=~/.bpftime/libbpftime-syscall-ser
ver.dylib ./main
fish: Unknown command. './main' exists but is not an executable file.
LD_PRELOAD=~/.bpftime/libbpftime-syscall-server.dylib ./main

I will need to create a userspace program to run it, right?

@yunwei37

yunwei37 commented Sep 1, 2024

Copy link
Copy Markdown
Member

maybe you need to try something like DYLD_INSERT_LIBRARIES or DYLD_LIBRARY_PATH?

I'm not quite sure about that

@yunwei37
yunwei37 force-pushed the master branch 3 times, most recently from 1354316 to a6a132b Compare September 11, 2024 18:08
@yunwei37
yunwei37 force-pushed the master branch 2 times, most recently from cbcb1e9 to 20acd88 Compare October 1, 2025 23:45
@yunwei37

Copy link
Copy Markdown
Member

This draft has had no update since October 2025 and the last blocker was an unverified macOS execution path. If the example is still intended, please provide the current target OS/architecture, the exact build and launch commands, and the latest failure output against master; otherwise there is not enough current evidence to revive or patch this branch safely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants