Back to index

glibc  2.9
dl-vdso.h
Go to the documentation of this file.
00001 /* ELF symbol resolve functions for VDSO objects.
00002    Copyright (C) 2005, 2007 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef _DL_VDSO_H
00021 #define _DL_VDSO_H   1
00022 
00023 #include <assert.h>
00024 #include <ldsodefs.h>
00025 
00026 #ifdef NDEBUG
00027 # define CHECK_HASH(var) do {} while (0)
00028 #else
00029 # include <dl-hash.h>
00030 # define CHECK_HASH(var) assert (var.hash == _dl_elf_hash (var.name))
00031 #endif
00032 
00033 /* Create version number record for lookup.  */
00034 #define PREPARE_VERSION(var, vname, vhash) \
00035   struct r_found_version var;                                               \
00036   var.name = vname;                                                  \
00037   var.hidden = 1;                                                    \
00038   var.hash = vhash;                                                  \
00039   CHECK_HASH (var);                                                  \
00040   /* We don't have a specific file where the symbol can be found.  */       \
00041   var.filename = NULL
00042 
00043 
00044 /* Functions for resolving symbols in the VDSO link map.  */
00045 extern void *_dl_vdso_vsym (const char *name,
00046                          const struct r_found_version *version)
00047      internal_function attribute_hidden;
00048 
00049 #endif /* dl-vdso.h */