[llvm] [BPF] Handle nested wrapper structs in BPF map definition traversal (PR #144097)

Michal Rostecki via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 08:45:15 PDT 2025


vadorovsky wrote:

Nevermind, I figured that out. Named pointer types are totally normal in Rust and the `print_bpf.py` script was the only place in the entire monorepo enforcing their anonimity. I pushed a separate commit fixing that, please let me know if you agree with the change.

Linux kernel *might* have some requirement around that, given that we already have a fixup for that in bpf-linker:

https://github.com/aya-rs/bpf-linker/blob/79503ff5daccf4137576fb094f1da264066367a2/src/llvm/di.rs#L197-L200

But I think we should stop enforcing that. If the kernel really has such a requirement, I'm happy to prepare a fix and propose it to ML. I will take a look this week.

What I can say for now, is that on LLVM's side, emitting BTF with named pointers works just fine.

https://github.com/llvm/llvm-project/pull/144097


More information about the llvm-commits mailing list