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

Program Name should come from the symbols table, not the ELF section #375

Closed
dave-tucker opened this issue Aug 31, 2022 · 0 comments · Fixed by #413
Closed

Program Name should come from the symbols table, not the ELF section #375

dave-tucker opened this issue Aug 31, 2022 · 0 comments · Fixed by #413

Comments

@dave-tucker
Copy link
Member

Since libbpf 1.0, section names got strict (actually this happened in an earlier point release).

aya-bpf sometimes includes the program name as part of the section name... meaning libbpf will now flat out refuse to load programs that used aya-bpf in that manner. We also presented an inconsistent UX to users...
Sometimes we use the section name as default - e.g xdp - other times we use the actual function name.

In order to be libbpf 1.0 compatible - and generally to make aya easier to use - we should:

  1. Fix the aya-bpf macros to be consistent - we can continue to support name but it will be become shorthand for export_name
  2. Use the ELF symbol table to find multiple programs in a the same ELF section.
  3. Document that in the Bpf::program and Bpf::program_mut APIs that programs are uniquely identified by their function name
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 a pull request may close this issue.

1 participant