aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-01-29 04:37:30 +0000
committerUlrich Drepper <drepper@redhat.com>2002-01-29 04:37:30 +0000
commitdb2ebcef2428cb568315895f8fe3ef19d41735bc (patch)
tree27b57647d31c4d7f91aa2a2acde8c94101f3db75
parentb45b94573ae332c1e17e91d10531137a3c5c6abe (diff)
downloadglibc-db2ebcef2428cb568315895f8fe3ef19d41735bc.tar
glibc-db2ebcef2428cb568315895f8fe3ef19d41735bc.tar.gz
glibc-db2ebcef2428cb568315895f8fe3ef19d41735bc.tar.bz2
glibc-db2ebcef2428cb568315895f8fe3ef19d41735bc.zip
Update.
* elf/dl-load.c (_dl_map_object): Remove incorrect optimization for SHARED code. Reported by Ben Collins <bcollins@debian.org>.
-rw-r--r--ChangeLog3
-rw-r--r--elf/dl-load.c12
2 files changed, 6 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index fefa0ed08f..5577fb5ae8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2002-01-28 Ulrich Drepper <drepper@redhat.com>
+ * elf/dl-load.c (_dl_map_object): Remove incorrect optimization
+ for SHARED code. Reported by Ben Collins <bcollins@debian.org>.
+
* timezone/asia: Update from tzdata2002b.
* timezone/australasia: Likewise.
* timezone/backward: Likewise.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 4b9af501c1..b66e7fee1d 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1,5 +1,5 @@
/* Map in a shared object's segments from the file.
- Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -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);