From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA52A3858019; Wed, 13 Dec 2023 18:09:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA52A3858019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702490987; bh=nOy2tMhV4zKWPPEkS0zrraRKjlr2++B6B872RjdovW8=; h=From:To:Subject:Date:From; b=RcbJYx39LQyK3Me16yZbTgM+NxrnawPDhPn5OHjVGon5zgT+WerpZk6uWjiG6BVgu itcTPN7gKUSbZhw62ZZ5Si3sva12in/cxmX1a46aq4KMf6JbAT9P+C+F/c7NqkQUia ssXgJSUM8aCtzxp86C+a5qkRZIbWzwpehKVqATo8= From: "jemarch at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/113000] New: Generate BTF always in early-finish regardless of CO-RE Date: Wed, 13 Dec 2023 18:09:47 +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=3D113000 Bug ID: 113000 Summary: Generate BTF always in early-finish regardless of CO-RE 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: --- The BPF CO-RE support requires storing information relevant to the BTF debug info in the .BTF.ext section. In particular: * The CO-RE relocation strings contain references to BTF types, by type ID. * The CO-RE information includes strings that are stored in the BTF string section. Because of the above, we are generating BTF (call to ctf_debug_finish) in dwarf2out's early_finish if no -mco-re is specified, but the call is done in dwarf2out's finish instead if -mco-re is specified. This implies that there are differences in the output (also in CTF) because for example entries for inlined functions are no longer present at 'finish' time but they are at 'early_finish' time. We should change GCC so it always calls ctf_debug_finish in early_finish, regardless of whether CO-RE relocs are being generated or not.=