From 971fe5095f78b6475c88270aa4b6ee77a791cf25 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Wed, 16 Aug 2023 14:59:23 -0700 Subject: MIPS: VDSO: Conditionally export __vdso_gettimeofday() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202308170532.zxFFv25c-lkp@intel.com/ Signed-off-by: Nathan Chancellor Reviewed-by: Fangrui Song Reviewed-by: Nick Desaulniers Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer --- arch/mips/vdso/vdso.lds.S | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/mips') diff --git a/arch/mips/vdso/vdso.lds.S b/arch/mips/vdso/vdso.lds.S index d90b65724d78..836465e3bcb8 100644 --- a/arch/mips/vdso/vdso.lds.S +++ b/arch/mips/vdso/vdso.lds.S @@ -94,7 +94,9 @@ VERSION #ifndef CONFIG_MIPS_DISABLE_VDSO global: __vdso_clock_gettime; +#ifdef CONFIG_MIPS_CLOCK_VSYSCALL __vdso_gettimeofday; +#endif __vdso_clock_getres; #if _MIPS_SIM != _MIPS_SIM_ABI64 __vdso_clock_gettime64; -- cgit v1.2.3