Skip to content

Commit 156ee10

Browse files
olsajirikernel-patches-bot
authored andcommitted
Currently all the resolve_btfids 'users' are under CONFIG_BPF
code, so if we have CONFIG_BPF disabled, resolve_btfids will fail, because there's no data to resolve. In case CONFIG_BPF is disabled, using resolve_btfids --no-fail option, that makes resolve_btfids leave quietly if there's no data to resolve. Fixes: c9a0f3b ("bpf: Resolve BTF IDs in vmlinux image") Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- scripts/link-vmlinux.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
1 parent 5a9cdba commit 156ee10

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/link-vmlinux.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,13 @@ vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o}
342342

343343
# fill in BTF IDs
344344
if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
345-
info BTFIDS vmlinux
346-
${RESOLVE_BTFIDS} vmlinux
345+
info BTFIDS vmlinux
346+
# Let's be more permissive if CONFIG_BPF is disabled
347+
# and do not fail if there's no data to resolve.
348+
if [ -z "${CONFIG_BPF}" ]; then
349+
no_fail=--no-fail
350+
fi
351+
${RESOLVE_BTFIDS} $no_fail vmlinux
347352
fi
348353

349354
if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then

0 commit comments

Comments
 (0)