Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature fix libbpf examples #327

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

hp77-creator
Copy link
Contributor

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

@@ -0,0 +1,5 @@
## BPF map example
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

sure @yunwei37

@yunwei37
Copy link
Member

yunwei37 commented Sep 1, 2024

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

@hp77-creator
Copy link
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
Copy link
Member

yunwei37 commented Sep 1, 2024

maybe you need to try something like DYLD_INSERT_LIBRARIES or DYLD_LIBRARY_PATH?

I'm not quite sure about that

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