]> exis.tech > repos - linux.git/commit
riscv: vdso: Do not use LTO for the vDSO
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Wed, 1 Jul 2026 09:21:22 +0000 (11:21 +0200)
committerPaul Walmsley <pjw@kernel.org>
Mon, 13 Jul 2026 18:08:27 +0000 (12:08 -0600)
commitad6dcfa023762e37962f77ee48e752b7570e9440
tree0ac38cd6f3c8cd3f25f5e304a50bd08728b1a264
parent6dc3934152d1cc48b0395264d0061ebb4aed359e
riscv: vdso: Do not use LTO for the vDSO

With LTO enabled the compiler assumes that the vDSO functions are not
used and optimizes them away completely. Currently this happens to
__vdso_clock_getres(), __vdso_clock_gettime(), __vdso_getrandom(),
__vdso_gettimeofday() and __vdso_riscv_hwprobe().

Disable LTO for the vDSO, as these functions are hand-optimized anyways.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606301855.WvkSC4kD-lkp@intel.com/
Fixes: 021d23428bdb ("RISC-V: build: Allow LTO to be selected")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20260701-riscv-vdso-lto-v1-1-89db0cd82077@linutronix.de
Signed-off-by: Paul Walmsley <pjw@kernel.org>
arch/riscv/kernel/vdso/Makefile