You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating debug_info is enabled in bpf-linker, the produced BTF is not accepted by the kernel. That's because debug_info (and therefore BTF generated from it) is different between the eBPF objects produced by rustc and clang. The long term solution would be getting rid of those differences by making appropriate changes in rustc and LLVM. But for now, we need to do fixups in bpf-linker, to fix the issue faster.
In clang, DW_TAG_pointer_type has only DW_AT_type field, we should probably strip all the others.
DW_TAG_structure_type for maps
Not 100% sure if that matters, but in C, maps are defined as anon structs. In Rust, it's impossible to define anon structs, so struct definitions always end up with DW_AT_name.
Related to aya-rs/aya#351
Related project: https://github.com/vadorovsky/aya-btf-maps
When generating debug_info is enabled in bpf-linker, the produced BTF is not accepted by the kernel. That's because debug_info (and therefore BTF generated from it) is different between the eBPF objects produced by rustc and clang. The long term solution would be getting rid of those differences by making appropriate changes in rustc and LLVM. But for now, we need to do fixups in bpf-linker, to fix the issue faster.
Known differences:
DW_tag_pointer_type
(in DWARF) /PTR
(in BTF)DW_tag_pointer_type
produced by rustc:PTR
BTF produced by rustc:DW_tag_pointer_type
produced by clang:PTR
BTF produced by clang:In clang,
DW_TAG_pointer_type
has onlyDW_AT_type
field, we should probably strip all the others.DW_TAG_structure_type
for mapsNot 100% sure if that matters, but in C, maps are defined as anon structs. In Rust, it's impossible to define anon structs, so struct definitions always end up with
DW_AT_name
.DWARF produced by rustc:
BTF produced by rustc:
DWARF produced by clang:
BTF produced by clang:
The text was updated successfully, but these errors were encountered: