From 143e2b96c94c3fd5a2c618db0bad094ce659e743 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Sep 1998 12:58:42 +0000 Subject: Update. 1998-09-02 Ulrich Drepper * elf/dl-load.c (fillin_rpath): Handle "/" as RPATH correctly. (_dl_map_object_from_fd): Make NAME argument const. Remove last parameter in _dl_new_object call. (print_search_path): Correct construction of composed path name. (_dl_map_object): Prevent looking at RPATH of the main map twice. Remove last parameter in _dl_new_object call. * elf/dl-object.c: Remove last parameter. Determine whether create origin entry based on empty realname. Handle file in root directory correctly. * elf/ldsodefs.h: Adjust prototype for _dl_new_object. * elf/rtld.c (dl_main): Add comment describing reason for memory leak. Remove last parameter in _dl_new_object call. * sysdeps/generic/dl-origin.h: Handle file in root directory correctly. * sysdeps/unix/sysv/linux/dl-origin.h: Likewise. --- elf/rtld.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'elf/rtld.c') diff --git a/elf/rtld.c b/elf/rtld.c index b25fb20fd3..66e5d6c59d 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -417,6 +417,10 @@ of this helper program; chances are you did not intend to run this program.\n\ phdr = main_map->l_phdr; phent = main_map->l_phnum; + /* We overwrite here a pointer to a malloc()ed string. But since + the malloc() implementation used at this point is the dummy + implementations which has no real free() function it does not + makes sense to free the old string first. */ main_map->l_name = (char *) ""; *user_entry = main_map->l_entry; } @@ -424,7 +428,7 @@ of this helper program; chances are you did not intend to run this program.\n\ { /* Create a link_map for the executable itself. This will be what dlopen on "" returns. */ - main_map = _dl_new_object ((char *) "", "", lt_executable, 0); + main_map = _dl_new_object ((char *) "", "", lt_executable); if (main_map == NULL) _dl_sysdep_fatal ("cannot allocate memory for link map\n", NULL); main_map->l_phdr = phdr; -- cgit 1.4.1