patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: VDSO: Conditionally export __vdso_gettimeofday()
@ 2023-08-16 21:59 Nathan Chancellor
  2023-08-16 22:14 ` Fangrui Song
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Nathan Chancellor @ 2023-08-16 21:59 UTC (permalink / raw)
  To: tsbogend; +Cc: linux-mips, llvm, patches, kernel test robot, Nathan Chancellor

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>
---
 arch/mips/vdso/vdso.lds.S | 2 ++
 1 file changed, 2 insertions(+)

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;

---
base-commit: 2ccdd1b13c591d306f0401d98dedc4bdcd02b421
change-id: 20230816-mips-vdso-cond-export-__vdso_gettimeofday-30ab92c716d4

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-23  8:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16 21:59 [PATCH] MIPS: VDSO: Conditionally export __vdso_gettimeofday() Nathan Chancellor
2023-08-16 22:14 ` Fangrui Song
2023-08-16 22:41 ` Nick Desaulniers
2023-08-17  7:29 ` Philippe Mathieu-Daudé
2023-08-23  7:22 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).