public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH bpf-next v2 4/4] resolve_btfids: change in-place update with raw binary output
       [not found] <20251127185242.3954132-5-ihor.solodrai@linux.dev>
@ 2025-12-06  5:08 ` kernel test robot
  2025-12-16 20:41   ` Ihor Solodrai
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-12-06  5:08 UTC (permalink / raw)
  To: Ihor Solodrai, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Nathan Chancellor, Nicolas Schier,
	Nick Desaulniers, Bill Wendling, Justin Stitt, Alan Maguire,
	Donglin Peng
  Cc: llvm, oe-kbuild-all, bpf, dwarves, linux-kernel, linux-kbuild

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@intel.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

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH bpf-next v2 4/4] resolve_btfids: change in-place update with raw binary output
  2025-12-06  5:08 ` [PATCH bpf-next v2 4/4] resolve_btfids: change in-place update with raw binary output kernel test robot
@ 2025-12-16 20:41   ` Ihor Solodrai
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Solodrai @ 2025-12-16 20:41 UTC (permalink / raw)
  To: kernel test robot, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Nathan Chancellor, Nicolas Schier,
	Nick Desaulniers, Bill Wendling, Justin Stitt, Alan Maguire,
	Donglin Peng
  Cc: llvm, oe-kbuild-all, bpf, dwarves, linux-kernel, linux-kbuild

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@intel.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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-16 20:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20251127185242.3954132-5-ihor.solodrai@linux.dev>
2025-12-06  5:08 ` [PATCH bpf-next v2 4/4] resolve_btfids: change in-place update with raw binary output kernel test robot
2025-12-16 20:41   ` Ihor Solodrai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox