Re: [PATCH v3 bpf-next 08/18] bpf: Add the bpf_scan_ir LLVM plugin

From: bot+bpf-ci

Date: Wed Nov 11 2026 - 03:23:20 EST


> bpf: Add the bpf_scan_ir LLVM plugin

TL;DR: Nit only: with the plugin enabled, link-vmlinux.sh adds --emit-relocs
to the .tmp_vmlinux1 link, so two existing comments (top-level Makefile,
vmlinux_link()) now say the opposite; they should be updated.

> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index d5710e900bd4..f39e2d1f1400 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh

[ ... ]

> @@ -89,6 +89,13 @@ vmlinux_link()
> ldlibs=
> fi
>
> + if is_enabled CONFIG_CLANG_PLUGIN_BPF_SCAN_IR; then
> + if [ "${output}" = ".tmp_vmlinux1" ]; then
> + ldflags="${ldflags} ${wl}--emit-relocs"

This isn't a bug, but two existing comments now say the opposite of what
happens here.

The top-level Makefile says:

# --emit-relocs is added by scripts/link-vmlinux.sh, for the final link only.

and a few lines below this block, vmlinux_link() says:

# Only the final link actually requires the relocations.

With the plugin enabled, the .tmp_vmlinux1 link also gets --emit-relocs, and
on arm64 it gets it without --discard-none.

Could both comments be updated to mention the .tmp_vmlinux1 case?

> + else
> + ldflags="${ldflags} ${wl}--script=${srctree}/scripts/bpf/fmodret.lds"
> + fi
> + fi
> ldflags="${ldflags} ${wl}--script=${objtree}/${KBUILD_LDS}"
>


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/42981885558