[libc-commits] [libc] [libc] implement vdso (PR #91572)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Fri May 31 10:25:01 PDT 2024


================
@@ -0,0 +1,64 @@
+//===---------- RISC-V vdso configuration -------------------------* C++ *-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+#ifndef LLVM_LIBC_SRC___SUPPORT_OSUTIL_LINUX_RISCV_VDSO_H
+#define LLVM_LIBC_SRC___SUPPORT_OSUTIL_LINUX_RISCV_VDSO_H
+#include "src/__support/CPP/string_view.h"
+namespace LIBC_NAMESPACE {
+namespace vdso {
+// macro definitions
+// following the order in
+// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/riscv/kernel/vdso/vdso.lds.S
----------------
nickdesaulniers wrote:

Reading the kernel sources it, it seems like:
- __vdso_gettimeofday
- __vdso_clock_gettime
- __vdso_clock_getres
- __vdso_riscv_hwprobe

are all optional, with the last being dependent on the kernel configuration.  Does that change what we need to do to detect support for these symbols in the vdso?

https://github.com/llvm/llvm-project/pull/91572


More information about the libc-commits mailing list