https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111735

David Faust <david.faust at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david.faust at oracle dot com

--- Comment #1 from David Faust <david.faust at oracle dot com> ---
Sorry for the delay, somehow I missed this until now.

Confirmed... though this really ought to be further discussed and
formalized with the kernel BPF folks. As of now, btf.rst does not
specify any representation at all for forward-declared enums. And,
it lists in 'encoding requirements' for BTF_KIND_ENUM that 'size'
must be one of 1/2/4/8, so in a sense this de-facto representation
is not really valid.

IMO it would be better to adjust the BTF_KIND_FWD definition to
support forward-declared enums. CTF for example encodes the kind
of the forward in the 'type' field of its KIND_FWD, which in BTF
is simply unused. Anyway, that can be raised for discussion on
the bpf list.

In the meanwhile, it should not be problematic to adapt GCC to
follow clang and pahole in emitting KIND_ENUM with vlen=0.
  • [Bug debug/111735] incorrect BT... david.faust at oracle dot com via Gcc-bugs

Reply via email to