public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/106263] BTF_KIND_FUNC type does not encode linkage
Date: Mon, 01 Aug 2022 17:46:27 +0000	[thread overview]
Message-ID: <bug-106263-4-zwgECTJokh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106263-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jose E. Marchesi <jemarch@gcc.gnu.org>:

https://gcc.gnu.org/g:32566720f3a9135fa355f0304f024a79f107a1b8

commit r13-1918-g32566720f3a9135fa355f0304f024a79f107a1b8
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date:   Fri Jul 8 18:32:02 2022 +0200

    btf: emit linkage information in BTF_KIND_FUNC entries

    The kernel bpftool expects BTF_KIND_FUNC entries in BTF to include an
    annotation reflecting the linkage of functions (static, global).  For
    whatever reason they abuse the `vlen' field of the BTF_KIND_FUNC entry
    instead of adding a variable-part to the record like it is done with
    other entry kinds.

    This patch makes GCC to include this linkage info in BTF_KIND_FUNC
    entries.

    Tested in bpf-unknown-none target.

    gcc/ChangeLog:

            PR debug/106263
            * ctfc.h (struct ctf_dtdef): Add field linkage.
            * ctfc.cc (ctf_add_function): Set ctti_linkage.
            * dwarf2ctf.cc (gen_ctf_function_type): Pass a linkage for
            function types and subprograms.
            * btfout.cc (btf_asm_func_type): Emit linkage information for the
            function.
            (btf_dtd_emit_preprocess_cb): Propagate the linkage information
            for functions.

    gcc/testsuite/ChangeLog:

            PR debug/106263
            * gcc.dg/debug/btf/btf-function-4.c: New test.
            * gcc.dg/debug/btf/btf-function-5.c: Likewise.

      reply	other threads:[~2022-08-01 17:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-11 20:26 [Bug debug/106263] New: " ibhagat at gcc dot gnu.org
2022-08-01 17:46 ` cvs-commit at gcc dot gnu.org [this message]

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-zwgECTJokh@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).