40 lines · c
1//===---------- aarch64 vdso configuration ------------------------* C++ *-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8#ifndef LLVM_LIBC_SRC___SUPPORT_OSUTIL_LINUX_AARCH64_VDSO_H9#define LLVM_LIBC_SRC___SUPPORT_OSUTIL_LINUX_AARCH64_VDSO_H10#include "src/__support/CPP/string_view.h"11#include "src/__support/OSUtil/linux/vdso_sym.h"12namespace LIBC_NAMESPACE_DECL {13namespace vdso {14// translate VDSOSym to symbol names15// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/kernel/vdso/vdso.lds.S16LIBC_INLINE constexpr cpp::string_view symbol_name(VDSOSym sym) {17 switch (sym) {18 case VDSOSym::RTSigReturn:19 return "__kernel_rt_sigreturn";20 case VDSOSym::GetTimeOfDay:21 return "__kernel_gettimeofday";22 case VDSOSym::ClockGetTime:23 return "__kernel_clock_gettime";24 case VDSOSym::ClockGetRes:25 return "__kernel_clock_getres";26 case VDSOSym::GetRandom:27 return "__kernel_getrandom";28 default:29 return "";30 }31}32 33// symbol versions34LIBC_INLINE constexpr cpp::string_view symbol_version(VDSOSym) {35 return "LINUX_2.6.39";36}37} // namespace vdso38} // namespace LIBC_NAMESPACE_DECL39#endif // LLVM_LIBC_SRC___SUPPORT_OSUTIL_LINUX_AARCH64_VDSO_H40