mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-12-06 01:48:35 +00:00
A field lifted out of an anonymous member needs an access string that walks into that member, so `struct pt_regs.cs` is `llvm.pt_regs:0:136$0:17:0` (member 0 of anonymous member 17) rather than the flat `$0:<index>` form. This is byte-for-byte what clang emits for the equivalent C, verified against `__builtin_preserve_access_index(ctx->cs)` on a struct with the same shape, and the indices and offsets agree with `bpftool btf dump file /sys/kernel/btf/vmlinux`. Only fields carrying an access path take the new path; every other field keeps the existing flat and indexed/array forms unchanged. The only .ll diff across all vmlinux/xdp test programs is four brand new globals for cs, csx, ss and ssx. No pre-existing relocation string changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>