[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r13437 - in /fsf/trunk/libc: ./ elf/ sysdeps/unix/sysv/linux/powerpc/powerpc64/ sysdeps/unix/sysv/linux/sys/



Author: eglibc
Date: Sun Apr 10 00:39:24 2011
New Revision: 13437

Log:
Import glibc-mainline for 2011-04-10

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/elf/dl-load.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/syscall.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Apr 10 00:39:24 2011
@@ -1,3 +1,25 @@
+2011-03-14  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* elf/dl-load.c (_dl_dst_substitute): When skipping the first
+	rpath element also skip the following colon.
+	(expand_dynamic_string_token): Add is_path parameter and pass
+	down to DL_DST_REQUIRED and _dl_dst_substitute.
+	(decompose_rpath): Call expand_dynamic_string_token with
+	non-zero is_path.  Ignore empty rpaths.
+	(_dl_map_object_from_fd): Call expand_dynamic_string_token
+	with zero is_path.
+
+2011-04-08  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c:
+	Make cancelable.
+
+2011-04-09  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12655]
+	* sysdeps/unix/sysv/linux/sys/syscall.h: Fix comment.
+	Patch by Filipe David Manana <fdmanana@xxxxxxxxxx>.
+
 2011-04-07  Andreas Schwab  <schwab@xxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S (CALL_FAIL):

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sun Apr 10 00:39:24 2011
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-4-1
+GNU C Library NEWS -- history of user-visible changes.  2011-4-9
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -12,7 +12,7 @@
 * The following bugs are resolved with this release:
 
   11724, 12445, 12454, 12460, 12469, 12489, 12509, 12510, 12518, 12583, 12587,
-  12597, 12631
+  12597, 12631, 12655
 
 Version 2.13
 

Modified: fsf/trunk/libc/elf/dl-load.c
==============================================================================
--- fsf/trunk/libc/elf/dl-load.c (original)
+++ fsf/trunk/libc/elf/dl-load.c Sun Apr 10 00:39:24 2011
@@ -1,5 +1,5 @@
 /* Map in a shared object's segments from the file.
-   Copyright (C) 1995-2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1995-2005, 2006, 2007, 2009, 2010, 2011 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
@@ -284,6 +284,10 @@
 	      name += len;
 	      while (*name != '\0' && (!is_path || *name != ':'))
 		++name;
+	      /* Also skip following colon if this is the first rpath
+		 element, but keep an empty element at the end.  */
+	      if (wp == result && is_path && *name == ':' && name[1] != '\0')
+		++name;
 	    }
 	  else
 	    /* No DST we recognize.  */
@@ -310,7 +314,7 @@
    belonging to the map is loaded.  In this case the path element
    containing $ORIGIN is left out.  */
 static char *
-expand_dynamic_string_token (struct link_map *l, const char *s)
+expand_dynamic_string_token (struct link_map *l, const char *s, int is_path)
 {
   /* We make two runs over the string.  First we determine how large the
      resulting string is and then we copy it over.  Since this is no
@@ -321,7 +325,7 @@
   char *result;
 
   /* Determine the number of DST elements.  */
-  cnt = DL_DST_COUNT (s, 1);
+  cnt = DL_DST_COUNT (s, is_path);
 
   /* If we do not have to replace anything simply copy the string.  */
   if (__builtin_expect (cnt, 0) == 0)
@@ -335,7 +339,7 @@
   if (result == NULL)
     return NULL;
 
-  return _dl_dst_substitute (l, s, result, 1);
+  return _dl_dst_substitute (l, s, result, is_path);
 }
 
 
@@ -551,11 +555,19 @@
 
   /* Make a writable copy.  At the same time expand possible dynamic
      string tokens.  */
-  copy = expand_dynamic_string_token (l, rpath);
+  copy = expand_dynamic_string_token (l, rpath, 1);
   if (copy == NULL)
     {
       errstring = N_("cannot create RUNPATH/RPATH copy");
       goto signal_error;
+    }
+
+  /* Ignore empty rpaths.  */
+  if (*copy == 0)
+    {
+      free (copy);
+      sps->dirs = (char *) -1;
+      return false;
     }
 
   /* Count the number of necessary elements in the result array.  */
@@ -2179,7 +2191,7 @@
     {
       /* The path may contain dynamic string tokens.  */
       realname = (loader
-		  ? expand_dynamic_string_token (loader, name)
+		  ? expand_dynamic_string_token (loader, name, 0)
 		  : local_strdup (name));
       if (realname == NULL)
 	fd = -1;

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c Sun Apr 10 00:39:24 2011
@@ -1,5 +1,5 @@
 /* Selective file content synch'ing.
-   Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2009, 2011 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
@@ -21,7 +21,7 @@
 #include <fcntl.h>
 #include <sys/types.h>
 
-#include <sysdep.h>
+#include <sysdep-cancel.h>
 #include <sys/syscall.h>
 
 
@@ -29,7 +29,17 @@
 int
 sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
 {
-  return INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
+  if (SINGLE_THREAD_P)
+    return INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
+
+  int result;
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  result = INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
 }
 #else
 int

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/syscall.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/syscall.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/syscall.h Sun Apr 10 00:39:24 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2011 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
@@ -19,7 +19,7 @@
 #ifndef _SYSCALL_H
 #define _SYSCALL_H	1
 
-/* This file should list the numbers of the system the system knows.
+/* This file should list the numbers of the system calls the system knows.
    But instead of duplicating this we use the information available
    from the kernel sources.  */
 #include <asm/unistd.h>