-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf-cargo: Handle duplicated types in BTF more gracefully
Our SkeletonBuilder currently only support building a skeleton from a single .bpf.c file. However, users may very well compile multiple .bpf.c files into .bpf.o and link them into a single object. In such a scenario, it is easily possible that we end up with multiple types of the same name in the corresponding BTF. Currently, this results in compilation errors. With this change we handle this case more gracefully, by enumerating these types, similar to what libbpf does in its dumping logic. Signed-off-by: Daniel Müller <deso@posteo.net>
- Loading branch information
Showing
3 changed files
with
121 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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