GNU C Library master sources branch, release/2.11/master, updated. glibc-2.11.2-51-g457c305

pasky@sourceware.org pasky@sourceware.org
Mon Nov 15 17:12:00 GMT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.11/master has been updated
       via  457c305d8a919e4fc886c56bd153442e915a7c7e (commit)
       via  5a647459c82250dfd382b3bda7ec909c0e581b23 (commit)
       via  cbca5989ba6e08f73604daa65181c162f60a6e69 (commit)
       via  5da0ad553866972d8545d8e5533add305e0c2530 (commit)
       via  4e951b593897f603ecd754a43dfec721e8a64e6b (commit)
      from  fa55fd7e5b1da8bd2dddffab82931e2495e82435 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=457c305d8a919e4fc886c56bd153442e915a7c7e

commit 457c305d8a919e4fc886c56bd153442e915a7c7e
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Wed Sep 1 12:45:02 2010 -0700

    Update sparc epoll.h from epoll_create2 to epoll_create1
    (cherry picked from commit fdc0c10d9b5c39ec20c35d2f3808d3c70cb7f60b)

diff --git a/ChangeLog b/ChangeLog
index d970cf6..1570ce7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -97,6 +97,9 @@
 
 2010-08-31  Mike Frysinger  <vapier@gentoo.org>
 
+	* sysdeps/unix/sysv/linux/sparc/sys/epoll.h (epoll_create2): Delete.
+	(epoll_create1): Declare.
+
 	* sysdeps/unix/sysv/linux/x86_64/sys/epoll.h: Fix typo.
 
 2010-08-31  Andreas Schwab  <schwab@redhat.com>
diff --git a/sysdeps/unix/sysv/linux/sparc/sys/epoll.h b/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
index cc0ddef..9943f21 100644
--- a/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2006, 2007, 2008, 2010 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
@@ -31,7 +31,7 @@ typedef __sigset_t sigset_t;
 #endif
 
 
-/* Flags to be passed to epoll_create2.  */
+/* Flags to be passed to epoll_create1.  */
 enum
   {
     EPOLL_CLOEXEC = 0x400000,
@@ -101,8 +101,9 @@ __BEGIN_DECLS
    returned by epoll_create() should be closed with close().  */
 extern int epoll_create (int __size) __THROW;
 
-/* Same as epoll_create but with an additional FLAGS parameter.  */
-extern int epoll_create2 (int __size, int __flags) __THROW;
+/* Same as epoll_create but with an FLAGS parameter.  The unused SIZE
+   parameter has been dropped.  */
+extern int epoll_create1 (int __flags) __THROW;
 
 
 /* Manipulate an epoll instance "epfd". Returns 0 in case of success,

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5a647459c82250dfd382b3bda7ec909c0e581b23

commit 5a647459c82250dfd382b3bda7ec909c0e581b23
Author: Andreas Schwab <schwab@redhat.com>
Date:   Mon Sep 6 14:55:59 2010 +0200

    Don't mix pattern rules with normal rules
    (cherry picked from commit 32cf40699346d37fabfa887bbd95e95004799ae1)

diff --git a/ChangeLog b/ChangeLog
index 21dd85c..d970cf6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-06  Andreas Schwab  <schwab@redhat.com>
+
+	* manual/Makefile: Don't mix pattern rules with normal rules.
+
 2010-08-12  Andreas Schwab  <schwab@redhat.com>
 
 	[BZ #11904]
diff --git a/manual/Makefile b/manual/Makefile
index c5866eb..b1f5fa7 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -232,7 +232,10 @@ ifdef objpfx
 .PHONY: stubs
 stubs: $(objpfx)stubs
 endif
-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
+$(objpfx)stubs ../po/manual.pot:
+	$(make-target-directory)
+	touch $@
+$(objpfx)stamp%:
 	$(make-target-directory)
 	touch $@
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cbca5989ba6e08f73604daa65181c162f60a6e69

commit cbca5989ba6e08f73604daa65181c162f60a6e69
Author: Andreas Schwab <schwab@redhat.com>
Date:   Thu Aug 12 09:05:50 2010 -0700

    Properly quote output of locale
    
    (cherry picked from commit 026373745eab50a683536d950cb7e17dc98c4259)

diff --git a/ChangeLog b/ChangeLog
index ce61223..21dd85c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-12  Andreas Schwab  <schwab@redhat.com>
+
+	[BZ #11904]
+	* locale/programs/locale.c (print_assignment): New function.
+	(show_locale_vars): Use it.
+
 2010-10-26  Ulrich Drepper  <drepper@gmail.com>
 
 	* elf/rtld.c (dl_main): Move assertion after the point where rtld map
diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index 77262b7..b842506 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -762,6 +762,29 @@ write_charmaps (void)
   twalk (all_data, print_names);
 }
 
+/* Print a properly quoted assignment of NAME with VAL, using double
+   quotes iff DQUOTE is true.  */
+static void
+print_assignment (const char *name, const char *val, bool dquote)
+{
+  printf ("%s=", name);
+  if (dquote)
+    putchar ('"');
+  while (*val != '\0')
+    {
+      size_t segment
+	= strcspn (val, dquote ? "$`\"\\" : "~|&;<>()$`\\\"' \t\n");
+      printf ("%.*s", (int) segment, val);
+      val += segment;
+      if (*val == '\0')
+	break;
+      putchar ('\\');
+      putchar (*val++);
+    }
+  if (dquote)
+    putchar ('"');
+  putchar ('\n');
+}
 
 /* We have to show the contents of the environments determining the
    locale.  */
@@ -769,7 +792,7 @@ static void
 show_locale_vars (void)
 {
   size_t cat_no;
-  const char *lcall = getenv ("LC_ALL");
+  const char *lcall = getenv ("LC_ALL") ? : "";
   const char *lang = getenv ("LANG") ? : "";
 
   auto void get_source (const char *name);
@@ -778,15 +801,15 @@ show_locale_vars (void)
     {
       char *val = getenv (name);
 
-      if ((lcall ?: "")[0] != '\0' || val == NULL)
-	printf ("%s=\"%s\"\n", name,
-		(lcall ?: "")[0] ? lcall : (lang ?: "")[0] ? lang : "POSIX");
+      if (lcall[0] != '\0' || val == NULL)
+	print_assignment (name, lcall[0] ? lcall : lang[0] ? lang : "POSIX",
+			  true);
       else
-	printf ("%s=%s\n", name, val);
+	print_assignment (name, val, false);
     }
 
   /* LANG has to be the first value.  */
-  printf ("LANG=%s\n", lang);
+  print_assignment ("LANG", lang, false);
 
   /* Now all categories in an unspecified order.  */
   for (cat_no = 0; cat_no < NCATEGORIES; ++cat_no)
@@ -794,7 +817,7 @@ show_locale_vars (void)
       get_source (category[cat_no].name);
 
   /* The last is the LC_ALL value.  */
-  printf ("LC_ALL=%s\n", lcall ? : "");
+  print_assignment ("LC_ALL", lcall, false);
 }
 
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5da0ad553866972d8545d8e5533add305e0c2530

commit 5da0ad553866972d8545d8e5533add305e0c2530
Author: Petr Baudis <pasky@ucw.cz>
Date:   Mon Nov 15 18:06:00 2010 +0100

    Remove duplicate ChangeLog entry for 8e9f92e

diff --git a/ChangeLog b/ChangeLog
index 52bbc0f..ce61223 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,21 +28,6 @@
 	* elf/rtld-Rules ($(objpfx)rtld-%.os): Add pattern rules with
 	rtld-%.$o dependency.
 
-2010-10-22  Andreas Schwab  <schwab@redhat.com>
-
-	* include/dlfcn.h (__RTLD_SECURE): Define.
-	* elf/dl-load.c (_dl_map_object): Remove preloaded parameter.  Use
-	mode & __RTLD_SECURE instead.
-	(open_path): Rename preloaded parameter to secure.
-	* sysdeps/generic/ldsodefs.h (_dl_map_object): Adjust declaration.
-	* elf/dl-open.c (dl_open_worker): Adjust call to _dl_map_object.
-	* elf/dl-deps.c (openaux): Likewise.
-	* elf/rtld.c (struct map_args): Remove is_preloaded.
-	(map_doit): Don't use it.
-	(dl_main): Likewise.
-	(do_preload): Use __RTLD_SECURE instead of is_preloaded.
-	(dlmopen_doit): Add __RTLD_SECURE to mode bits.
-
 2010-10-18  Andreas Schwab  <schwab@redhat.com>
 
 	* elf/dl-open.c (dl_open_worker): Don't expand DST here, let

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4e951b593897f603ecd754a43dfec721e8a64e6b

commit 4e951b593897f603ecd754a43dfec721e8a64e6b
Author: Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Date:   Tue Oct 26 00:23:14 2010 -0400

    Fix concurrency problem between dl_open and dl_iterate_phdr
    
    (cherry picked from commit f09677388a44cd1460f8986ef1b096c73bd5b958)
    
    Fix assertion in ld.so, introduced by delayed adding to global list.
    
    (cherry picked from commit fa41c84d73be804639ecb2250f0b793b1a6f765e)

diff --git a/ChangeLog b/ChangeLog
index a95b182..52bbc0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-26  Ulrich Drepper  <drepper@gmail.com>
+
+	* elf/rtld.c (dl_main): Move assertion after the point where rtld map
+	is added to the list.
+
+2010-10-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+	    Ulrich Drepper  <drepper@gmail.com>
+
+	* elf/dl-object.c (_dl_new_object): Don't append the new object to
+	the global list here.  Move code to...
+	(_dl_add_to_namespace_list): ...here.  New function.
+	* elf/rtld.c (dl_main): Invoke _dl_add_to_namespace_list.
+	* sysdeps/generic/ldsodefs.h (_dl_add_to_namespace_list): Declare.
+	* elf/dl-load.c (lose): Don't remove the element from the list.
+	(_dl_map_object_from_fd): Invoke _dl_add_to_namespace_list.
+	(_dl_map_object): Likewise.
+
 2010-10-24  Ulrich Drepper  <drepper@redhat.com>
 
 	[BZ #12140]
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 8a8ffb4..aa324d1 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -801,19 +801,7 @@ lose (int code, int fd, const char *name, char *realname, struct link_map *l,
   /* The file might already be closed.  */
   if (fd != -1)
     (void) __close (fd);
-  if (l != NULL)
-    {
-      /* Remove the stillborn object from the list and free it.  */
-      assert (l->l_next == NULL);
-      if (l->l_prev == NULL)
-	/* No other module loaded. This happens only in the static library,
-	   or in rtld under --verify.  */
-	GL(dl_ns)[l->l_ns]._ns_loaded = NULL;
-      else
-	l->l_prev->l_next = NULL;
-      --GL(dl_ns)[l->l_ns]._ns_nloaded;
-      free (l);
-    }
+  free (l);
   free (realname);
 
   if (r != NULL)
@@ -898,6 +886,9 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
 	 never be unloaded.  */
       __close (fd);
 
+      /* Add the map for the mirrored object to the object list.  */
+      _dl_add_to_namespace_list (l, nsid);
+
       return l;
     }
 #endif
@@ -1492,6 +1483,9 @@ cannot enable executable stack as shared object requires");
     add_name_to_object (l, ((const char *) D_PTR (l, l_info[DT_STRTAB])
 			    + l->l_info[DT_SONAME]->d_un.d_val));
 
+  /* Now that the object is fully initialized add it to the object list.  */
+  _dl_add_to_namespace_list (l, nsid);
+
 #ifdef SHARED
   /* Auditing checkpoint: we have a new object.  */
   if (__builtin_expect (GLRO(dl_naudit) > 0, 0)
@@ -2206,7 +2200,7 @@ _dl_map_object (struct link_map *loader, const char *name,
 	     have.  */
 	  static const Elf_Symndx dummy_bucket = STN_UNDEF;
 
-	  /* Enter the new object in the list of loaded objects.  */
+	  /* Allocate a new object map.  */
 	  if ((name_copy = local_strdup (name)) == NULL
 	      || (l = _dl_new_object (name_copy, name, type, loader,
 				      mode, nsid)) == NULL)
@@ -2224,6 +2218,9 @@ _dl_map_object (struct link_map *loader, const char *name,
 	  l->l_nbuckets = 1;
 	  l->l_relocated = 1;
 
+	  /* Enter the object in the object list.  */
+	  _dl_add_to_namespace_list (l, nsid);
+
 	  return l;
 	}
       else if (found_other_class)
diff --git a/elf/dl-object.c b/elf/dl-object.c
index 788e2c0..542a28c 100644
--- a/elf/dl-object.c
+++ b/elf/dl-object.c
@@ -1,5 +1,5 @@
 /* Storage management for the chain of loaded shared objects.
-   Copyright (C) 1995-2002,2004,2006-2008,2009 Free Software Foundation, Inc.
+   Copyright (C) 1995-2002,2004,2006-2009,2010 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
@@ -26,16 +26,36 @@
 #include <assert.h>
 
 
+/* Add the new link_map NEW to the end of the namespace list.  */
+void
+internal_function
+_dl_add_to_namespace_list (struct link_map *new, Lmid_t nsid)
+{
+  if (GL(dl_ns)[nsid]._ns_loaded != NULL)
+    {
+      struct link_map *l = GL(dl_ns)[nsid]._ns_loaded;
+      while (l->l_next != NULL)
+	l = l->l_next;
+      new->l_prev = l;
+      /* new->l_next = NULL;   Would be necessary but we use calloc.  */
+      l->l_next = new;
+    }
+  else
+    GL(dl_ns)[nsid]._ns_loaded = new;
+  ++GL(dl_ns)[nsid]._ns_nloaded;
+  new->l_serial = GL(dl_load_adds);
+  ++GL(dl_load_adds);
+}
+
+
 /* Allocate a `struct link_map' for a new object being loaded,
    and enter it into the _dl_loaded list.  */
-
 struct link_map *
 internal_function
 _dl_new_object (char *realname, const char *libname, int type,
 		struct link_map *loader, int mode, Lmid_t nsid)
 {
   struct link_map *l;
-  int idx;
   size_t libname_len = strlen (libname) + 1;
   struct link_map *new;
   struct libname_list *newname;
@@ -94,25 +114,11 @@ _dl_new_object (char *realname, const char *libname, int type,
   new->l_scope_max = sizeof (new->l_scope_mem) / sizeof (new->l_scope_mem[0]);
 
   /* Counter for the scopes we have to handle.  */
-  idx = 0;
+  int idx = 0;
 
   if (GL(dl_ns)[nsid]._ns_loaded != NULL)
-    {
-      l = GL(dl_ns)[nsid]._ns_loaded;
-      while (l->l_next != NULL)
-	l = l->l_next;
-      new->l_prev = l;
-      /* new->l_next = NULL;	Would be necessary but we use calloc.  */
-      l->l_next = new;
-
-      /* Add the global scope.  */
-      new->l_scope[idx++] = &GL(dl_ns)[nsid]._ns_loaded->l_searchlist;
-    }
-  else
-    GL(dl_ns)[nsid]._ns_loaded = new;
-  ++GL(dl_ns)[nsid]._ns_nloaded;
-  new->l_serial = GL(dl_load_adds);
-  ++GL(dl_load_adds);
+    /* Add the global scope.  */
+    new->l_scope[idx++] = &GL(dl_ns)[nsid]._ns_loaded->l_searchlist;
 
   /* If we have no loader the new object acts as it.  */
   if (loader == NULL)
diff --git a/elf/rtld.c b/elf/rtld.c
index 5b7eabc..2609693 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1088,11 +1088,15 @@ of this helper program; chances are you did not intend to run this program.\n\
       main_map = _dl_new_object ((char *) "", "", lt_executable, NULL,
 				 __RTLD_OPENEXEC, LM_ID_BASE);
       assert (main_map != NULL);
-      assert (main_map == GL(dl_ns)[LM_ID_BASE]._ns_loaded);
       main_map->l_phdr = phdr;
       main_map->l_phnum = phnum;
       main_map->l_entry = *user_entry;
 
+      /* Even though the link map is not yet fully initialized we can add
+	 it to the map list since there are no possible users running yet.  */
+      _dl_add_to_namespace_list (main_map, LM_ID_BASE);
+      assert (main_map == GL(dl_ns)[LM_ID_BASE]._ns_loaded);
+
       /* At this point we are in a bit of trouble.  We would have to
 	 fill in the values for l_dev and l_ino.  But in general we
 	 do not know where the file is.  We also do not handle AT_EXECFD
@@ -1235,7 +1239,7 @@ of this helper program; chances are you did not intend to run this program.\n\
       /* We were invoked directly, so the program might not have a
 	 PT_INTERP.  */
       _dl_rtld_libname.name = GL(dl_rtld_map).l_name;
-      /* _dl_rtld_libname.next = NULL; 	Already zero.  */
+      /* _dl_rtld_libname.next = NULL;	Already zero.  */
       GL(dl_rtld_map).l_libname =  &_dl_rtld_libname;
     }
   else
@@ -1360,6 +1364,9 @@ of this helper program; chances are you did not intend to run this program.\n\
 	      l->l_libname->name = memcpy (copy, dsoname, len);
 	    }
 
+	  /* Add the vDSO to the object list.  */
+	  _dl_add_to_namespace_list (l, LM_ID_BASE);
+
 	  /* Rearrange the list so this DSO appears after rtld_map.  */
 	  assert (l->l_next == NULL);
 	  assert (l->l_prev == main_map);
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 707e859..99917bb 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -887,8 +887,11 @@ extern lookup_t _dl_lookup_symbol_x (const char *undef,
 extern ElfW(Addr) _dl_symbol_value (struct link_map *map, const char *name)
      internal_function;
 
-/* Allocate a `struct link_map' for a new object being loaded,
-   and enter it into the _dl_main_map list.  */
+/* Add the new link_map NEW to the end of the namespace list.  */
+extern void _dl_add_to_namespace_list (struct link_map *new, Lmid_t nsid)
+     internal_function attribute_hidden;
+
+/* Allocate a `struct link_map' for a new object being loaded.  */
 extern struct link_map *_dl_new_object (char *realname, const char *libname,
 					int type, struct link_map *loader,
 					int mode, Lmid_t nsid)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                 |   45 +++++++++++++++++++---------
 elf/dl-load.c                             |   25 +++++++---------
 elf/dl-object.c                           |   46 ++++++++++++++++------------
 elf/rtld.c                                |   11 +++++-
 locale/programs/locale.c                  |   37 +++++++++++++++++++----
 manual/Makefile                           |    5 ++-
 sysdeps/generic/ldsodefs.h                |    7 +++-
 sysdeps/unix/sysv/linux/sparc/sys/epoll.h |    9 +++--
 8 files changed, 120 insertions(+), 65 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources



More information about the Glibc-cvs mailing list