[PATCH] riscv: vdso.lds.S: Do not export __vdso_getrandom in compat vDSO
Nathan Chancellor
nathan at kernel.org
Wed Apr 23 11:15:02 PDT 2025
ld.lld defaults to '--no-undefined-version', which causes the compat
vDSO to break after wiring up the vDSO getrandom() call because the
linker script between the two vDSO implementations.
ld.lld: error: version script assignment of 'LINUX_4.15' to symbol '__vdso_getrandom' failed: symbol not defined
Move the export of __vdso_getrandom() under the existing ifndef for the
compat vDSO so that it is only included for the 64-bit vDSO where it is
wired up.
Fixes: 89079520cef6 ("RISC-V: vDSO: Wire up getrandom() vDSO implementation")
Signed-off-by: Nathan Chancellor <nathan at kernel.org>
---
arch/riscv/kernel/vdso/vdso.lds.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/vdso/vdso.lds.S b/arch/riscv/kernel/vdso/vdso.lds.S
index abc69cda0445..dd8f0d128e4d 100644
--- a/arch/riscv/kernel/vdso/vdso.lds.S
+++ b/arch/riscv/kernel/vdso/vdso.lds.S
@@ -79,8 +79,8 @@ VERSION
__vdso_flush_icache;
#ifndef COMPAT_VDSO
__vdso_riscv_hwprobe;
-#endif
__vdso_getrandom;
+#endif
local: *;
};
}
---
base-commit: bafa451a96d0f1404aa1a5a267f78767a55fac71
change-id: 20250423-riscv-fix-compat_vdso-lld-e1b80b324d97
Best regards,
--
Nathan Chancellor <nathan at kernel.org>
More information about the linux-riscv
mailing list