libbpf-cargo: Use original obj name when not embedding bytes in skel#1354
Merged
d-e-s-o merged 1 commit intolibbpf:masterfrom Mar 10, 2026
Merged
libbpf-cargo: Use original obj name when not embedding bytes in skel#1354d-e-s-o merged 1 commit intolibbpf:masterfrom
d-e-s-o merged 1 commit intolibbpf:masterfrom
Conversation
8264bfa to
55b8ce5
Compare
d-e-s-o
approved these changes
Mar 9, 2026
Collaborator
d-e-s-o
left a comment
There was a problem hiding this comment.
Seems mostly fine to me, thanks!
When reference_obj is true and object path is not set, a hash is added in the output bpf object filename, which in turn caused the generated skel to contain identifiers containing that hash (for example, TracexecSystem19301daf7155cef5SkelBuilder). It makes referencing these identifiers in Rust code unreliable as the hash could change. This patch fixes it by making libbpf-cargo use the original object name for generating the skel when the output object path is not explicitly set.
55b8ce5 to
8710f9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When reference_obj is true and object path is not set, a hash is added in the output bpf object filename, which in turn caused the generated skel to contain identifiers containing that hash (for example, TracexecSystem19301daf7155cef5SkelBuilder). It makes referencing these identifiers in Rust code unreliable as the hash could change.
This patch fixes it by making libbpf-cargo use the original object name for generating the skel when the output object path is not explicitly set.