From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 613933858C74; Thu, 1 Dec 2022 22:09:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 613933858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669932553; bh=oSpxWpb2qhxw2+8RuCSPcngsfWLDKcV8TVHBSmXCoi8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=U9vQivm2BivoeZZvx5NImI0tkMe5A4X7aat10DGDgqxTny2rZ3fOy8nf/MEk4w31h Q0f6b1O90MeJBEtnHeyq3bJHoXVTgntOmrnCaALCoNyuN6NPy4hR/bWiOaWKGqj6b6 okEpbcX7UCPTpwle7rc4SCbaaVMfbjzaaN6/byTY= From: "james.hilliard1 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106773] libbpf: failed to find BTF info for global/extern symbol 'bpf_link_fops' Date: Thu, 01 Dec 2022 22:09:12 +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: james.hilliard1 at gmail dot com 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 #10 from James Hilliard --- (In reply to David Faust from comment #9) > Created attachment 54002 [details] > updated patch >=20 > Update the 'extern' variable marking, and also mark 'extern' funcs. That fixes the issue in kfunc_call_test.c but I'm still hitting a few like = this in cb_refs.c: $ /home/buildroot/bpf-next/tools/testing/selftests/bpf/tools/sbin/bpftool --debug gen skeleton /home/buildroot/bpf-next/tools/testing/selftests/bpf/bpf_gcc/cb_refs.bpf.li= nked3.o name cb_refs libbpf: loading object 'cb_refs' from buffer libbpf: elf: section(2) .symtab, size 504, link 1, flags 0, type=3D2 libbpf: elf: section(3) .text, size 240, link 0, flags 6, type=3D1 libbpf: sec '.text': found program 'cb1' at insn offset 0 (0 bytes), code s= ize 4 insns (32 bytes) libbpf: sec '.text': found program 'cb2' at insn offset 4 (32 bytes), code = size 9 insns (72 bytes) libbpf: sec '.text': found program 'cb' at insn offset 13 (104 bytes), code size 2 insns (16 bytes) libbpf: sec '.text': found program 'cb3' at insn offset 15 (120 bytes), code size 15 insns (120 bytes) libbpf: elf: section(4) .data, size 0, link 0, flags 3, type=3D1 libbpf: elf: skipping section(4) .data (size 0) libbpf: elf: section(5) .bss, size 0, link 0, flags 3, type=3D8 libbpf: elf: section(6) ?tc, size 648, link 0, flags 6, type=3D1 libbpf: sec '?tc': found program 'underflow_prog' at insn offset 0 (0 bytes= ), code size 17 insns (136 bytes) libbpf: sec '?tc': found program 'leak_prog' at insn offset 17 (136 bytes), code size 26 insns (208 bytes) libbpf: sec '?tc': found program 'nested_cb' at insn offset 43 (344 bytes), code size 20 insns (160 bytes) libbpf: sec '?tc': found program 'non_cb_transfer_ref' at insn offset 63 (5= 04 bytes), code size 18 insns (144 bytes) libbpf: elf: section(7) license, size 4, link 0, flags 3, type=3D1 libbpf: license of cb_refs is GPL libbpf: elf: section(8) .maps, size 32, link 0, flags 3, type=3D1 libbpf: elf: section(9) .comment, size 43, link 0, flags 30, type=3D1 libbpf: elf: skipping unrecognized data section(9) .comment libbpf: elf: section(10) .rel.text, size 80, link 2, flags 40, type=3D9 libbpf: elf: section(11) .rel?tc, size 224, link 2, flags 40, type=3D9 libbpf: elf: section(12) .BTF, size 468228, link 0, flags 0, type=3D1 libbpf: looking for externs among 21 symbols... libbpf: failed to find BTF for extern 'bpf_kfunc_call_test_release' [8112] section: -2 Error: failed to open BPF object file: No such file or directory=