From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 030C93858C35; Mon, 27 Nov 2023 21:53:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 030C93858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701121994; bh=eoAx2EinQ8b6KhatrMHmtJKrKEMJnQZctzeXbtEJ42k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lmauy+HY0wzId8OAUoMRaA2mxUhV8uhWuVpWlo1peeRRZWMflEM30WnePYiJ74cVl 9l0W1IF7WQbSLSEEPtqfBtQR8WfwPf3TtclSVKyCTwpkNRH96cLLCt3t6TwvxljeZP eBUKKVAv4N6i8Oafl9McW3N98ZVpLBAgcDrlvNo8= From: "ibhagat at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/112656] btf: function prototypes generated with name Date: Mon, 27 Nov 2023 21:53:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: ibhagat 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: Message-ID: In-Reply-To: References: 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 --- Comment #5 from Indu Bhagat --- The reason for the noted difference in BTF for BPF vs non-BPF target is: On non-BPF targets, BTF is emitted in early_finish. On BPF target however, -mco-re is default, and hence, BTF is emitted in late finish. See ctf_debug_early_finish: void ctf_debug_early_finish (const char * filename) { /* Emit CTF debug info early always. */ if (ctf_debug_info_level > CTFINFO_LEVEL_NONE /* Emit BTF debug info early if CO-RE relocations are not required. */ || (btf_debuginfo_p () && !btf_with_core_debuginfo_p ())) ctf_debug_finalize (filename, btf_debuginfo_p ()); } For posterity - In summary, it cannot be assumed that BTF generated for BPF target will be same as that generated for x86_64, at least until -mco-re is= the default.=