https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106773
--- Comment #10 from James Hilliard <james.hilliard1 at gmail dot com> --- (In reply to David Faust from comment #9) > Created attachment 54002 [details] > updated patch > > 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.linked3.o name cb_refs libbpf: loading object 'cb_refs' from buffer libbpf: elf: section(2) .symtab, size 504, link 1, flags 0, type=2 libbpf: elf: section(3) .text, size 240, link 0, flags 6, type=1 libbpf: sec '.text': found program 'cb1' at insn offset 0 (0 bytes), code size 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=1 libbpf: elf: skipping section(4) .data (size 0) libbpf: elf: section(5) .bss, size 0, link 0, flags 3, type=8 libbpf: elf: section(6) ?tc, size 648, link 0, flags 6, type=1 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 (504 bytes), code size 18 insns (144 bytes) libbpf: elf: section(7) license, size 4, link 0, flags 3, type=1 libbpf: license of cb_refs is GPL libbpf: elf: section(8) .maps, size 32, link 0, flags 3, type=1 libbpf: elf: section(9) .comment, size 43, link 0, flags 30, type=1 libbpf: elf: skipping unrecognized data section(9) .comment libbpf: elf: section(10) .rel.text, size 80, link 2, flags 40, type=9 libbpf: elf: section(11) .rel?tc, size 224, link 2, flags 40, type=9 libbpf: elf: section(12) .BTF, size 468228, link 0, flags 0, type=1 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
