GNU C Library master sources branch, master, updated. glibc-2.13-44-gf6ce0f9

drepper@sourceware.org drepper@sourceware.org
Thu Mar 10 17:53:00 GMT 2011


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, master has been updated
       via  f6ce0f974b727437e383f69d17d51962c86bf31b (commit)
       via  028478fa40d85a73b19638dbe3f83b1acebf370c (commit)
       via  908ea63341bbbca534411a0581cd16ba36e08706 (commit)
       via  33f85a3fb9fe432e0ebf6a3481bc2d5e29cb605f (commit)
      from  03592fc7ea512141f4c6f5f5f636d3b856563763 (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=f6ce0f974b727437e383f69d17d51962c86bf31b

commit f6ce0f974b727437e383f69d17d51962c86bf31b
Merge: 028478f 03592fc
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Thu Mar 10 12:53:39 2011 -0500

    Merge branch 'master' of ssh://sourceware.org/git/glibc
    
    Conflicts:
    	ChangeLog

diff --cc ChangeLog
index b83905b,c8669a9..0de681e
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,19 -1,10 +1,25 @@@
 +2011-03-10  Ulrich Drepper  <drepper@gmail.com>
 +
 +	[BZ #12510]
 +	* elf/dl-lookup.c (do_lookup_x): For copy relocations of unique objects
 +	copy from the symbol referenced in the relocation to initialize the
 +	used variable.
 +	Patch by Piotr Bury <pbury@goahead.com>.
 +	* elf/Makefile: Add rules to build and tst-unique3.
 +	* include/bits/dlfcn.h: Remove _dl_mcount_wrapper_check declaration.
 +	* elf/tst-unique3.cc: New file.
 +	* elf/tst-unique3.h: New file.
 +	* elf/tst-unique3lib.cc: New file.
 +	* elf/tst-unique3lib2.cc: New file.
 +
 +	* elf/Makefile: Don't run tst-execstack* tests of SELinux is enabled.
 +
+ 2011-03-10  Mike Frysinger  <vapier@gentoo.org>
+ 
+ 	* sysdeps/sparc/sparc64/elf/configure.in (libc_cv_sparc64_tls): Add
+ 	$LDFLAGS and -nostdlib -nostartfiles to linking step.  Change main
+ 	to _start.
 -	* sysdeps/sparc/sparc64/elf/configure: Regenerate.
+ 
  2011-03-06  Ulrich Drepper  <drepper@gmail.com>
  
  	* elf/dl-load.c (_dl_map_object): If we are looking for the first

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

commit 028478fa40d85a73b19638dbe3f83b1acebf370c
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Thu Mar 10 12:51:33 2011 -0500

    Fix copy relocations handling of unique objects.

diff --git a/ChangeLog b/ChangeLog
index 95f0525..b83905b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2011-03-10  Ulrich Drepper  <drepper@gmail.com>
 
+	[BZ #12510]
+	* elf/dl-lookup.c (do_lookup_x): For copy relocations of unique objects
+	copy from the symbol referenced in the relocation to initialize the
+	used variable.
+	Patch by Piotr Bury <pbury@goahead.com>.
+	* elf/Makefile: Add rules to build and tst-unique3.
+	* include/bits/dlfcn.h: Remove _dl_mcount_wrapper_check declaration.
+	* elf/tst-unique3.cc: New file.
+	* elf/tst-unique3.h: New file.
+	* elf/tst-unique3lib.cc: New file.
+	* elf/tst-unique3lib2.cc: New file.
+
 	* elf/Makefile: Don't run tst-execstack* tests of SELinux is enabled.
 
 2011-03-06  Ulrich Drepper  <drepper@gmail.com>
diff --git a/NEWS b/NEWS
index 38243c3..3b02f3b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-2-25
+GNU C Library NEWS -- history of user-visible changes.  2011-3-10
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -9,7 +9,7 @@ Version 2.14
 
 * The following bugs are resolved with this release:
 
-  11724, 12445, 12454, 12460, 12469, 12489, 12509
+  11724, 12445, 12454, 12460, 12469, 12489, 12509, 12510
 
 Version 2.13
 
diff --git a/elf/Makefile b/elf/Makefile
index 126ae32..56cb1b1 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -258,7 +258,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
 		order2mod1 order2mod2 order2mod3 order2mod4 \
 		tst-unique1mod1 tst-unique1mod2 \
 		tst-unique2mod1 tst-unique2mod2 \
-		tst-unique3lib \
+		tst-unique3lib tst-unique3lib2 \
 		tst-initordera1 tst-initorderb1 \
 		tst-initordera2 tst-initorderb2 \
 		tst-initordera3 tst-initordera4
@@ -1182,7 +1182,8 @@ $(objpfx)tst-unique1.out: $(objpfx)tst-unique1mod1.so \
 $(objpfx)tst-unique2: $(libdl) $(objpfx)tst-unique2mod1.so
 $(objpfx)tst-unique2.out: $(objpfx)tst-unique2mod2.so
 
-$(objpfx)tst-unique3: $(objpfx)tst-unique3lib.so
+$(objpfx)tst-unique3: $(libdl) $(objpfx)tst-unique3lib.so
+$(objpfx)tst-unique3.out: $(objpfx)tst-unique3lib2.so
 
 $(objpfx)tst-initorder.out: $(objpfx)tst-initorder
 	$(elf-objpfx)${rtld-installed-name} \
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 78c8669..874a4bb 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -1,6 +1,5 @@
 /* Look up a symbol in the loaded objects.
-   Copyright (C) 1995-2005, 2006, 2007, 2009, 2010
-   Free Software Foundation, Inc.
+   Copyright (C) 1995-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
@@ -364,8 +363,19 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
 		      if (entries[idx].hashval == new_hash
 			  && strcmp (entries[idx].name, undef_name) == 0)
 			{
-			  result->s = entries[idx].sym;
-			  result->m = (struct link_map *) entries[idx].map;
+			  if ((type_class & ELF_RTYPE_CLASS_COPY) != 0)
+			    {
+			      /* We possibly have to initialize the central
+				 copy from the copy addressed through the
+				 relocation.  */
+			      result->s = sym;
+			      result->m = (struct link_map *) map;
+			    }
+			  else
+			    {
+			      result->s = entries[idx].sym;
+			      result->m = (struct link_map *) entries[idx].map;
+			    }
 			  __rtld_lock_unlock_recursive (tab->lock);
 			  return 1;
 			}
diff --git a/elf/tst-unique3.cc b/elf/tst-unique3.cc
new file mode 100644
index 0000000..b2c9593
--- /dev/null
+++ b/elf/tst-unique3.cc
@@ -0,0 +1,23 @@
+#include "tst-unique3.h"
+#include <cstdio>
+#include "../dlfcn/dlfcn.h"
+
+int t = S<char>::i;
+
+int
+main (void)
+{
+  std::printf ("%d %d\n", S<char>::i, t);
+  int result = S<char>::i++ != 1 || t != 1;
+  result |= in_lib ();
+  void *d = dlopen ("$ORIGIN/tst-unique3lib2.so", RTLD_LAZY);
+  int (*fp) ();
+  if (d == NULL || (fp = (int(*)()) dlsym (d, "in_lib2")) == NULL)
+    {
+      std::printf ("failed to get symbol in_lib2\n");
+      return 1;
+    }
+  result |= fp ();
+  dlclose (d);
+  return result;
+}
diff --git a/elf/tst-unique3.h b/elf/tst-unique3.h
new file mode 100644
index 0000000..716d236
--- /dev/null
+++ b/elf/tst-unique3.h
@@ -0,0 +1,8 @@
+// BZ 12510
+template<typename T>
+struct S
+{
+  static int i;
+};
+
+extern int in_lib (void);
diff --git a/elf/tst-unique3lib.cc b/elf/tst-unique3lib.cc
new file mode 100644
index 0000000..fa8e85a
--- /dev/null
+++ b/elf/tst-unique3lib.cc
@@ -0,0 +1,11 @@
+#include <cstdio>
+#include "tst-unique3.h"
+template<typename T> int S<T>::i = 1;
+static int i = S<char>::i;
+
+int
+in_lib (void)
+{
+  std::printf ("in_lib: %d %d\n", S<char>::i, i);
+  return S<char>::i++ != 2 || i != 1;
+}
diff --git a/elf/tst-unique3lib2.cc b/elf/tst-unique3lib2.cc
new file mode 100644
index 0000000..17d817e
--- /dev/null
+++ b/elf/tst-unique3lib2.cc
@@ -0,0 +1,12 @@
+#include <cstdio>
+#include "tst-unique3.h"
+
+template<typename T> int S<T>::i;
+
+extern "C"
+int
+in_lib2 ()
+{
+  std::printf ("in_lib2: %d\n", S<char>::i);
+  return S<char>::i != 3;
+}
diff --git a/include/bits/dlfcn.h b/include/bits/dlfcn.h
index cb4a5c2..c31a645 100644
--- a/include/bits/dlfcn.h
+++ b/include/bits/dlfcn.h
@@ -1,4 +1,3 @@
 #include_next <bits/dlfcn.h>
 
-extern void _dl_mcount_wrapper_check (void *__selfpc);
 libc_hidden_proto (_dl_mcount_wrapper_check)

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

commit 908ea63341bbbca534411a0581cd16ba36e08706
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Thu Mar 10 05:27:54 2011 -0500

    Regenerate.

diff --git a/sysdeps/i386/elf/configure b/sysdeps/i386/elf/configure
index 7a909d9..3aa5a7d 100644
--- a/sysdeps/i386/elf/configure
+++ b/sysdeps/i386/elf/configure
@@ -1,12 +1,94 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
 # This file is generated from configure.in by Autoconf.  DO NOT EDIT!
  # Local configure fragment for sysdeps/i386/elf.
 
 if test "$usetls" != no; then
 # Check for support of thread-local storage handling in assembler and
 # linker.
-{ $as_echo "$as_me:$LINENO: checking for i386 TLS support" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for i386 TLS support" >&5
 $as_echo_n "checking for i386 TLS support... " >&6; }
-if test "${libc_cv_386_tls+set}" = set; then
+if test "${libc_cv_386_tls+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   cat > conftest.s <<\EOF
@@ -26,28 +108,24 @@ baz:	leal	bar@TLSLDM(%ebx), %eax
 	movl	%gs:bar@NTPOFF, %eax
 EOF
 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
   libc_cv_386_tls=yes
 else
   libc_cv_386_tls=no
 fi
 rm -f conftest*
 fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_386_tls" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_386_tls" >&5
 $as_echo "$libc_cv_386_tls" >&6; }
 if test $libc_cv_386_tls = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_TLS_SUPPORT 1
-_ACEOF
+  $as_echo "#define HAVE_TLS_SUPPORT 1" >>confdefs.h
 
 fi
 fi
 
-cat >>confdefs.h <<\_ACEOF
-#define PI_STATIC_AND_HIDDEN 1
-_ACEOF
+$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
 

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

commit 33f85a3fb9fe432e0ebf6a3481bc2d5e29cb605f
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Thu Mar 10 03:18:21 2011 -0500

    Don't run tests checking xecutable stack when SELinux is enforcing.

diff --git a/ChangeLog b/ChangeLog
index f4750b1..95f0525 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-03-10  Ulrich Drepper  <drepper@gmail.com>
+
+	* elf/Makefile: Don't run tst-execstack* tests of SELinux is enabled.
+
 2011-03-06  Ulrich Drepper  <drepper@gmail.com>
 
 	* elf/dl-load.c (_dl_map_object): If we are looking for the first
diff --git a/elf/Makefile b/elf/Makefile
index c427679..126ae32 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -201,11 +201,14 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
 	 unload3 unload4 unload5 unload6 unload7 tst-global1 order2 \
 	 tst-audit1 tst-audit2 \
 	 tst-stackguard1 tst-addr1 tst-thrlock \
-	 tst-unique1 tst-unique2 \
+	 tst-unique1 tst-unique2 tst-unique3 \
 	 tst-initorder
 #	 reldep9
 test-srcs = tst-pathopt
+selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
+ifneq ($(selinux-enabled),1)
 tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
+endif
 ifeq (x86_64,$(config-machine))
 tests += tst-audit3 tst-audit4 tst-audit5 tst-audit6 tst-audit7
 endif
@@ -255,6 +258,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
 		order2mod1 order2mod2 order2mod3 order2mod4 \
 		tst-unique1mod1 tst-unique1mod2 \
 		tst-unique2mod1 tst-unique2mod2 \
+		tst-unique3lib \
 		tst-initordera1 tst-initorderb1 \
 		tst-initordera2 tst-initorderb2 \
 		tst-initordera3 tst-initordera4
@@ -1178,6 +1182,8 @@ $(objpfx)tst-unique1.out: $(objpfx)tst-unique1mod1.so \
 $(objpfx)tst-unique2: $(libdl) $(objpfx)tst-unique2mod1.so
 $(objpfx)tst-unique2.out: $(objpfx)tst-unique2mod2.so
 
+$(objpfx)tst-unique3: $(objpfx)tst-unique3lib.so
+
 $(objpfx)tst-initorder.out: $(objpfx)tst-initorder
 	$(elf-objpfx)${rtld-installed-name} \
 	  --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \

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

Summary of changes:
 ChangeLog                  |   17 +++++++-
 NEWS                       |    4 +-
 elf/Makefile               |    9 +++-
 elf/dl-lookup.c            |   18 ++++++--
 elf/tst-unique3.cc         |   23 ++++++++++
 elf/tst-unique3.h          |    8 +++
 elf/tst-unique3lib.cc      |   11 +++++
 elf/tst-unique3lib2.cc     |   12 +++++
 include/bits/dlfcn.h       |    1 -
 sysdeps/i386/elf/configure |  102 ++++++++++++++++++++++++++++++++++++++-----
 10 files changed, 184 insertions(+), 21 deletions(-)
 create mode 100644 elf/tst-unique3.cc
 create mode 100644 elf/tst-unique3.h
 create mode 100644 elf/tst-unique3lib.cc
 create mode 100644 elf/tst-unique3lib2.cc


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



More information about the Glibc-cvs mailing list