brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 3de5860 Raw
38 lines · c
1//===---------- arm 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_ARM_VDSO_H9#define LLVM_LIBC_SRC___SUPPORT_OSUTIL_LINUX_ARM_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/arm/vdso/vdso.lds.S16LIBC_INLINE constexpr cpp::string_view symbol_name(VDSOSym sym) {17  switch (sym) {18  case VDSOSym::ClockGetTime:19    return "__vdso_clock_gettime";20  case VDSOSym::GetTimeOfDay:21    return "__vdso_gettimeofday";22  case VDSOSym::ClockGetRes:23    return "__vdso_clock_getres";24  case VDSOSym::ClockGetTime64:25    return "__vdso_clock_gettime64";26  default:27    return "";28  }29}30 31// symbol versions32LIBC_INLINE constexpr cpp::string_view symbol_version(VDSOSym) {33  return "LINUX_2.6";34}35} // namespace vdso36} // namespace LIBC_NAMESPACE_DECL37#endif // LLVM_LIBC_SRC___SUPPORT_OSUTIL_LINUX_ARM_VDSO_H38