yonghong-song 5d94c60e6c
[BPF] Relax BTF_TYPE_ID_REMOTE_RELOC for unnamed types (#182370)
Currently, BTF_TYPE_ID_REMOTE_RELOC requires a named type e.g. named
struct or union types.

But in [1], there are some use cases where unnamed types, e.g., 'void
*', 'void **', 'const char *', etc. All these will fail compilation with
error:
  Empty type name for BTF_TYPE_ID_REMOTE reloc

This patch relaxed this condition to allow unnamed types. The kernel
libbpf will decide what are allowed or not for each specific cases.

[1]
https://lore.kernel.org/bpf/bb4bf5fe648ac71c969c6228ac6e72ea85cbc64b.camel@gmail.com/T/#m5a7abf799b75199f6678eddd9c1ea4e31563b4dc
2026-02-19 21:12:31 -08:00
..