public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ibhagat at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-112656-4-oAE0bUpJbB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112656-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Indu Bhagat <ibhagat at gcc dot gnu.org> ---
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.

  parent reply	other threads:[~2023-11-27 21:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 19:25 [Bug debug/112656] New: " jemarch at gcc dot gnu.org
2023-11-21 19:37 ` [Bug debug/112656] " jemarch at gcc dot gnu.org
2023-11-21 19:45 ` jemarch at gcc dot gnu.org
2023-11-21 20:37 ` jemarch at gcc dot gnu.org
2023-11-27 21:43 ` ibhagat at gcc dot gnu.org
2023-11-27 21:53 ` ibhagat at gcc dot gnu.org [this message]
2023-11-28  5:15 ` jemarch at gcc dot gnu.org
2023-11-29 19:07 ` ibhagat at gcc dot gnu.org
2023-12-04 10:01 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-112656-4-oAE0bUpJbB@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).