2005-12-30 07:32:48 +00:00
|
|
|
/* ELF symbol resolve functions for VDSO objects.
|
2019-01-01 00:11:28 +00:00
|
|
|
Copyright (C) 2005-2019 Free Software Foundation, Inc.
|
2005-12-30 07:32:48 +00:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
License along with the GNU C Library; if not, see
|
Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
|
|
|
<https://www.gnu.org/licenses/>. */
|
2005-12-30 07:32:48 +00:00
|
|
|
|
|
|
|
#ifndef _DL_VDSO_H
|
|
|
|
#define _DL_VDSO_H 1
|
|
|
|
|
2007-08-12 19:33:45 +00:00
|
|
|
#include <assert.h>
|
|
|
|
#include <ldsodefs.h>
|
2012-05-22 21:24:54 +00:00
|
|
|
#include <dl-hash.h>
|
2007-08-12 19:33:45 +00:00
|
|
|
|
|
|
|
/* Create version number record for lookup. */
|
2019-06-28 11:46:00 +00:00
|
|
|
static inline struct r_found_version
|
|
|
|
prepare_version_base (const char *name, ElfW(Word) hash)
|
|
|
|
{
|
|
|
|
assert (hash == _dl_elf_hash (name));
|
|
|
|
return (struct r_found_version) { name, hash, 1, NULL };
|
|
|
|
}
|
|
|
|
#define prepare_version(vname) \
|
|
|
|
prepare_version_base (VDSO_NAME_##vname, VDSO_HASH_##vname)
|
2007-08-12 19:33:45 +00:00
|
|
|
|
2012-05-22 23:00:50 +00:00
|
|
|
/* Use this for the known version sets defined below, where we
|
|
|
|
record their precomputed hash values only once, in this file. */
|
|
|
|
#define PREPARE_VERSION_KNOWN(var, vname) \
|
2019-06-28 11:46:00 +00:00
|
|
|
struct r_found_version var = prepare_version (vname);
|
2012-05-22 23:00:50 +00:00
|
|
|
|
|
|
|
#define VDSO_NAME_LINUX_2_6 "LINUX_2.6"
|
|
|
|
#define VDSO_HASH_LINUX_2_6 61765110
|
|
|
|
#define VDSO_NAME_LINUX_2_6_15 "LINUX_2.6.15"
|
|
|
|
#define VDSO_HASH_LINUX_2_6_15 123718565
|
|
|
|
#define VDSO_NAME_LINUX_2_6_29 "LINUX_2.6.29"
|
|
|
|
#define VDSO_HASH_LINUX_2_6_29 123718585
|
2019-06-21 13:36:52 +00:00
|
|
|
#define VDSO_NAME_LINUX_2_6_39 "LINUX_2.6.39"
|
|
|
|
#define VDSO_HASH_LINUX_2_6_39 123718537
|
2019-07-08 18:56:43 +00:00
|
|
|
#define VDSO_NAME_LINUX_4 "LINUX_4"
|
|
|
|
#define VDSO_HASH_LINUX_4 14921332
|
2019-06-21 13:36:52 +00:00
|
|
|
#define VDSO_NAME_LINUX_4_9 "LINUX_4.9"
|
|
|
|
#define VDSO_HASH_LINUX_4_9 61765625
|
2017-12-27 04:52:42 +00:00
|
|
|
#define VDSO_NAME_LINUX_4_15 "LINUX_4.15"
|
|
|
|
#define VDSO_HASH_LINUX_4_15 182943605
|
2007-08-12 19:33:45 +00:00
|
|
|
|
2005-12-30 07:32:48 +00:00
|
|
|
/* Functions for resolving symbols in the VDSO link map. */
|
2007-08-12 19:33:45 +00:00
|
|
|
extern void *_dl_vdso_vsym (const char *name,
|
|
|
|
const struct r_found_version *version)
|
2017-08-31 14:59:37 +00:00
|
|
|
attribute_hidden;
|
2005-12-30 07:32:48 +00:00
|
|
|
|
|
|
|
#endif /* dl-vdso.h */
|