summary refs log tree commit diff
path: root/elf/dl-open.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-open.c')
-rw-r--r--elf/dl-open.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 5149e578b1..9c39a34a4b 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -189,9 +189,11 @@ dl_open_worker (void *a)
     {
       const void *caller_dlopen = args->caller_dlopen;
 
+#ifdef SHARED
       /* We have to find out from which object the caller is calling.
 	 By default we assume this is the main application.  */
       call_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
+#endif
 
       struct link_map *l;
       for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)