-
Notifications
You must be signed in to change notification settings - Fork 66
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
failed to find skeleton map '.rodata.str1.1' #27
Comments
Hi and thanks for the report! I'm not sure if this is a change in bpftool or libbpf that causes this error. As far as I know I would appreciate if you could please do the following:
In the meantime, if you need your program to load, one workaround seems to be to declare the string const as a global, see this example. |
Yes. Two tests used the same clang/llvm version.
Ubuntu clang version 11.0.0-2 My testing environment is Ubuntu 20.10 kernel version is 5.8.
Here is a simple eBPF program based on libbpf-bootstrap which can reproduce the error:
Thanks for the example. |
I'm sorry, I don't manage to recreate the object file with the I tried to:
|
Thanks for your reply. But I am curious why the old libbpf version generates the .rodata.str1.1 section |
Great, thanks for testing! I want to investigate more on this but didn't have time this week, and will be off for the next ten days or so. Regarding your findings: I wonder if we're talking of the same thing. Was it on |
Yes. The bpftool version is
I agree with you. I am also curious why the libbpf version affects the .rodata.str1.1 section |
FYI, see libbpf/libbpf#274 . |
Thanks @chenhengqi! If I understand correctly, the issue should not happen now with recent clang and libbpf, which matches the observations here. |
Code like
bpf_printk("hello\n")
will generate a section '.rodata.str1.1'When I compile the above code with old version bpftool (the bpftool is installed by apt install in Ubuntu 20.10 kernel 5.8), the generated binary works well.
But when I use the same environment with the latest bpftool version to compile the same code, the generated binary report the error "libbpf: failed to find skeleton map '.rodata.str1.1'".
The text was updated successfully, but these errors were encountered: