Commit 971fe509 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Thomas Bogendoerfer

MIPS: VDSO: Conditionally export __vdso_gettimeofday()

ld.lld 16.0.0 and newer defaults to '--no-undefined-version', which
causes the following error when CONFIG_MIPS_CLOCK_VSYSCALL is not set:

  ld.lld: error: version script assignment of 'LINUX_2.6' to symbol '__vdso_gettimeofday' failed: symbol not defined

Only export __vdso_gettimeofday() when it will be present in the final
object file, which clears up the error.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308170532.zxFFv25c-lkp@intel.com/Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Reviewed-by: default avatarFangrui Song <maskray@google.com>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent ed07f6c2
...@@ -94,7 +94,9 @@ VERSION ...@@ -94,7 +94,9 @@ VERSION
#ifndef CONFIG_MIPS_DISABLE_VDSO #ifndef CONFIG_MIPS_DISABLE_VDSO
global: global:
__vdso_clock_gettime; __vdso_clock_gettime;
#ifdef CONFIG_MIPS_CLOCK_VSYSCALL
__vdso_gettimeofday; __vdso_gettimeofday;
#endif
__vdso_clock_getres; __vdso_clock_getres;
#if _MIPS_SIM != _MIPS_SIM_ABI64 #if _MIPS_SIM != _MIPS_SIM_ABI64
__vdso_clock_gettime64; __vdso_clock_gettime64;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment