about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-libc.c4
-rw-r--r--elf/dl-open.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/elf/dl-libc.c b/elf/dl-libc.c
index 913a516f37..93ee9b7736 100644
--- a/elf/dl-libc.c
+++ b/elf/dl-libc.c
@@ -76,10 +76,6 @@ do_dlopen (void *ptr)
   struct do_dlopen_args *args = (struct do_dlopen_args *) ptr;
   /* Open and relocate the shared object.  */
   args->map = _dl_open (args->name, RTLD_LAZY, NULL);
-
-#ifndef SHARED
-  DL_STATIC_INIT (args->map);
-#endif
 }
 
 static void
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 0170d1c0fb..b8d28f826f 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -430,6 +430,10 @@ _dl_open (const char *file, int mode, const void *caller)
       _dl_signal_error (errcode, objname, local_errstring);
     }
 
+#ifndef SHARED
+  DL_STATIC_INIT (args.map);
+#endif
+
   return args.map;
 }