From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 94E93382B3C8; Wed, 14 Dec 2022 18:26:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 94E93382B3C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671042363; bh=NPhbHky1ZDsmh76BOsG7qAsGYnrMDxqAmpgEsiYp4fA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p1e3gm2hrKCJA9T7ad/1PwVNS0xmzpwmV0dvbX7cvhvhQBdEyN/JwJJBFUe8om/4J BKCR48Dc41ME+4j82+t5d511ZFWpj+0dis6YR/YfjC9WSMumldqKGJJaTvL2FCEFpj 48DRy9s9Qd9WNOR7cMq9OKcDbXMmDfUV5mW5Jjcw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106773] libbpf: failed to find BTF info for global/extern symbol 'bpf_link_fops' Date: Wed, 14 Dec 2022 18:26:03 +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: 13.0 X-Bugzilla-Keywords: wrong-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=3D106773 --- Comment #19 from CVS Commits --- The master branch has been updated by David Faust : https://gcc.gnu.org/g:70b303049e45c180236a4114f844311652bad002 commit r13-4709-g70b303049e45c180236a4114f844311652bad002 Author: David Faust Date: Wed Dec 7 11:51:59 2022 -0800 btf: correct generation for extern funcs [PR106773] The eBPF loader expects to find entries for functions declared as extern in the corresponding BTF_KIND_DATASEC record, but we were not generating these entries. This patch adds support for the 'extern' linkage of function types in BTF, and creates entries for for them BTF_KIND_DATASEC records as neede= d. PR target/106773 gcc/ * btfout.cc (get_section_name): New function. (btf_collect_datasec): Use it here. Process functions, marking = them 'extern' and generating DATASEC entries for them as appropriate. Move creation of BTF_KIND_FUNC records to here... (btf_dtd_emit_preprocess_cb): ... from here. gcc/testsuite/ * gcc.dg/debug/btf/btf-datasec-2.c: New test. * gcc.dg/debug/btf/btf-function-6.c: New test. include/ * btf.h (enum btf_func_linkage): New. (struct btf_var_secinfo): Update comments with notes about exte= rn functions.=