]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, btf: Always output invariant hit in pahole DWARF to BTF transform
authorChris Down <chris@chrisdown.name>
Wed, 22 Jan 2020 00:01:10 +0000 (00:01 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 22 Jan 2020 16:52:28 +0000 (17:52 +0100)
commit544d007db352bfe99c4578be8301a32978777d5c
treea973e74380a9631256c6cc0e6a15af350856f56e
parent7b8ce2155da30d12e3cd846bd16dc8b40626aa37
bpf, btf: Always output invariant hit in pahole DWARF to BTF transform

When trying to compile with CONFIG_DEBUG_INFO_BTF enabled, I got this
error:

    % make -s
    Failed to generate BTF for vmlinux
    Try to disable CONFIG_DEBUG_INFO_BTF
    make[3]: *** [vmlinux] Error 1

Compiling again without -s shows the true error (that pahole is
missing), but since this is fatal, we should show the error
unconditionally on stderr as well, not silence it using the `info`
function. With this patch:

    % make -s
    BTF: .tmp_vmlinux.btf: pahole (pahole) is not available
    Failed to generate BTF for vmlinux
    Try to disable CONFIG_DEBUG_INFO_BTF
    make[3]: *** [vmlinux] Error 1

Signed-off-by: Chris Down <chris@chrisdown.name>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200122000110.GA310073@chrisdown.name
scripts/link-vmlinux.sh