Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts/gen-btf.sh: Reduce log verbosity

Remove info messages from gen-btf.sh, as they are unnecessarily
detailed and sometimes inaccurate [1]. Verbose log can be produced by
passing V=1 to make, which will set -x for the shell.

[1] https://lore.kernel.org/bpf/CAADnVQ+biTSDaNtoL=ct9XtBJiXYMUqGYLqu604C3D8N+8YH9A@mail.gmail.com/

Suggested-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20251231183929.65668-1-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Ihor Solodrai and committed by
Alexei Starovoitov
453dece5 1a8fa7fa

+2 -11
-10
scripts/gen-btf.sh
··· 60 60 grep -q "^$1=y" ${objtree}/include/config/auto.conf 61 61 } 62 62 63 - info() 64 - { 65 - printf " %-7s %s\n" "${1}" "${2}" 66 - } 67 - 68 63 case "${KBUILD_VERBOSE}" in 69 64 *1*) 70 65 set -x 71 66 ;; 72 67 esac 73 68 74 - 75 69 gen_btf_data() 76 70 { 77 - info BTF "${ELF_FILE}" 78 71 btf1="${ELF_FILE}.BTF.1" 79 72 ${PAHOLE} -J ${PAHOLE_FLAGS} \ 80 73 ${BTF_BASE:+--btf_base ${BTF_BASE}} \ 81 74 --btf_encode_detached=${btf1} \ 82 75 "${ELF_FILE}" 83 76 84 - info BTFIDS "${ELF_FILE}" 85 77 ${RESOLVE_BTFIDS} ${RESOLVE_BTFIDS_FLAGS} \ 86 78 ${BTF_BASE:+--btf_base ${BTF_BASE}} \ 87 79 --btf ${btf1} "${ELF_FILE}" ··· 87 95 # SHF_ALLOC because .BTF will be part of the vmlinux image. --strip-all 88 96 # deletes all symbols including __start_BTF and __stop_BTF, which will 89 97 # be redefined in the linker script. 90 - info OBJCOPY "${btf_data}" 91 98 echo "" | ${CC} ${CLANG_FLAGS} ${KBUILD_CFLAGS} -c -x c -o ${btf_data} - 92 99 ${OBJCOPY} --add-section .BTF=${ELF_FILE}.BTF \ 93 100 --set-section-flags .BTF=alloc,readonly ${btf_data} ··· 104 113 105 114 embed_btf_data() 106 115 { 107 - info OBJCOPY "${ELF_FILE}.BTF" 108 116 ${OBJCOPY} --add-section .BTF=${ELF_FILE}.BTF ${ELF_FILE} 109 117 110 118 # a module might not have a .BTF_ids or .BTF.base section