Not a big issue, just something I found while comparing cilium/ebpf to what libbpf does. Based on my understanding, libbpf may interpret (mt + 1) as a u32 to pass it to BTF_INT_ENCODING without calling btf_is_int(mt):
|
(btf_int_encoding(mt) & BTF_INT_SIGNED); |
I've experimented a bit and I think it might not be possible to get clang to even emit such a relocation, so this has limited impact.
Not a big issue, just something I found while comparing cilium/ebpf to what libbpf does. Based on my understanding, libbpf may interpret (mt + 1) as a
u32to pass it toBTF_INT_ENCODINGwithout callingbtf_is_int(mt):libbpf/src/relo_core.c
Line 779 in ec6f716
I've experimented a bit and I think it might not be possible to get clang to even emit such a relocation, so this has limited impact.