https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106263
Bug ID: 106263 Summary: BTF_KIND_FUNC type does not encode linkage Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: ibhagat at gcc dot gnu.org Target Milestone: --- GCC generates BTF_KIND_FUNC with vlen set to 0. libbpf expects the vlen field to include the linkage information. The issue was reported here: https://lore.kernel.org/bpf/8735fbcv3x....@oracle.com/ Although GCC is currently generating the BTF_KIND_FUNC as per the BTF format documentation (see excerpt below), this needs to be changed to allow the tools to work well with each other. [Source: https://www.kernel.org/doc/Documentation/bpf/btf.rst] ... 2.2.12 BTF_KIND_FUNC ~~~~~~~~~~~~~~~~~~~~ ``struct btf_type`` encoding requirement: * ``name_off``: offset to a valid C identifier * ``info.kind_flag``: 0 * ``info.kind``: BTF_KIND_FUNC * ``info.vlen``: 0 * ``type``: a BTF_KIND_FUNC_PROTO type ...