[PATCH 1/2] riscv: vdso: Do not use LTO for the vDSO
Paul Walmsley
pjw at kernel.org
Mon Jul 13 11:14:53 PDT 2026
On Wed, 1 Jul 2026, Thomas Weißschuh wrote:
> 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 at 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 at vger.kernel.org
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
Thanks, queued for v7.2-rc.
- Paul
More information about the linux-riscv
mailing list