about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-01-25 19:46:25 +0000
committerUlrich Drepper <drepper@redhat.com>1998-01-25 19:46:25 +0000
commit49891c106244888123557fca7fddda4fa1f96b1d (patch)
treebe82ef12bd1f25781c3755052d73bbf800020b49 /elf
parent3f07c1da66f3e9b50c62dec07a4c5b68794485cf (diff)
downloadglibc-49891c106244888123557fca7fddda4fa1f96b1d.tar.gz
glibc-49891c106244888123557fca7fddda4fa1f96b1d.tar.xz
glibc-49891c106244888123557fca7fddda4fa1f96b1d.zip
Use most recent localedata from glibc-2.0.91.
1997-10-09 04:56  Ulrich Drepper  <drepper@cygnus.com>

	* locales/is_IS: Update from Debian version.

1997-08-29 03:16  Ulrich Drepper  <drepper@cygnus.com>

	* tst-fmon.c: New file.  strfmon test program.
	* tst-fmon.sh: New file.  Script to run strfmon test.
	* fmon-de_DE.exp: New file.  Expected result of strfmon test for de_DE.
	* fmon-en_US.exp: New file.  Expected result of strfmon test for en_US.

	* locales/cs_CZ: Update from author.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-misc.c6
-rw-r--r--elf/rtld.c18
2 files changed, 16 insertions, 8 deletions
diff --git a/elf/dl-misc.c b/elf/dl-misc.c
index 0894a7216b..86a0c6309d 100644
--- a/elf/dl-misc.c
+++ b/elf/dl-misc.c
@@ -1,5 +1,5 @@
 /* Miscellaneous support functions for dynamic linker
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998 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
@@ -47,7 +47,9 @@ _dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot)
   int fd = __open (file, O_RDONLY);
   if (fd < 0)
     return NULL;
-  if (__fxstat (_STAT_VER, fd, &st) < 0)
+  if (__fxstat (_STAT_VER, fd, &st) < 0
+      /* No need to map the file if it is empty.  */
+      || st.st_size == 0)
     result = NULL;
   else
     {
diff --git a/elf/rtld.c b/elf/rtld.c
index 72c2520d6a..e0d35216b6 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1,5 +1,5 @@
 /* Run time dynamic linker.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 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
@@ -532,24 +532,27 @@ of this helper program; chances are you did not intend to run this program.\n",
       /* We have one problematic case: if we have a name at the end of
 	 the file without a trailing terminating characters, we cannot
 	 place the \0.  Handle the case separately.  */
-      if (file[file_size - 1] != ' ' && file[file_size] != '\t'
-	  && file[file_size] != '\n')
+      if (file[file_size - 1] != ' ' && file[file_size - 1] != '\t'
+	  && file[file_size - 1] != '\n' && file[file_size - 1] != ':')
 	{
 	  problem = &file[file_size];
 	  while (problem > file && problem[-1] != ' ' && problem[-1] != '\t'
-		 && problem[-1] != '\n')
+		 && problem[-1] != '\n' && problem[-1] != ':')
 	    --problem;
 
 	  if (problem > file)
 	    problem[-1] = '\0';
 	}
       else
-	problem = NULL;
+	{
+	  problem = NULL;
+	  file[file_size - 1] = '\0';
+	}
 
       if (file != problem)
 	{
 	  char *p;
-	  runp = file;
+	  runp = file + strspn (file, ": \t\n");
 	  while ((p = strsep (&runp, ": \t\n")) != NULL)
 	    {
 	      struct link_map *new_map = _dl_map_object (NULL, p,
@@ -557,6 +560,9 @@ of this helper program; chances are you did not intend to run this program.\n",
 	      if (new_map->l_opencount == 1)
 		/* It is no duplicate.  */
 		++npreloads;
+
+	      if (runp != NULL)
+		runp += strspn (runp, ": \t\n");
 	    }
 	}