aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-10-24 20:40:14 -0400
committerPetr Baudis <pasky@suse.cz>2010-11-09 02:42:11 +0100
commit8b1cd765b2bef7a4e71f76ac87dd1454fe2ed409 (patch)
tree408468bfbcd918c0d71904d19a163e05e257ccac
parentc88ea0dfe1baccac52a7a7fb80ee5b813a226b8d (diff)
downloadglibc-8b1cd765b2bef7a4e71f76ac87dd1454fe2ed409.tar
glibc-8b1cd765b2bef7a4e71f76ac87dd1454fe2ed409.tar.gz
glibc-8b1cd765b2bef7a4e71f76ac87dd1454fe2ed409.tar.bz2
glibc-8b1cd765b2bef7a4e71f76ac87dd1454fe2ed409.zip
Don't expand DST twice in dl_open
(cherry picked from commit 22cd1c9bcf57c5829d65b6da825f7a459d40c9eb)
-rw-r--r--ChangeLog5
-rw-r--r--elf/dl-open.c29
2 files changed, 5 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index fd646956e8..7fa4a0623f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-18 Andreas Schwab <schwab@redhat.com>
+
+ * elf/dl-open.c (dl_open_worker): Don't expand DST here, let
+ _dl_map_object do it.
+
2010-10-15 Andreas Schwab <schwab@redhat.com>
* scripts/data/localplt-s390-linux-gnu.data: New file.
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 2d3932fb0d..0b328cfb00 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -220,35 +220,6 @@ dl_open_worker (void *a)
assert (_dl_debug_initialize (0, args->nsid)->r_state == RT_CONSISTENT);
- /* Maybe we have to expand a DST. */
- if (__builtin_expect (dst != NULL, 0))
- {
- size_t len = strlen (file);
-
- /* Determine how much space we need. We have to allocate the
- memory locally. */
- size_t required = DL_DST_REQUIRED (call_map, file, len,
- _dl_dst_count (dst, 0));
-
- /* Get space for the new file name. */
- char *new_file = (char *) alloca (required + 1);
-
- /* Generate the new file name. */
- _dl_dst_substitute (call_map, file, new_file, 0);
-
- /* If the substitution failed don't try to load. */
- if (*new_file == '\0')
- _dl_signal_error (0, "dlopen", NULL,
- N_("empty dynamic string token substitution"));
-
- /* Now we have a new file name. */
- file = new_file;
-
- /* It does not matter whether call_map is set even if we
- computed it only because of the DST. Since the path contains
- a slash the value is not used. See dl-load.c. */
- }
-
/* Load the named object. */
struct link_map *new;
args->map = new = _dl_map_object (call_map, file, lt_loaded, 0,