Skip to content

Commit 971fe50

Browse files
nathanchancetsbogend
authored andcommitted
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: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308170532.zxFFv25c-lkp@intel.com/ Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Fangrui Song <maskray@google.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent ed07f6c commit 971fe50

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/mips/vdso/vdso.lds.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ VERSION
9494
#ifndef CONFIG_MIPS_DISABLE_VDSO
9595
global:
9696
__vdso_clock_gettime;
97+
#ifdef CONFIG_MIPS_CLOCK_VSYSCALL
9798
__vdso_gettimeofday;
99+
#endif
98100
__vdso_clock_getres;
99101
#if _MIPS_SIM != _MIPS_SIM_ABI64
100102
__vdso_clock_gettime64;

0 commit comments

Comments
 (0)