From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 78505385841F; Mon, 8 Jan 2024 18:36:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78505385841F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704738965; bh=lbCtNdympl7X6/+YQcB1GFyASyTmX5AWdDCjsHKindU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XDU0jgjLf5NvFVXqQWxSeMv2J7FCOA2be17Oh1LmdFbu+Lni6krNY5zk2D/q4Hcpz uuTxbtierQ6EsihU3J3lP9ilETYmBbL/e88RYBKzBbavN/lJTOLs7p0vrYQ4EEMXjM 9tpZKmjE7njAC+uPYBdqIKjmHkZoniaBldPDmAZY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113225] bpf: attribute((kernel_helper)) adds inconsistent BTF extern function decl entry. Date: Mon, 08 Jan 2024 18:36:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: unknown X-Bugzilla-Keywords: btf-debug X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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=3D113225 --- Comment #1 from GCC Commits --- The master branch has been updated by Cupertino Miranda : https://gcc.gnu.org/g:dfc88fb51c1f9c26215adf6a308c18e23992cdd9 commit r14-7011-gdfc88fb51c1f9c26215adf6a308c18e23992cdd9 Author: Cupertino Miranda Date: Wed Jan 3 11:37:34 2024 +0000 bpf: Correct BTF for kernel_helper attributed decls This patch fix a problem with kernel_helper attribute BTF information, which incorrectly generates BTF_KIND_FUNC entry. This BTF entry although accurate with traditional extern function declarations, once the function is attributed with kernel_helper, it is semantically incompatible of the kernel helpers in BPF infrastructure. gcc/ChangeLog: PR target/113225 * btfout.cc (btf_collect_datasec): Skip creating BTF info for extern and kernel_helper attributed function decls. gcc/testsuite/ChangeLog: * gcc.target/bpf/attr-kernel-helper.c: New test.=