[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cecb6351-ea9a-4f8a-863a-82c9ef02f012@linux.dev>
Date: Tue, 16 Dec 2025 12:41:44 -0800
From: Ihor Solodrai <ihor.solodrai@...ux.dev>
To: kernel test robot <lkp@...el.com>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>, Eduard Zingerman
<eddyz87@...il.com>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas.schier@...ux.dev>,
Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
Alan Maguire <alan.maguire@...cle.com>, Donglin Peng <dolinux.peng@...il.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev, bpf@...r.kernel.org,
dwarves@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kbuild@...r.kernel.org
Subject: Re: [PATCH bpf-next v2 4/4] resolve_btfids: change in-place update
with raw binary output
On 12/5/25 9:08 PM, kernel test robot wrote:
> Hi Ihor,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on bpf-next/master]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Ihor-Solodrai/resolve_btfids-rename-object-btf-field-to-btf_path/20251128-025645
> base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
> patch link: https://lore.kernel.org/r/20251127185242.3954132-5-ihor.solodrai%40linux.dev
> patch subject: [PATCH bpf-next v2 4/4] resolve_btfids: change in-place update with raw binary output
> config: arm64-randconfig-004-20251205 (https://download.01.org/0day-ci/archive/20251206/202512061213.85NHVN2W-lkp@intel.com/config)
> compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 14bf95b06a18b9b59c89601cbc0e5a6f2176b118)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251206/202512061213.85NHVN2W-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202512061213.85NHVN2W-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
>>> ld.lld: error: .tmp_vmlinux1.btf.o is incompatible with aarch64elf
>
I was able to reproduce this error.
It happens only when cross-compiling with LLVM (which we don't do on
BPF CI, btw) because of this line in gen-btf.sh:
echo "" | ${CC} -c -x c -o ${btf_data} -
The purpose of this command is to produce an "empty" linkable ELF
file. The .BTF section is objcopied into it, and then it's linked
into the vmlinux.
Before the changes in this patch, the "empty" ELF was produced with
objcopy --strip-all on .tmp_vmlinux1, which is a slower operation.
ld.lld fails, because ${CC} without the flags is just clang in this
case, and it emits an ELF for host arch, which of course can't be
linked. It can be fixed with:
echo "" | ${CC} ${CLANG_FLAGS} -c -x c -o ${btf_data} -
${CLANG_FLAGS} contains a correct clang --target when cross-compiling.
I'll use this in the upcoming v4 of the series.
Powered by blists - more mailing lists