diff options
author | Roland McGrath <roland@hack.frob.com> | 2012-10-03 16:13:14 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2012-10-03 16:13:14 -0700 |
commit | f57f805541562734a40088b8be93e3bc9e86be54 (patch) | |
tree | 8137253002dda45425068fef98c9b7649825c3fb /elf/dl-load.c | |
parent | 8f565a27edb9908e237cbb77c8ffc7824f579f15 (diff) | |
download | glibc-f57f805541562734a40088b8be93e3bc9e86be54.tar.gz glibc-f57f805541562734a40088b8be93e3bc9e86be54.tar.xz glibc-f57f805541562734a40088b8be93e3bc9e86be54.zip |
Clean up conditionalize of ld.so.cache support.
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r-- | elf/dl-load.c | 12 |
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 |