about summary refs log tree commit diff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-16 19:28:34 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-16 19:28:34 +0000
commit7a2fd787a7aa4de58b9e3db5fe996f5ea89a3180 (patch)
tree6138175232c55972ef46574e564a6d523638531b /elf/rtld.c
parent508773d4db38c37ca1c1348c7ce664efefac4295 (diff)
downloadglibc-7a2fd787a7aa4de58b9e3db5fe996f5ea89a3180.tar.gz
glibc-7a2fd787a7aa4de58b9e3db5fe996f5ea89a3180.tar.xz
glibc-7a2fd787a7aa4de58b9e3db5fe996f5ea89a3180.zip
Update.
1998-07-16 19:27  Ulrich Drepper  <drepper@cygnus.com>

	* elf/rtld.c (process_envvars): Also recognize on as LD_BIND_NOW value.
	(process_envvars): Append .PID to LD_DEBUG_OUTPUT file name.
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index f60a357d98..3fd13179ba 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1137,7 +1137,9 @@ process_envvars (enum mode *modep, int *lazyp)
 	  /* Do we bind early?  */
 	  if (memcmp (&envline[3], "BIND_NOW", 8) == 0
 	      && (envline[12] == '1' || envline[12] == 'y'
-		  || envline[12] == 'Y'))
+		  || envline[12] == 'Y'
+		  || ((envline[12] == 'o' || envline[12] == 'O')
+		      && (envline[13] == 'n' || envline[13] == 'N'))))
 	    bind_now = 1;
 	  break;
 
@@ -1222,8 +1224,16 @@ process_envvars (enum mode *modep, int *lazyp)
      messages to this file.  */
   if (any_debug && debug_output != NULL && !__libc_enable_secure)
     {
-      _dl_debug_fd = __open (debug_output, O_WRONLY | O_APPEND | O_CREAT,
-			     0666);
+      size_t name_len = strlen (debug_output);
+      char buf[name_len + 12];
+      char *startp;
+
+      buf[name_len + 11] = '\0';
+      startp = _itoa_word (__getpid (), &buf[name_len + 11], 10, 0);
+      *--startp = '.';
+      startp = memcpy (startp - name_len, debug_output, name_len);
+
+      _dl_debug_fd = __open (startp, O_WRONLY | O_APPEND | O_CREAT, 0666);
       if (_dl_debug_fd == -1)
 	/* We use standard output if opening the file failed.  */
 	_dl_debug_fd = STDOUT_FILENO;