From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CECEF3856975; Thu, 1 Dec 2022 22:30:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CECEF3856975 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669933854; bh=7jPn3cgaeLbHjDoyhu/MTNmaQlHdVNr1bhXP2+xQt+c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hHKKfrjOaMcqduvwJ1RQqfAxgLMBwgjQ5ox3Qv/Ab1Z4Tj9YNcGdeRXmpQbtmD6UX 0MRFcuOYHXtKCxRUjtK2UaLUM/xAzkrGEtCgwl3FcJB3L4dADya/qWeyngiyzSWKwq qxCdyEwy5jI0HK44HCgV17ZRk5qVKPcc2ZnZl5QY= 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:30:54 +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 #12 from James Hilliard --- (In reply to James Hilliard from comment #10) > (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. >=20 > That fixes the issue in kfunc_call_test.c Actually I think there's still an issue here, did a full clean test build and am now hitting this error: $ /home/buildroot/bpf-next/tools/testing/selftests/bpf/tools/sbin/bpftool --debug gen skeleton /home/buildroot/bpf-next/tools/testing/selftests/bpf/bpf_gcc/kfunc_call_tes= t.bpf.linked3.o name kfunc_call_test libbpf: loading object 'kfunc_call_test' from buffer libbpf: elf: section(2) .symtab, size 648, link 1, flags 0, type=3D2 libbpf: elf: section(3) .data, size 0, link 0, flags 3, type=3D1 libbpf: elf: skipping section(3) .data (size 0) libbpf: elf: section(4) .bss, size 0, link 0, flags 3, type=3D8 libbpf: elf: section(5) tc, size 1120, link 0, flags 6, type=3D1 libbpf: sec 'tc': found program 'kfunc_call_test2' at insn offset 0 (0 byte= s), code size 13 insns (104 bytes) libbpf: sec 'tc': found program 'kfunc_call_test1' at insn offset 13 (104 bytes), code size 21 insns (168 bytes) libbpf: sec 'tc': found program 'kfunc_call_test_ref_btf_id' at insn offset= 34 (272 bytes), code size 22 insns (176 bytes) libbpf: sec 'tc': found program 'kfunc_call_test_pass' at insn offset 56 (4= 48 bytes), code size 52 insns (416 bytes) libbpf: sec 'tc': found program 'kfunc_call_test_get_mem' at insn offset 108 (864 bytes), code size 32 insns (256 bytes) libbpf: elf: section(6) syscall, size 152, link 0, flags 6, type=3D1 libbpf: sec 'syscall': found program 'kfunc_syscall_test' at insn offset 0 = (0 bytes), code size 15 insns (120 bytes) libbpf: sec 'syscall': found program 'kfunc_syscall_test_null' at insn offs= et 15 (120 bytes), code size 4 insns (32 bytes) libbpf: elf: section(7) license, size 4, link 0, flags 3, type=3D1 libbpf: license of kfunc_call_test is GPL libbpf: elf: section(8) .comment, size 43, link 0, flags 30, type=3D1 libbpf: elf: skipping unrecognized data section(8) .comment libbpf: elf: section(9) .reltc, size 272, link 2, flags 40, type=3D9 libbpf: elf: section(10) .relsyscall, size 64, link 2, flags 40, type=3D9 libbpf: elf: section(11) .BTF, size 469068, link 0, flags 0, type=3D1 libbpf: looking for externs among 27 symbols... libbpf: failed to find BTF for extern 'bpf_kfunc_call_test2' [8134] section= : -2 Error: failed to open BPF object file: No such file or directory=