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

--- Comment #4 from Indu Bhagat <ibhagat at gcc dot gnu.org> ---
On the BTF side, we will see an additional BTF type too with -std=gnu23 (as
expected because BTF generation is based off CTF internally in GCC):

$ bpftool btf dump file ctf-function-pointers-2.o
[1] STRUCT 'callback_head' size=16 vlen=2
        'next' type_id=2 bits_offset=0
        'func' type_id=4 bits_offset=64
[2] PTR '(anon)' type_id=1
[3] FUNC_PROTO '(anon)' ret_type_id=0 vlen=1
        '(anon)' type_id=2
[4] PTR '(anon)' type_id=3
[5] FUNC_PROTO '(anon)' ret_type_id=0 vlen=1
        '(anon)' type_id=2
[6] PTR '(anon)' type_id=5
[7] TYPEDEF 'rcu_callback_t' type_id=6
[8] VAR 'rcb' type_id=7, linkage=global
[9] VAR 'chead' type_id=1, linkage=global
[10] DATASEC '.bss' size=0 vlen=2
        type_id=8 offset=0 size=8 (VAR 'rcb')
        type_id=9 offset=0 size=16 (VAR 'chead')

Need to double-check if this will be an issue for BTF, because BTF output is
not de-duplicated yet (no linker de-dup support).

Reply via email to