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

Fix unsupported map linkage static. #237

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Conversation

waruqi
Copy link
Contributor

@waruqi waruqi commented Nov 2, 2023

Signed-off-by: ruki <waruqi@gmail.com>
@waruqi waruqi mentioned this pull request Nov 2, 2023
Signed-off-by: ruki <waruqi@gmail.com>
@waruqi
Copy link
Contributor Author

waruqi commented Nov 2, 2023

libbpf: map 'my_pid_map': unsupported map linkage static.
Error: failed to open BPF object file: Operation not supported

I have fixed this error.

We cannot add "-fvisibility=hidden" when compiling *.bpf.c in release mode. bpftool 7.2.0 cannot get map.

so I removed this flag in release mode.

Now we can use bpftool 7.2.0

@waruqi waruqi changed the title Always fetch bpftool from remote Fix unsupported map linkage static. Nov 2, 2023
@waruqi
Copy link
Contributor Author

waruqi commented Nov 2, 2023

BTW, I have also fixed elfutils issue. #236

so please run following commands to fix all errors.

xrepo update-repo
xrepo remove --all -y elfutils
xmake f -p android -c
xmake

if you have not bpftool,

you can run

xmake f -p android -c --require-bpftool=y

@anakryiko anakryiko merged commit 8ca2914 into libbpf:master Nov 2, 2023
12 checks passed
@waruqi waruqi deleted the android branch November 3, 2023 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants