TO: Vincent Chen <vincent.chen(a)sifive.com>
CC: Palmer Dabbelt <palmerdabbelt(a)google.com>
CC: Atish Patra <atish.patra(a)wdc.com>
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git for-next
head: 5cc38fa6fc7448d40ff214d5c087f508355e8446
commit: 6e3cfcf6ea031fe2a0068fa7c380c4cf7bcd8936 [2/11] riscv: use vDSO common flow to
reduce the latency of the time-related functions
config: riscv-randconfig-r011-20200612 (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
3b43f006294971b8049d4807110032169780e5b8)
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
git checkout 6e3cfcf6ea031fe2a0068fa7c380c4cf7bcd8936
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
> arch/riscv/kernel/vdso/vgettimeofday.c:12:5: warning: no previous
prototype for function '__vdso_clock_gettime' [-Wmissing-prototypes]
int
__vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
^
arch/riscv/kernel/vdso/vgettimeofday.c:12:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
^
static
> arch/riscv/kernel/vdso/vgettimeofday.c:17:5: warning: no previous
prototype for function '__vdso_gettimeofday' [-Wmissing-prototypes]
int
__vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
^
arch/riscv/kernel/vdso/vgettimeofday.c:17:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
^
static
> arch/riscv/kernel/vdso/vgettimeofday.c:22:5: warning: no previous
prototype for function '__vdso_clock_getres' [-Wmissing-prototypes]
int
__vdso_clock_getres(clockid_t clock_id, struct __kernel_timespec *res)
^
arch/riscv/kernel/vdso/vgettimeofday.c:22:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
int __vdso_clock_getres(clockid_t clock_id, struct __kernel_timespec *res)
^
static
3 warnings generated.
--
clang-11: warning: argument unused during compilation: '-pg'
[-Wunused-command-line-argument]
clang-11: warning: argument unused during compilation: '-no-pie'
[-Wunused-command-line-argument]
/usr/bin/riscv64-linux-gnu-ld: arch/riscv/kernel/vdso/vgettimeofday.o: relocation
R_RISCV_HI20 against `a local symbol' can not be used when making a shared object;
recompile with -fPIC
> /usr/bin/riscv64-linux-gnu-ld: section .text LMA
[0000000000000800,0000000000001d4f] overlaps section .eh_frame LMA
[00000000000006f8,0000000000000823]
> /usr/bin/riscv64-linux-gnu-ld: section .rodata LMA
[0000000000000840,0000000000000b7f] overlaps section .text LMA
[0000000000000800,0000000000001d4f]
/usr/bin/riscv64-linux-gnu-ld:
arch/riscv/kernel/vdso/vdso.so.dbg.tmp: section .text lma 0x800 adjusted to 0x824
/usr/bin/riscv64-linux-gnu-ld: arch/riscv/kernel/vdso/vdso.so.dbg.tmp: section .rodata lma
0x840 adjusted to 0x1d74
/usr/bin/riscv64-linux-gnu-ld: arch/riscv/kernel/vdso/vdso.so.dbg.tmp: section .data lma
0x1d50 adjusted to 0x20b4
/usr/bin/riscv64-linux-gnu-ld: arch/riscv/kernel/vdso/vdso.so.dbg.tmp: section
_ftrace_annotated_branch lma 0x1f60 adjusted to 0x22c4
/usr/bin/riscv64-linux-gnu-ld: arch/riscv/kernel/vdso/vdso.so.dbg.tmp: section
_ftrace_branch lma 0x21a0 adjusted to 0x2504
/usr/bin/riscv64-linux-gnu-ld: arch/riscv/kernel/vdso/vdso.so.dbg.tmp: section
.init_array.1 lma 0x2288 adjusted to 0x25ec
/usr/bin/riscv64-linux-gnu-ld: arch/riscv/kernel/vdso/vdso.so.dbg.tmp: section
.fini_array.1 lma 0x2290 adjusted to 0x25f4
> clang-11: error: unable to execute command: Segmentation fault
> clang-11: error: linker command failed due to signal (use -v to see invocation)
vim +/__vdso_clock_gettime +12 arch/riscv/kernel/vdso/vgettimeofday.c
11
12 int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec
*ts)
13 {
14 return __cvdso_clock_gettime(clock, ts);
15 }
16
17 int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct
timezone *tz)
18 {
19 return __cvdso_gettimeofday(tv, tz);
20 }
21
22 int __vdso_clock_getres(clockid_t clock_id, struct
__kernel_timespec *res)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org