about summary refs log tree commit diff
path: root/dlfcn/dlmopen.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /dlfcn/dlmopen.c
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'dlfcn/dlmopen.c')
-rw-r--r--dlfcn/dlmopen.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/dlfcn/dlmopen.c b/dlfcn/dlmopen.c
index 0c6915493b..5fd6543655 100644
--- a/dlfcn/dlmopen.c
+++ b/dlfcn/dlmopen.c
@@ -1,5 +1,5 @@
 /* Load a shared object at run time.
-   Copyright (C) 1995-2000,2003,2004,2006 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
@@ -21,7 +21,6 @@
 #include <errno.h>
 #include <libintl.h>
 #include <stddef.h>
-#include <unistd.h>
 #include <ldsodefs.h>
 
 #if !defined SHARED && defined IS_IN_libdl
@@ -55,24 +54,15 @@ dlmopen_doit (void *a)
 
   /* Non-shared code has no support for multiple namespaces.  */
   if (args->nsid != LM_ID_BASE)
-    {
 # ifdef SHARED
-      /* If trying to open the link map for the main executable the namespace
-	 must be the main one.  */
-      if (args->file == NULL)
+    /* If trying to open the link map for the main executable the namespace
+       must be the main one.  */
+    if (args->file == NULL)
 # endif
-	GLRO(dl_signal_error) (EINVAL, NULL, NULL, N_("invalid namespace"));
-
-      /* It makes no sense to use RTLD_GLOBAL when loading a DSO into
-	 a namespace other than the base namespace.  */
-      if (__builtin_expect (args->mode & RTLD_GLOBAL, 0))
-	GLRO(dl_signal_error) (EINVAL, NULL, NULL, N_("invalid mode"));
-    }
-
-  args->new = GLRO(dl_open) (args->file ?: "", args->mode | __RTLD_DLOPEN,
-			     args->caller,
-			     args->nsid, __dlfcn_argc, __dlfcn_argv,
-			     __environ);
+      GLRO(dl_signal_error) (EINVAL, NULL, NULL, N_("invalid namespace"));
+
+  args->new = _dl_open (args->file ?: "", args->mode | __RTLD_DLOPEN,
+			args->caller, args->nsid);
 }