about summary refs log tree commit diff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index ea31417bda..0bfa74a25e 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -2197,6 +2197,7 @@ _dl_map_object (struct link_map *loader, const char *name,
 			&loader->l_runpath_dirs, &realname, &fb, loader,
 			LA_SER_RUNPATH, &found_other_class);
 
+#ifdef USE_LDCONFIG
       if (fd == -1
 	  && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
 	      || ! INTUSE(__libc_enable_secure))
@@ -2208,22 +2209,22 @@ _dl_map_object (struct link_map *loader, const char *name,
 
 	  if (cached != NULL)
 	    {
-#ifdef SHARED
+# ifdef SHARED
 	      // XXX Correct to unconditionally default to namespace 0?
 	      l = (loader
 		   ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded
 		   ?: &GL(dl_rtld_map));
-#else
+# else
 	      l = loader;
-#endif
+# endif
 
 	      /* If the loader has the DF_1_NODEFLIB flag set we must not
 		 use a cache entry from any of these directories.  */
 	      if (
-#ifndef SHARED
+# ifndef SHARED
 		  /* 'l' is always != NULL for dynamically linked objects.  */
 		  l != NULL &&
-#endif
+# endif
 		  __builtin_expect (l->l_flags_1 & DF_1_NODEFLIB, 0))
 		{
 		  const char *dirp = system_dirs;
@@ -2261,6 +2262,7 @@ _dl_map_object (struct link_map *loader, const char *name,
 		}
 	    }
 	}
+#endif
 
       /* Finally, try the default path.  */
       if (fd == -1