ld.lld: error: undefined symbol: __ubsan_handle_load_invalid_value

From: kernel test robot
Date: Mon Dec 28 2020 - 05:30:18 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5c8fe583cce542aa0b84adc939ce85293de36e5e
commit: c637693b20da8706b7f48d96882c9c80ae935151 ubsan: remove UBSAN_MISC in favor of individual options
date: 12 days ago
config: mips-randconfig-r005-20201227 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cee1e7d14f4628d6174b33640d502bff3b54ae45)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c637693b20da8706b7f48d96882c9c80ae935151
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout c637693b20da8706b7f48d96882c9c80ae935151
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

>> WARNING: modpost: vmlinux.o(.text+0x27da8): Section mismatch in reference from the function r4k_cache_init() to the function .init.text:loongson2_sc_init()
The function r4k_cache_init() references
the function __init loongson2_sc_init().
This is often because r4k_cache_init lacks a __init
annotation or the annotation of loongson2_sc_init is wrong.
--
>> ld.lld: error: undefined symbol: __ubsan_handle_load_invalid_value
>>> referenced by decompress.c
>>> arch/mips/boot/compressed/decompress.o:(decompress_kernel)
>>> referenced by decompress.c
>>> arch/mips/boot/compressed/decompress.o:(xz_dec_lzma2_run)
>>> referenced by decompress.c
>>> arch/mips/boot/compressed/decompress.o:(xz_dec_lzma2_run)
--
>> ld.lld: error: undefined symbol: __ubsan_handle_out_of_bounds
>>> referenced by decompress.c
>>> arch/mips/boot/compressed/decompress.o:(dec_main)
>>> referenced by decompress.c
>>> arch/mips/boot/compressed/decompress.o:(dec_main)
>>> referenced by decompress.c
>>> arch/mips/boot/compressed/decompress.o:(dec_main)
>>> referenced 19 more times
--
>> ld.lld: error: undefined symbol: __ubsan_handle_shift_out_of_bounds
>>> referenced by decompress.c
>>> arch/mips/boot/compressed/decompress.o:(crc32_validate)
>>> referenced by decompress.c
>>> arch/mips/boot/compressed/decompress.o:(dec_vli)
>>> referenced by decompress.c
>>> arch/mips/boot/compressed/decompress.o:(xz_dec_lzma2_run)
>>> referenced 9 more times

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip