Blame bits/dlfcn.h

Packit Service 82fcde
/* System dependent definitions for run-time dynamic loading.
Packit Service 82fcde
   Copyright (C) 1996-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
   modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
   License as published by the Free Software Foundation; either
Packit Service 82fcde
   version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
   Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
   License along with the GNU C Library; if not, see
Packit Service 82fcde
   <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 82fcde
#ifndef _DLFCN_H
Packit Service 82fcde
# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
Packit Service 82fcde
#endif
Packit Service 82fcde
Packit Service 82fcde
/* The MODE argument to `dlopen' contains one of the following: */
Packit Service 82fcde
#define RTLD_LAZY	0x00001	/* Lazy function call binding.  */
Packit Service 82fcde
#define RTLD_NOW	0x00002	/* Immediate function call binding.  */
Packit Service 82fcde
#define	RTLD_BINDING_MASK   0x3	/* Mask of binding time value.  */
Packit Service 82fcde
#define RTLD_NOLOAD	0x00004	/* Do not load the object.  */
Packit Service 82fcde
#define RTLD_DEEPBIND	0x00008	/* Use deep binding.  */
Packit Service 82fcde
Packit Service 82fcde
/* If the following bit is set in the MODE argument to `dlopen',
Packit Service 82fcde
   the symbols of the loaded object and its dependencies are made
Packit Service 82fcde
   visible as if the object were linked directly into the program.  */
Packit Service 82fcde
#define RTLD_GLOBAL	0x00100
Packit Service 82fcde
Packit Service 82fcde
/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL.
Packit Service 82fcde
   The implementation does this by default and so we can define the
Packit Service 82fcde
   value to zero.  */
Packit Service 82fcde
#define RTLD_LOCAL	0
Packit Service 82fcde
Packit Service 82fcde
/* Do not delete object when closed.  */
Packit Service 82fcde
#define RTLD_NODELETE	0x01000
Packit Service 82fcde
Packit Service 82fcde
#ifdef __USE_GNU
Packit Service 82fcde
/* To support profiling of shared objects it is a good idea to call
Packit Service 82fcde
   the function found using `dlsym' using the following macro since
Packit Service 82fcde
   these calls do not use the PLT.  But this would mean the dynamic
Packit Service 82fcde
   loader has no chance to find out when the function is called.  The
Packit Service 82fcde
   macro applies the necessary magic so that profiling is possible.
Packit Service 82fcde
   Rewrite
Packit Service 82fcde
	foo = (*fctp) (arg1, arg2);
Packit Service 82fcde
   into
Packit Service 82fcde
        foo = DL_CALL_FCT (fctp, (arg1, arg2));
Packit Service 82fcde
*/
Packit Service 82fcde
# define DL_CALL_FCT(fctp, args) \
Packit Service 82fcde
  (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
Packit Service 82fcde
Packit Service 82fcde
__BEGIN_DECLS
Packit Service 82fcde
Packit Service 82fcde
/* This function calls the profiling functions.  */
Packit Service 82fcde
extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
Packit Service 82fcde
Packit Service 82fcde
__END_DECLS
Packit Service 82fcde
Packit Service 82fcde
#endif