[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r7160 - in /fsf/trunk/libc: ./ elf/ nscd/ stdlib/
- To: commits@xxxxxxxxxx
- Subject: [commits] r7160 - in /fsf/trunk/libc: ./ elf/ nscd/ stdlib/
- From: eglibc@xxxxxxxxxx
- Date: Sat, 18 Oct 2008 07:03:06 -0000
Author: eglibc
Date: Sat Oct 18 00:03:04 2008
New Revision: 7160
Log:
Import glibc-mainline for 2008-10-18
Added:
fsf/trunk/libc/elf/tst-tls17.c
fsf/trunk/libc/elf/tst-tlsmod17a.c
fsf/trunk/libc/elf/tst-tlsmod17b.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/elf/Makefile
fsf/trunk/libc/nscd/connections.c
fsf/trunk/libc/stdlib/divmod_1.c
fsf/trunk/libc/stdlib/mod_1.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Oct 18 00:03:04 2008
@@ -1,3 +1,15 @@
+2008-10-17 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * elf/Makefile: Add rules to build and run tst-tls17.
+ * elf/tst-tls17.c: New test.
+ * elf/tst-tlsmod17a.c: New file.
+ * elf/tst-tlsmod17b.c: Likewise.
+
+2008-10-17 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * stdlib/divmod_1.c: Use correct type for dummy variable.
+ * stdlib/mod_1.c: Likewise.
+
2008-10-16 Ulrich Drepper <drepper@xxxxxxxxxx>
* elf/dl-tls.c (_dl_update_slotinfo): Copy all of the initial DTV.
Modified: fsf/trunk/libc/elf/Makefile
==============================================================================
--- fsf/trunk/libc/elf/Makefile (original)
+++ fsf/trunk/libc/elf/Makefile Sat Oct 18 00:03:04 2008
@@ -166,7 +166,7 @@
restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \
circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \
tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-tls15 \
- tst-tls16 tst-tls-dlinfo \
+ tst-tls16 tst-tls17 tst-tls-dlinfo \
tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
tst-dlmodcount tst-dlopenrpath tst-deep1 \
tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
@@ -181,6 +181,7 @@
tests: $(objpfx)tst-pie1.out
endif
tests: $(objpfx)tst-leaks1-mem
+tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
testobj1_1 failobj constload2 constload3 unloadmod \
dep1 dep2 dep3 dep4 vismod1 vismod2 vismod3 \
@@ -200,6 +201,8 @@
tst-tlsmod9 tst-tlsmod10 tst-tlsmod11 tst-tlsmod12 \
tst-tlsmod13 tst-tlsmod13a tst-tlsmod14a tst-tlsmod14b \
tst-tlsmod15a tst-tlsmod15b tst-tlsmod16a tst-tlsmod16b \
+ $(patsubst %,tst-tlsmod17a%,$(tlsmod17a-suffixes)) \
+ tst-tlsmod17b \
circlemod1 circlemod1a circlemod2 circlemod2a \
circlemod3 circlemod3a \
reldep8mod1 reldep8mod2 reldep8mod3 \
@@ -714,6 +717,13 @@
$(objpfx)tst-tls16: $(libdl)
$(objpfx)tst-tls16.out: $(objpfx)tst-tlsmod16a.so $(objpfx)tst-tlsmod16b.so
+$(objpfx)tst-tls17: $(libdl)
+$(objpfx)tst-tls17.out: $(objpfx)tst-tlsmod17b.so
+$(patsubst %,$(objpfx)tst-tlsmod17a%.os,$(tlsmod17a-suffixes)): $(objpfx)tst-tlsmod17a%.os : tst-tlsmod17a.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ -DN=$* -DNOT_IN_libc=1 $<
+$(patsubst %,$(objpfx)tst-tlsmod17a%.so,$(tlsmod17a-suffixes)): $(objpfx)tst-tlsmod17a%.so: $(objpfx)ld.so
+$(objpfx)tst-tlsmod17b.so: $(patsubst %,$(objpfx)tst-tlsmod17a%.so,$(tlsmod17a-suffixes))
+
CFLAGS-tst-align.c = $(stack-align-test-flags)
CFLAGS-tst-align2.c = $(stack-align-test-flags)
CFLAGS-tst-alignmod.c = $(stack-align-test-flags)
Added: fsf/trunk/libc/elf/tst-tls17.c
==============================================================================
--- fsf/trunk/libc/elf/tst-tls17.c (added)
+++ fsf/trunk/libc/elf/tst-tls17.c Sat Oct 18 00:03:04 2008
@@ -1,0 +1,28 @@
+#include <dlfcn.h>
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+ void *h = dlopen ("tst-tlsmod17b.so", RTLD_LAZY);
+ if (h == NULL)
+ {
+ puts ("unexpectedly failed to open tst-tlsmod17b.so");
+ exit (1);
+ }
+
+ int (*fp) (void) = (int (*) (void)) dlsym (h, "tlsmod17b");
+ if (fp == NULL)
+ {
+ puts ("cannot find tlsmod17b");
+ exit (1);
+ }
+
+ if (fp ())
+ exit (1);
+
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
Added: fsf/trunk/libc/elf/tst-tlsmod17a.c
==============================================================================
--- fsf/trunk/libc/elf/tst-tlsmod17a.c (added)
+++ fsf/trunk/libc/elf/tst-tlsmod17a.c Sat Oct 18 00:03:04 2008
@@ -1,0 +1,23 @@
+#include <stdio.h>
+
+#ifndef N
+#define N 0
+#endif
+#define CONCAT1(s, n) s##n
+#define CONCAT(s, n) CONCAT1(s, n)
+
+__thread int CONCAT (v, N) = 4;
+
+int
+CONCAT (tlsmod17a, N) (void)
+{
+ int *p = &CONCAT (v, N);
+ /* GCC assumes &var is never NULL, add optimization barrier. */
+ asm volatile ("" : "+r" (p));
+ if (p == NULL || *p != 4)
+ {
+ printf ("fail %d %p\n", N, p);
+ return 1;
+ }
+ return 0;
+}
Added: fsf/trunk/libc/elf/tst-tlsmod17b.c
==============================================================================
--- fsf/trunk/libc/elf/tst-tlsmod17b.c (added)
+++ fsf/trunk/libc/elf/tst-tlsmod17b.c Sat Oct 18 00:03:04 2008
@@ -1,0 +1,15 @@
+#define P(N) extern int tlsmod17a##N (void);
+#define PS P(0) P(1) P(2) P(3) P(4) P(5) P(6) P(7) P(8) P(9) \
+ P(10) P(12) P(13) P(14) P(15) P(16) P(17) P(18) P(19)
+PS
+#undef P
+
+int
+tlsmod17b (void)
+{
+ int res = 0;
+#define P(N) res |= tlsmod17a##N ();
+ PS
+#undef P
+ return res;
+}
Modified: fsf/trunk/libc/nscd/connections.c
==============================================================================
--- fsf/trunk/libc/nscd/connections.c (original)
+++ fsf/trunk/libc/nscd/connections.c Sat Oct 18 00:03:04 2008
@@ -1824,11 +1824,13 @@
if (have_paccept >= 0)
#endif
{
+#if 0
fd = TEMP_FAILURE_RETRY (paccept (sock, NULL, NULL, NULL,
SOCK_NONBLOCK));
#ifndef __ASSUME_PACCEPT
if (have_paccept == 0)
have_paccept = fd != -1 || errno != ENOSYS ? 1 : -1;
+#endif
#endif
}
#ifndef __ASSUME_PACCEPT
Modified: fsf/trunk/libc/stdlib/divmod_1.c
==============================================================================
--- fsf/trunk/libc/stdlib/divmod_1.c (original)
+++ fsf/trunk/libc/stdlib/divmod_1.c Sat Oct 18 00:03:04 2008
@@ -55,7 +55,7 @@
{
mp_size_t i;
mp_limb_t n1, n0, r;
- int dummy;
+ mp_limb_t dummy;
/* ??? Should this be handled at all? Rely on callers? */
if (dividend_size == 0)
Modified: fsf/trunk/libc/stdlib/mod_1.c
==============================================================================
--- fsf/trunk/libc/stdlib/mod_1.c (original)
+++ fsf/trunk/libc/stdlib/mod_1.c Sat Oct 18 00:03:04 2008
@@ -50,7 +50,7 @@
{
mp_size_t i;
mp_limb_t n1, n0, r;
- int dummy;
+ mp_limb_t dummy;
/* Botch: Should this be handled at all? Rely on callers? */
if (dividend_size == 0)