about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2019-09-18 08:41:59 -0700
committerAlistair Francis <alistair.francis@wdc.com>2020-04-25 19:16:11 -0700
commit85c5dc3d683952afbdf818ae33ff8d5e36cc6247 (patch)
treef3b1b1c34c78106b96f7dcbfbc2b07df4453e04e
parent10e80de0a49b57097eb02c8a98051617a82117f8 (diff)
downloadglibc-85c5dc3d683952afbdf818ae33ff8d5e36cc6247.tar.gz
glibc-85c5dc3d683952afbdf818ae33ff8d5e36cc6247.tar.xz
glibc-85c5dc3d683952afbdf818ae33ff8d5e36cc6247.zip
RISC-V: Add support for 32-bit vDSO calls
-rw-r--r--sysdeps/unix/sysv/linux/riscv/sysdep.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h
index aa61e8b04d..9f6ed2001b 100644
--- a/sysdeps/unix/sysv/linux/riscv/sysdep.h
+++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h
@@ -182,14 +182,21 @@
 
 #ifndef __ASSEMBLER__
 
-# define VDSO_NAME  "LINUX_4.15"
-# define VDSO_HASH  182943605
+# if __riscv_xlen == 32
+#  define VDSO_NAME  "LINUX_5.4"
+#  define VDSO_HASH  61765876
 
 /* List of system calls which are supported as vsyscalls.  */
-# define HAVE_CLOCK_GETRES64_VSYSCALL	"__vdso_clock_getres"
-# define HAVE_CLOCK_GETTIME64_VSYSCALL	"__vdso_clock_gettime"
-# define HAVE_GETTIMEOFDAY_VSYSCALL	"__vdso_gettimeofday"
-# define HAVE_GETCPU_VSYSCALL		"__vdso_getcpu"
+# else
+#  define VDSO_NAME  "LINUX_4.15"
+#  define VDSO_HASH  182943605
+
+/* List of system calls which are supported as vsyscalls.  */
+#  define HAVE_CLOCK_GETRES64_VSYSCALL   "__vdso_clock_getres"
+#  define HAVE_CLOCK_GETTIME64_VSYSCALL  "__vdso_clock_gettime"
+#  define HAVE_GETTIMEOFDAY_VSYSCALL     "__vdso_gettimeofday"
+#  define HAVE_GETCPU_VSYSCALL           "__vdso_getcpu"
+# endif
 
 # define INTERNAL_SYSCALL(name, nr, args...) \
 	internal_syscall##nr (SYS_ify (name), args)