From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6FA6D3858D35; Tue, 21 Nov 2023 19:25:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FA6D3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700594744; bh=q2Dw86rrf4jITjG9aar7flvf/FEy+NsmO6QadHx9Zew=; h=From:To:Subject:Date:From; b=VeGhyLGRCvRUnhNNMwI0rh6r6uWAHtfeFYZ/Da2k+BeRkqtsBlvWCaI23Zba8Cc1C BmS+LvN+nGQvIKsEln7MCpczRoqxDRP/JlK67MpOWqa4QE794XKaaOCZD/qVxSZDt8 g1SsKO014JhgXNkaxKVFqmoHWlUE3FXZMtKw/31s= From: "jemarch at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/112656] New: btf: function prototypes generated with name Date: Tue, 21 Nov 2023 19:25:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jemarch at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112656 Bug ID: 112656 Summary: btf: function prototypes generated with name Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: jemarch at gcc dot gnu.org Target Milestone: --- BTF suports both BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO tags. FUNC entries = link to their corresponding PROTO via type_id. PROTO entries must have no names, i.e. name_off shall be 0. GCC seems to be generating non-anonymous BTF_KIND_FUNC_PROTO entries in some circumstances: $ bpf-unknown-none-gcc -c -O2 repro.i -o repro.o $ bpftool btf dump all | grep FUNC_PROTO | grep -v anon [8319] FUNC_PROTO '____kretprobe_ieee80211_get_channel_khz' ret_type_id=3D7 vlen=3D2 [8321] FUNC_PROTO '____kprobe_ieee80211_scan_completed' ret_type_id=3D7 vle= n=3D2 [8333] FUNC_PROTO '____kprobe_ieee80211_request_scan' ret_type_id=3D7 vlen= =3D2 [8343] FUNC_PROTO '____kprobe_unregister_netdev' ret_type_id=3D7 vlen=3D2 [8345] FUNC_PROTO '____kprobe_register_netdev' ret_type_id=3D7 vlen=3D2 [8347] FUNC_PROTO '____kprobe_ieee80211_unregister_hw' ret_type_id=3D7 vlen= =3D1 [8349] FUNC_PROTO '____kprobe_ieee80211_register_hw' ret_type_id=3D7 vlen= =3D1 [8351] FUNC_PROTO 'log_event' ret_type_id=3D0 vlen=3D2=