On Thu, Jul 6, 2023 at 10:07 PM Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote: > > I think it's better the other way around: make BTF_TYPE_ID_LOCAL strip > const/volatile/restrict modifiers. For all other relocations we rely > on having named types, so const/volatile makes no sense and will fail > relocation. It's hard to come up with the situation where recording > const/volatile/restrict in BTF_TYPE_ID_LOCAL would make sense, so I'd > say that it should behave just like all the other relos. Would the relocation then point at the stripped type instead of the start of the qualifier chain? I found this by running our unit tests which essentially check that the compiler generated local ID from the instruction stream matches what the lib generates. I'd like to be able to keep doing this.