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/106263] New: BTF_KIND_FUNC type does not encode linkage
Date: Mon, 11 Jul 2022 20:26:06 +0000	[thread overview]
Message-ID: <bug-106263-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 106263
           Summary: BTF_KIND_FUNC type does not encode linkage
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ibhagat at gcc dot gnu.org
  Target Milestone: ---

GCC generates BTF_KIND_FUNC with vlen set to 0.  libbpf expects the vlen field
to include the linkage information.

The issue was reported here:

https://lore.kernel.org/bpf/8735fbcv3x.fsf@oracle.com/

Although GCC is currently generating the BTF_KIND_FUNC as per the BTF format
documentation (see excerpt below), this needs to be changed to allow the tools
to work well with each other.

[Source: https://www.kernel.org/doc/Documentation/bpf/btf.rst]

...
2.2.12 BTF_KIND_FUNC
~~~~~~~~~~~~~~~~~~~~

``struct btf_type`` encoding requirement:
  * ``name_off``: offset to a valid C identifier
  * ``info.kind_flag``: 0
  * ``info.kind``: BTF_KIND_FUNC
  * ``info.vlen``: 0
  * ``type``: a BTF_KIND_FUNC_PROTO type
...

             reply	other threads:[~2022-07-11 20:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-11 20:26 ibhagat at gcc dot gnu.org [this message]
2022-08-01 17:46 ` [Bug debug/106263] " 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-106263-4@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).