about summary refs log tree commit diff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-08-26 10:28:45 +0000
committerUlrich Drepper <drepper@redhat.com>1996-08-26 10:28:45 +0000
commitdcf0671d905200c449f92ead6cf43c184637a0d5 (patch)
tree91dc217311db41e89545d487b991865a6433205e /elf/rtld.c
parent4884d0f03c5a3b3d2459655e76fa2d0684d389dc (diff)
downloadglibc-dcf0671d905200c449f92ead6cf43c184637a0d5.tar.gz
glibc-dcf0671d905200c449f92ead6cf43c184637a0d5.tar.xz
glibc-dcf0671d905200c449f92ead6cf43c184637a0d5.zip
handle password file locking. cvs/libc-960826
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 9f13124207..be71e88c3c 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -204,12 +204,15 @@ of this helper program; chances are you did not intend to run this program.\n",
 	    {
 	      l = _dl_map_object (NULL, _dl_argv[0], lt_library);
 	    }
-	  const char *err_str = NULL;
+	  char *err_str = NULL;
 	  const char *obj_name __attribute__ ((unused));
 
 	  (void) _dl_catch_error (&err_str, &obj_name, doit);
 	  if (err_str != NULL)
-	    _exit (EXIT_FAILURE);
+	    {
+	      free (err_str);
+	      _exit (EXIT_FAILURE);
+	    }
 	}
       else
 	l = _dl_map_object (NULL, _dl_argv[0], lt_library);
@@ -395,7 +398,8 @@ of this helper program; chances are you did not intend to run this program.\n",
 	    const ElfW(Sym) *ref = NULL;
 	    ElfW(Addr) loadbase = _dl_lookup_symbol (_dl_argv[i], &ref,
 						     &_dl_default_scope[2],
-						     "argument", 0);
+						     "argument",
+						     DL_LOOKUP_NOPLT);
 	    char buf[20], *bp;
 	    buf[sizeof buf - 1] = '\0';
 	    bp = _itoa (ref->st_value, &buf[sizeof buf - 1], 16, 0);
@@ -488,8 +492,9 @@ of this helper program; chances are you did not intend to run this program.\n",
 	 dynamic linker.  There is no additional initialization
 	 required for the ABI-compliant dynamic linker.  */
 
-      (*(void (*) (void)) (_dl_rtld_map.l_addr +
-			   _dl_rtld_map.l_info[DT_INIT]->d_un.d_ptr)) ();
+      (*(void (*) (int, char **, char**))
+       (_dl_rtld_map.l_addr + _dl_rtld_map.l_info[DT_INIT]->d_un.d_ptr))
+	(0, NULL, NULL);
 
       /* Clear the field so a future dlopen won't run it again.  */
       _dl_rtld_map.l_info[DT_INIT] = NULL;