about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dlfcn.h5
-rw-r--r--include/link.h11
2 files changed, 14 insertions, 2 deletions
diff --git a/include/dlfcn.h b/include/dlfcn.h
index 8a2f50bb57..d6111c0e76 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -8,6 +8,8 @@
 #define __RTLD_OPENEXEC	0x20000000
 #define __RTLD_CALLMAP	0x10000000
 
+#define __LM_ID_CALLER	-2
+
 /* Now define the internal interfaces.  */
 extern void *__dlvsym (void *__handle, __const char *__name,
 		       __const char *__version);
@@ -31,7 +33,8 @@ libc_hidden_proto (_dl_addr)
 /* Open the shared object NAME, relocate it, and run its initializer if it
    hasn't already been run.  MODE is as for `dlopen' (see <dlfcn.h>).  If
    the object is already opened, returns its existing map.  */
-extern void *_dl_open (const char *name, int mode, const void *caller)
+extern void *_dl_open (const char *name, int mode, const void *caller,
+		       Lmid_t nsid)
      internal_function;
 libc_hidden_proto (_dl_open)
 
diff --git a/include/link.h b/include/link.h
index 1567c67c54..3078b72a87 100644
--- a/include/link.h
+++ b/include/link.h
@@ -129,6 +129,14 @@ struct link_map
     /* All following members are internal to the dynamic linker.
        They may change without notice.  */
 
+    /* This is an element which is only ever different from a pointer to
+       the very same copy of this type for ld.so when it is used in more
+       than one namespace.  */
+    struct link_map *l_real;
+
+    /* Number of the namespace this link map belongs to.  */
+    Lmid_t l_ns;
+
     struct libname_list *l_libname;
     /* Indexed pointers to dynamic section.
        [0,DT_NUM) are indexed by the processor-independent tags.
@@ -169,7 +177,8 @@ struct link_map
     Elf_Symndx l_nbuckets;
     const Elf_Symndx *l_buckets, *l_chain;
 
-    unsigned int l_opencount;	/* Reference count for dlopen/dlclose.  */
+    unsigned int l_opencount;	/* Counter for direct and indirect usage.  */
+    unsigned int l_direct_opencount; /* Reference count for dlopen/dlclose.  */
     enum			/* Where this object came from.  */
       {
 	lt_executable,		/* The main executable program.  */