Skip to content

Commit

Permalink
RISC-V: fix vDSO getcpu
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hack3ric committed Dec 15, 2024
1 parent 74bcc35 commit 5af7044
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/linux_raw/vdso_wrappers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

Expand Down

0 comments on commit 5af7044

Please sign in to comment.