Commit 4ff3ce2
Core: Emit nested CO-RE access strings for anonymous members
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>1 parent f2ec707 commit 4ff3ce2
1 file changed
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | 88 | | |
93 | 89 | | |
94 | 90 | | |
| |||
137 | 133 | | |
138 | 134 | | |
139 | 135 | | |
140 | | - | |
141 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
| |||
271 | 277 | | |
272 | 278 | | |
273 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
274 | 287 | | |
275 | 288 | | |
276 | 289 | | |
277 | 290 | | |
278 | 291 | | |
279 | | - | |
| 292 | + | |
280 | 293 | | |
281 | 294 | | |
282 | 295 | | |
| |||
0 commit comments