ld.lld: error: undefined symbol: __bad_xchg

From: kernel test robot

Date: Tue Mar 24 2026 - 03:39:36 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c369299895a591d96745d6492d4888259b004a9e
commit: 5dbc0a692459bc49cdb7add281086291da547750 rust: helpers: Add i8/i16 atomic xchg helpers
date: 2 months ago
config: arm-randconfig-r064-20260324 (https://download.01.org/0day-ci/archive/20260324/202603241515.r4UkDrTF-lkp@xxxxxxxxx/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 054e11d1a17e5ba88bb1a8ef32fad3346e80b186)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260324/202603241515.r4UkDrTF-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603241515.r4UkDrTF-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> ld.lld: error: undefined symbol: __bad_xchg
>>> referenced by helpers.c
>>> rust/helpers/helpers.o:(rust_helper_atomic_i8_xchg) in archive vmlinux.a
>>> referenced by helpers.c
>>> rust/helpers/helpers.o:(rust_helper_atomic_i16_xchg) in archive vmlinux.a

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