[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r13106 - in /fsf/trunk/libc: ./ elf/ include/bits/ sysdeps/i386/elf/ sysdeps/sparc/sparc64/elf/ wcsmbs/
- To: commits@xxxxxxxxxx
- Subject: [commits] r13106 - in /fsf/trunk/libc: ./ elf/ include/bits/ sysdeps/i386/elf/ sysdeps/sparc/sparc64/elf/ wcsmbs/
- From: eglibc@xxxxxxxxxx
- Date: Fri, 11 Mar 2011 08:03:59 -0000
Author: eglibc
Date: Fri Mar 11 00:03:57 2011
New Revision: 13106
Log:
Import glibc-mainline for 2011-03-11
Added:
fsf/trunk/libc/elf/tst-unique3.cc
fsf/trunk/libc/elf/tst-unique3.h (with props)
fsf/trunk/libc/elf/tst-unique3lib.cc
fsf/trunk/libc/elf/tst-unique3lib2.cc
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/elf/Makefile
fsf/trunk/libc/elf/dl-lookup.c
fsf/trunk/libc/include/bits/dlfcn.h
fsf/trunk/libc/sysdeps/i386/elf/configure
fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure
fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure.in
fsf/trunk/libc/wcsmbs/wchar.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Mar 11 00:03:57 2011
@@ -1,3 +1,29 @@
+2011-03-10 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * wcsmbs/wchar.h (wmemcmp): Remove __restrict qualifiers.
+
+2011-03-10 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [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@xxxxxxxxxxx>.
+ * 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@xxxxxxxxxx>
+
+ * sysdeps/sparc/sparc64/elf/configure.in (libc_cv_sparc64_tls): Add
+ $LDFLAGS and -nostdlib -nostartfiles to linking step. Change main
+ to _start.
+
2011-03-06 Ulrich Drepper <drepper@xxxxxxxxx>
* elf/dl-load.c (_dl_map_object): If we are looking for the first
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Fri Mar 11 00:03:57 2011
@@ -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 @@
* 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
Modified: fsf/trunk/libc/elf/Makefile
==============================================================================
--- fsf/trunk/libc/elf/Makefile (original)
+++ fsf/trunk/libc/elf/Makefile Fri Mar 11 00:03:57 2011
@@ -201,11 +201,14 @@
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 @@
order2mod1 order2mod2 order2mod3 order2mod4 \
tst-unique1mod1 tst-unique1mod2 \
tst-unique2mod1 tst-unique2mod2 \
+ tst-unique3lib tst-unique3lib2 \
tst-initordera1 tst-initorderb1 \
tst-initordera2 tst-initorderb2 \
tst-initordera3 tst-initordera4
@@ -1178,6 +1182,9 @@
$(objpfx)tst-unique2: $(libdl) $(objpfx)tst-unique2mod1.so
$(objpfx)tst-unique2.out: $(objpfx)tst-unique2mod2.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} \
--library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
Modified: fsf/trunk/libc/elf/dl-lookup.c
==============================================================================
--- fsf/trunk/libc/elf/dl-lookup.c (original)
+++ fsf/trunk/libc/elf/dl-lookup.c Fri Mar 11 00:03:57 2011
@@ -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 @@
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;
}
Added: fsf/trunk/libc/elf/tst-unique3.cc
==============================================================================
--- fsf/trunk/libc/elf/tst-unique3.cc (added)
+++ fsf/trunk/libc/elf/tst-unique3.cc Fri Mar 11 00:03:57 2011
@@ -1,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;
+}
Added: fsf/trunk/libc/elf/tst-unique3.h
==============================================================================
--- fsf/trunk/libc/elf/tst-unique3.h (added)
+++ fsf/trunk/libc/elf/tst-unique3.h Fri Mar 11 00:03:57 2011
@@ -1,0 +1,8 @@
+// BZ 12510
+template<typename T>
+struct S
+{
+ static int i;
+};
+
+extern int in_lib (void);
Propchange: fsf/trunk/libc/elf/tst-unique3.h
------------------------------------------------------------------------------
svn:mime-type = text/cpp
Added: fsf/trunk/libc/elf/tst-unique3lib.cc
==============================================================================
--- fsf/trunk/libc/elf/tst-unique3lib.cc (added)
+++ fsf/trunk/libc/elf/tst-unique3lib.cc Fri Mar 11 00:03:57 2011
@@ -1,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;
+}
Added: fsf/trunk/libc/elf/tst-unique3lib2.cc
==============================================================================
--- fsf/trunk/libc/elf/tst-unique3lib2.cc (added)
+++ fsf/trunk/libc/elf/tst-unique3lib2.cc Fri Mar 11 00:03:57 2011
@@ -1,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;
+}
Modified: fsf/trunk/libc/include/bits/dlfcn.h
==============================================================================
--- fsf/trunk/libc/include/bits/dlfcn.h (original)
+++ fsf/trunk/libc/include/bits/dlfcn.h Fri Mar 11 00:03:57 2011
@@ -1,4 +1,3 @@
#include_next <bits/dlfcn.h>
-extern void _dl_mcount_wrapper_check (void *__selfpc);
libc_hidden_proto (_dl_mcount_wrapper_check)
Modified: fsf/trunk/libc/sysdeps/i386/elf/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/elf/configure (original)
+++ fsf/trunk/libc/sysdeps/i386/elf/configure Fri Mar 11 00:03:57 2011
@@ -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 @@
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
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure Fri Mar 11 00:03:57 2011
@@ -16,8 +16,8 @@
.globl bar
bar: .skip 4
.text
- .globl main
-main: sethi %tgd_hi22(foo), %l1
+ .globl _start
+_start: sethi %tgd_hi22(foo), %l1
add %l1, %tgd_lo10(foo), %l1
add %l7, %l1, %o0, %tgd_add(foo)
call __tls_get_addr, %tgd_call(foo)
@@ -35,7 +35,7 @@
sethi %tle_hix22(foo), %l1
xor %l1, %tle_lox10(foo), %l1
EOF
-if { ac_try='${CC-cc} -o conftest.bin $CFLAGS conftest.s 1>&5'
+if { ac_try='${CC-cc} -o conftest.bin $CFLAGS $LDFLAGS conftest.s -nostdlib -nostartfiles 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure.in (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure.in Fri Mar 11 00:03:57 2011
@@ -13,8 +13,8 @@
.globl bar
bar: .skip 4
.text
- .globl main
-main: sethi %tgd_hi22(foo), %l1
+ .globl _start
+_start: sethi %tgd_hi22(foo), %l1
add %l1, %tgd_lo10(foo), %l1
add %l7, %l1, %o0, %tgd_add(foo)
call __tls_get_addr, %tgd_call(foo)
@@ -34,7 +34,7 @@
EOF
changequote([,])dnl
dnl
-if AC_TRY_COMMAND(${CC-cc} -o conftest.bin $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
+if AC_TRY_COMMAND(${CC-cc} -o conftest.bin $CFLAGS $LDFLAGS conftest.s -nostdlib -nostartfiles 1>&AS_MESSAGE_LOG_FD); then
libc_cv_sparc64_tls=yes
else
libc_cv_sparc64_tls=no
Modified: fsf/trunk/libc/wcsmbs/wchar.h
==============================================================================
--- fsf/trunk/libc/wcsmbs/wchar.h (original)
+++ fsf/trunk/libc/wcsmbs/wchar.h Fri Mar 11 00:03:57 2011
@@ -319,8 +319,7 @@
#endif
/* Compare N wide characters of S1 and S2. */
-extern int wmemcmp (__const wchar_t *__restrict __s1,
- __const wchar_t *__restrict __s2, size_t __n)
+extern int wmemcmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
__THROW __attribute_pure__;
/* Copy N wide characters of SRC to DEST. */