From 5af7044693c80fac2f8f3047b1cbe35ff1dcdbc9 Mon Sep 17 00:00:00 2001 From: Eric Long Date: Sun, 15 Dec 2024 11:17:15 +0800 Subject: [PATCH] RISC-V: fix vDSO getcpu The name should be `__vdso_getcpu`, not `__kernel_getcpu` according to both the manpage [0] and real RISC-V hardware. [0]: https://man7.org/linux/man-pages/man7/vdso.7.html --- src/backend/linux_raw/vdso_wrappers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/linux_raw/vdso_wrappers.rs b/src/backend/linux_raw/vdso_wrappers.rs index 00ed694f6..ce1facfaf 100644 --- a/src/backend/linux_raw/vdso_wrappers.rs +++ b/src/backend/linux_raw/vdso_wrappers.rs @@ -554,7 +554,7 @@ fn init() { #[cfg(target_arch = "x86")] let ptr = vdso.sym(cstr!("LINUX_2.6"), cstr!("__vdso_getcpu")); #[cfg(target_arch = "riscv64")] - let ptr = vdso.sym(cstr!("LINUX_4.15"), cstr!("__kernel_getcpu")); + let ptr = vdso.sym(cstr!("LINUX_4.15"), cstr!("__vdso_getcpu")); #[cfg(target_arch = "powerpc64")] let ptr = vdso.sym(cstr!("LINUX_2.6.15"), cstr!("__kernel_getcpu"));