Blame sysdeps/unix/sysv/linux/dl-vdso.h

Packit 6c4009
/* ELF symbol resolve functions for VDSO objects.
Packit 6c4009
   Copyright (C) 2005-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _DL_VDSO_H
Packit 6c4009
#define _DL_VDSO_H	1
Packit 6c4009
Packit 6c4009
#include <assert.h>
Packit 6c4009
#include <ldsodefs.h>
Packit 6c4009
#include <dl-hash.h>
Packit 6c4009
Packit 6c4009
/* Create version number record for lookup.  */
Packit 6c4009
#define PREPARE_VERSION(var, vname, vhash) \
Packit 6c4009
  struct r_found_version var;						      \
Packit 6c4009
  var.name = vname;							      \
Packit 6c4009
  var.hidden = 1;							      \
Packit 6c4009
  var.hash = vhash;							      \
Packit 6c4009
  assert (var.hash == _dl_elf_hash (var.name));				      \
Packit 6c4009
  /* We don't have a specific file where the symbol can be found.  */	      \
Packit 6c4009
  var.filename = NULL
Packit 6c4009
Packit 6c4009
/* Use this for the known version sets defined below, where we
Packit 6c4009
   record their precomputed hash values only once, in this file.  */
Packit 6c4009
#define PREPARE_VERSION_KNOWN(var, vname) \
Packit 6c4009
  PREPARE_VERSION (var, VDSO_NAME_##vname, VDSO_HASH_##vname)
Packit 6c4009
Packit 6c4009
#define VDSO_NAME_LINUX_2_6	"LINUX_2.6"
Packit 6c4009
#define VDSO_HASH_LINUX_2_6	61765110
Packit 6c4009
#define VDSO_NAME_LINUX_2_6_15	"LINUX_2.6.15"
Packit 6c4009
#define VDSO_HASH_LINUX_2_6_15	123718565
Packit 6c4009
#define VDSO_NAME_LINUX_2_6_29	"LINUX_2.6.29"
Packit 6c4009
#define VDSO_HASH_LINUX_2_6_29	123718585
Packit 6c4009
#define VDSO_NAME_LINUX_4_15	"LINUX_4.15"
Packit 6c4009
#define VDSO_HASH_LINUX_4_15	182943605
Packit 6c4009
Packit 6c4009
/* Functions for resolving symbols in the VDSO link map.  */
Packit 6c4009
extern void *_dl_vdso_vsym (const char *name,
Packit 6c4009
			    const struct r_found_version *version)
Packit 6c4009
      attribute_hidden;
Packit 6c4009
Packit 6c4009
#endif /* dl-vdso.h */