ld.lld: error: init/built-in.a(do_mounts_rd.o):(function ext2_image_size: .text+0x3e): relocation R_RISCV_HI20 out of range: 527059 is not in [-524288, 524287]; references .L__unnamed_3

kernel test robot
2022-02-10T06:48:34Z

CC: linux-kernel@vger.kernel.org
TO: Paul Moore <paul@paul-moore.com>
CC: Richard Guy Briggs <rgb@redhat.com>

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f4bc5bbb5fef3cf421ba3485d6d383c27ec473ed
commit: f26d04331360d42dbd6b58448bd98e4edbfbe1c5 audit: improve audit queue handling when "audit=1" on cmdline
date: 2 weeks ago
config: riscv-randconfig-r031-20220210 (https://download.01.org/0day-ci/archive/20220210/202202101425.397JTyCS-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project aa845d7a245d85c441d0bd44fc7b6c3be8f3de8d)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f26d04331360d42dbd6b58448bd98e4edbfbe1c5
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f26d04331360d42dbd6b58448bd98e4edbfbe1c5
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> ld.lld: error: init/built-in.a(do_mounts_rd.o):(function ext2_image_size: .text+0x3e): relocation R_RISCV_HI20 out of range: 527059 is not in [-524288, 524287]; references .L__unnamed_3
>>> referenced by do_mounts_rd.c
>>> defined in init/built-in.a(do_mounts_rd.o)

---
0-DAY CI Kernel Test Service, Intel Corporation