]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - dlfcn/dlopen.c
[BZ #77]
[thirdparty/glibc.git] / dlfcn / dlopen.c
index 4ebfb0c5b40155df9a42323514f94f3ffcbbed95..cfd79635450241cac7bf859e4b58040704d1deb2 100644 (file)
@@ -1,5 +1,5 @@
 /* Load a shared object at run time.
-   Copyright (C) 1995,96,97,98,99,2000,2003 Free Software Foundation, Inc.
+   Copyright (C) 1995,96,97,98,99,2000,2003,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
@@ -31,13 +31,22 @@ struct dlopen_args
   const void *caller;
 };
 
+
+/* Non-shared code has no support for multiple namespaces.  */
+#ifdef SHARED
+# define NS __LM_ID_CALLER
+#else
+# define NS LM_ID_BASE
+#endif
+
+
 static void
 dlopen_doit (void *a)
 {
   struct dlopen_args *args = (struct dlopen_args *) a;
 
   args->new = _dl_open (args->file ?: "", args->mode | __RTLD_DLOPEN,
-                       args->caller);
+                       args->caller, args->file == NULL ? LM_ID_BASE : NS);
 }