From d4c38b52614fa7e82266ea0076a47c1a8c5c2d72 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 29 Jan 2002 04:37:21 +0000 Subject: [PATCH] (_dl_map_object): Remove incorrect optimization for SHARED code. --- elf/dl-load.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/elf/dl-load.c b/elf/dl-load.c index 0bc01eca206..b4affadfe1b 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1748,14 +1748,8 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded, /* Finally, try the default path. */ if (fd == -1 - && ((l = loader ?: _dl_loaded) - /* 'l' is always != NULL for dynamically linked objects. */ -#ifdef SHARED - , -#else - == NULL || -#endif - __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) + && ((l = loader ?: _dl_loaded) == NULL + || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) && rtld_search_dirs.dirs != (void *) -1) fd = open_path (name, namelen, preloaded, &rtld_search_dirs, &realname, &fb); -- 2.47.2