summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/bits/dlfcn.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-08-24 00:15:09 +0000
committerMike Frysinger <vapier@gentoo.org>2006-08-24 00:15:09 +0000
commit64085a723ae341524e35b1b7cb13bfe0bd4794dc (patch)
treed4311a0b9460b08731a9c68110158e99787405a4 /libc/sysdeps/linux/common/bits/dlfcn.h
parent7320e0ffac2dd65a911fd6bdc8f65c1467eede5e (diff)
sync with upstream via psm
Diffstat (limited to 'libc/sysdeps/linux/common/bits/dlfcn.h')
-rw-r--r--libc/sysdeps/linux/common/bits/dlfcn.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/bits/dlfcn.h b/libc/sysdeps/linux/common/bits/dlfcn.h
index 75122a98a..f68849843 100644
--- a/libc/sysdeps/linux/common/bits/dlfcn.h
+++ b/libc/sysdeps/linux/common/bits/dlfcn.h
@@ -1,5 +1,5 @@
/* System dependent definitions for run-time dynamic loading.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,6 +26,7 @@
#define RTLD_NOW 0x00002 /* Immediate function call binding. */
#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
#define RTLD_NOLOAD 0x00004 /* Do not load the object. */
+#define RTLD_DEEPBIND 0x00008 /* Use deep binding. */
/* If the following bit is set in the MODE argument to `dlopen',
the symbols of the loaded object and its dependencies are made
@@ -40,3 +41,25 @@
/* Do not delete object when closed. */
#define RTLD_NODELETE 0x01000
+#if 0 /*def __USE_GNU*/
+/* To support profiling of shared objects it is a good idea to call
+ the function found using `dlsym' using the following macro since
+ these calls do not use the PLT. But this would mean the dynamic
+ loader has no chance to find out when the function is called. The
+ macro applies the necessary magic so that profiling is possible.
+ Rewrite
+ foo = (*fctp) (arg1, arg2);
+ into
+ foo = DL_CALL_FCT (fctp, (arg1, arg2));
+*/
+# define DL_CALL_FCT(fctp, args) \
+ (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
+
+__BEGIN_DECLS
+
+/* This function calls the profiling functions. */
+extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
+
+__END_DECLS
+
+#endif