1
SVN update of svn://svn.eglibc.org/branches/eglibc-2_12 from revision 11211
1
SVN update of svn://svn.eglibc.org/branches/eglibc-2_13 from revision xxxxx
3
--- a/stdlib/msort.c (revision 11211)
4
+++ b/stdlib/msort.c (revision 12365)
14
static long int phys_pages;
17
- if (phys_pages == 0)
20
phys_pages = __sysconf (_SC_PHYS_PAGES);
23
a quarter of the physical memory. */
26
+ /* Make sure phys_pages is written to memory. */
27
+ atomic_write_barrier ();
29
pagesize = __sysconf (_SC_PAGESIZE);
32
--- a/stdlib/strtod_l.c (revision 11211)
33
+++ b/stdlib/strtod_l.c (revision 12365)
36
(void) __mpn_lshift (&retval[used
38
- retval, RETURN_LIMB_SIZE,
41
+ - used / BITS_PER_MP_LIMB),
42
used % BITS_PER_MP_LIMB);
43
for (i = used / BITS_PER_MP_LIMB - 1; i >= 0; --i)
45
--- a/scripts/data/localplt-s390x-linux-gnu.data (revision 0)
46
+++ b/scripts/data/localplt-s390x-linux-gnu.data (revision 12365)
48
+libc.so: _Unwind_Find_FDE
55
--- a/scripts/data/localplt-s390-linux-gnu.data (revision 0)
56
+++ b/scripts/data/localplt-s390-linux-gnu.data (revision 12365)
58
+libc.so: _Unwind_Find_FDE
65
--- a/wcsmbs/wcsmbsload.c (revision 11211)
66
+++ b/wcsmbs/wcsmbsload.c (revision 12365)
71
-__wcsmbs_load_conv (struct locale_data *new_category)
72
+__wcsmbs_load_conv (struct __locale_data *new_category)
74
/* When OPTION_EGLIBC_LOCALE_CODE is disabled, we should never reach
75
this point: there is no way to change locales, so every locale
76
--- a/wcsmbs/bits/wchar2.h (revision 11211)
77
+++ b/wcsmbs/bits/wchar2.h (revision 12365)
79
/* Checking macros for wchar functions.
80
- Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
81
+ Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
82
This file is part of the GNU C Library.
84
The GNU C Library is free software; you can redistribute it and/or
86
__const wchar_t *__s2,
87
size_t __n), wmemmove);
88
extern wchar_t *__REDIRECT_NTH (__wmemmove_chk_warn,
89
- (wchar_t *__restrict __s1,
90
- __const wchar_t *__restrict __s2, size_t __n,
91
- size_t __ns1), __wmemmove_chk)
92
+ (wchar_t *__s1, __const wchar_t *__s2,
93
+ size_t __n, size_t __ns1), __wmemmove_chk)
94
__warnattr ("wmemmove called with length bigger than size of destination "
97
__extern_always_inline wchar_t *
98
-__NTH (wmemmove (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2,
100
+__NTH (wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n))
102
if (__bos0 (__s1) != (size_t) -1)
107
__extern_always_inline wchar_t *
108
-__NTH (wmemset (wchar_t *__restrict __s, wchar_t __c, size_t __n))
109
+__NTH (wmemset (wchar_t *__s, wchar_t __c, size_t __n))
111
if (__bos0 (__s) != (size_t) -1)
114
__const wchar_t *__restrict __src), wcscpy);
116
__extern_always_inline wchar_t *
117
-__NTH (wcscpy (wchar_t *__dest, __const wchar_t *__src))
118
+__NTH (wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
120
if (__bos (__dest) != (size_t) -1)
121
return __wcscpy_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
122
@@ -160,14 +158,15 @@
126
-extern wchar_t *__wcpcpy_chk (wchar_t *__dest, __const wchar_t *__src,
127
+extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest,
128
+ __const wchar_t *__restrict __src,
129
size_t __destlen) __THROW;
130
-extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias, (wchar_t *__dest,
131
- __const wchar_t *__src),
133
+extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias,
134
+ (wchar_t *__restrict __dest,
135
+ __const wchar_t *__restrict __src), wcpcpy);
137
__extern_always_inline wchar_t *
138
-__NTH (wcpcpy (wchar_t *__dest, __const wchar_t *__src))
139
+__NTH (wcpcpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
141
if (__bos (__dest) != (size_t) -1)
142
return __wcpcpy_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
146
__extern_always_inline wchar_t *
147
-__NTH (wcsncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n))
148
+__NTH (wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
151
if (__bos (__dest) != (size_t) -1)
156
__extern_always_inline wchar_t *
157
-__NTH (wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n))
158
+__NTH (wcpncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
161
if (__bos (__dest) != (size_t) -1)
164
__const wchar_t *__restrict __src), wcscat);
166
__extern_always_inline wchar_t *
167
-__NTH (wcscat (wchar_t *__dest, __const wchar_t *__src))
168
+__NTH (wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
170
if (__bos (__dest) != (size_t) -1)
171
return __wcscat_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
173
size_t __n), wcsncat);
175
__extern_always_inline wchar_t *
176
-__NTH (wcsncat (wchar_t *__dest, __const wchar_t *__src, size_t __n))
177
+__NTH (wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
180
if (__bos (__dest) != (size_t) -1)
181
return __wcsncat_chk (__dest, __src, __n,
182
@@ -428,14 +430,16 @@
186
-extern size_t __wcrtomb_chk (char *__s, wchar_t __wchar, mbstate_t *__p,
187
- size_t __buflen) __THROW __wur;
188
+extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar,
189
+ mbstate_t *__restrict __p,
190
+ size_t __buflen) __THROW __wur;
191
extern size_t __REDIRECT_NTH (__wcrtomb_alias,
192
(char *__restrict __s, wchar_t __wchar,
193
mbstate_t *__restrict __ps), wcrtomb) __wur;
195
__extern_always_inline __wur size_t
196
-__NTH (wcrtomb (char *__s, wchar_t __wchar, mbstate_t *__ps))
197
+__NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
198
+ mbstate_t *__restrict __ps))
200
/* We would have to include <limits.h> to get a definition of MB_LEN_MAX.
201
But this would only disturb the namespace. So we define our own
202
--- a/wcsmbs/wcsatcliff.c (revision 11211)
203
+++ b/wcsmbs/wcsatcliff.c (revision 12365)
205
#define MEMCPY wmemcpy
206
#define MEMPCPY wmempcpy
207
#define MEMCHR wmemchr
208
+#define STRCMP wcscmp
209
+#define STRNCMP wcsncmp
212
#include "../string/stratcliff.c"
213
--- a/wcsmbs/wchar.h (revision 11211)
214
+++ b/wcsmbs/wchar.h (revision 12365)
215
@@ -555,17 +555,17 @@
216
extern long double wcstold_l (__const wchar_t *__restrict __nptr,
217
wchar_t **__restrict __endptr,
218
__locale_t __loc) __THROW;
222
-#ifdef __USE_XOPEN2K8
223
/* Copy SRC to DEST, returning the address of the terminating L'\0' in
225
-extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __THROW;
226
+extern wchar_t *wcpcpy (wchar_t *__restrict __dest,
227
+ __const wchar_t *__restrict __src) __THROW;
229
/* Copy no more than N characters of SRC to DEST, returning the address of
230
the last character written into DEST. */
231
-extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
232
+extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
233
+ __const wchar_t *__restrict __src, size_t __n)
237
--- a/include/dlfcn.h (revision 11211)
238
+++ b/include/dlfcn.h (revision 12365)
240
#define __RTLD_OPENEXEC 0x20000000
241
#define __RTLD_CALLMAP 0x10000000
242
#define __RTLD_AUDIT 0x08000000
243
+#define __RTLD_SECURE 0x04000000 /* Apply additional security checks. */
245
#define __LM_ID_CALLER -2
247
--- a/config.make.in (revision 11211)
248
+++ b/config.make.in (revision 12365)
250
enable-check-abi = @enable_check_abi@
251
have-forced-unwind = @libc_cv_forced_unwind@
252
have-fpie = @libc_cv_fpie@
253
-gnu89-inline-CFLAGS = @libc_cv_gnu89_inline@
254
+gnu89-inline-CFLAGS = @gnu89_inline@
255
have-ssp = @libc_cv_ssp@
256
have-selinux = @have_selinux@
257
have-libaudit = @have_libaudit@
258
--- a/configure.in (revision 11211)
259
+++ b/configure.in (revision 12365)
261
[enable single DSO with optimizations for multiple architectures]),
262
[multi_arch=$enableval],
263
[multi_arch=default])
264
-if test x"$multi_arch" != xno; then
265
- multi_arch_d=/multiarch
268
AC_ARG_ENABLE([experimental-malloc],
269
AC_HELP_STRING([--enable-experimental-malloc],
271
AC_DEFINE(USE_REGPARMS)
274
+# For the multi-arch option we need support in the assembler.
275
+AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
276
+ libc_cv_asm_gnu_indirect_function, [dnl
277
+cat > conftest.s <<EOF
278
+.type foo,%gnu_indirect_function
280
+if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
282
+ libc_cv_asm_gnu_indirect_function=yes
284
+ libc_cv_asm_gnu_indirect_function=no
288
+AC_MSG_CHECKING(whether .text pseudo-op must be used)
289
+AC_CACHE_VAL(libc_cv_dot_text, [dnl
290
+cat > conftest.s <<EOF
294
+if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
295
+ libc_cv_dot_text=.text
298
+if test -z "$libc_cv_dot_text"; then
304
+AC_CACHE_CHECK(for assembler global-symbol directive,
305
+ libc_cv_asm_global_directive, [dnl
306
+libc_cv_asm_global_directive=UNKNOWN
307
+for ac_globl in .globl .global .EXPORT; do
308
+ cat > conftest.s <<EOF
309
+ ${libc_cv_dot_text}
313
+ if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
314
+ libc_cv_asm_global_directive=${ac_globl}
317
+ test $libc_cv_asm_global_directive != UNKNOWN && break
319
+if test $libc_cv_asm_global_directive = UNKNOWN; then
320
+ AC_MSG_ERROR(cannot determine asm global directive)
322
+ AC_DEFINE_UNQUOTED(ASM_GLOBAL_DIRECTIVE, ${libc_cv_asm_global_directive})
325
+AC_CACHE_CHECK(for assembler .type directive prefix,
326
+ libc_cv_asm_type_prefix, [dnl
327
+libc_cv_asm_type_prefix=no
328
+for ac_try_prefix in '@' '%' '#'; do
329
+ cat > conftest.s <<EOF
330
+ ${libc_cv_dot_text}
331
+ ${libc_cv_asm_global_directive} foo
332
+ .type foo, ${ac_try_prefix}object
337
+ if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
338
+ libc_cv_asm_type_prefix=${ac_try_prefix}
341
+ test "x$libc_cv_asm_type_prefix" != xno && break
343
+if test "x$libc_cv_asm_type_prefix" != xno; then
344
+ AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
347
+if test x"$libc_cv_asm_gnu_indirect_function" != xyes -a x"$libc_cv_asm_type_prefix" = xno; then
348
+ if test x"$multi_arch" = xyes; then
349
+ AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support])
354
+if test x"$multi_arch" != xno; then
355
+ multi_arch_d=/multiarch
358
# Compute the list of sysdep directories for this configuration.
359
# This can take a while to compute.
360
sysdep_dir=$srcdir/sysdeps
361
@@ -727,29 +808,14 @@
363
# If the assembler supports gnu_indirect_function symbol type and the
364
# architecture supports multi-arch, we enable multi-arch by default.
365
-if test "$multi_arch" = default; then
366
-AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
367
- libc_cv_asm_gnu_indirect_function, [dnl
368
-cat > conftest.s <<EOF
369
-.type foo,%gnu_indirect_function
371
-if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
373
- libc_cv_asm_gnu_indirect_function=yes
375
- libc_cv_asm_gnu_indirect_function=no
378
+case $sysnames_add_ons$sysnames in
383
- if test "$libc_cv_asm_gnu_indirect_function" = yes; then
384
- case $sysnames_add_ons$sysnames in
391
-if test x"$multi_arch" = xyes; then
394
+if test x"$multi_arch" != xno; then
395
AC_DEFINE(USE_MULTIARCH)
398
@@ -1210,43 +1276,6 @@
399
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
402
-AC_MSG_CHECKING(whether .text pseudo-op must be used)
403
-AC_CACHE_VAL(libc_cv_dot_text, [dnl
404
-cat > conftest.s <<EOF
408
-if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
409
- libc_cv_dot_text=.text
412
-if test -z "$libc_cv_dot_text"; then
418
-AC_CACHE_CHECK(for assembler global-symbol directive,
419
- libc_cv_asm_global_directive, [dnl
420
-libc_cv_asm_global_directive=UNKNOWN
421
-for ac_globl in .globl .global .EXPORT; do
422
- cat > conftest.s <<EOF
423
- ${libc_cv_dot_text}
427
- if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
428
- libc_cv_asm_global_directive=${ac_globl}
431
- test $libc_cv_asm_global_directive != UNKNOWN && break
433
-if test $libc_cv_asm_global_directive = UNKNOWN; then
434
- AC_MSG_ERROR(cannot determine asm global directive)
436
- AC_DEFINE_UNQUOTED(ASM_GLOBAL_DIRECTIVE, ${libc_cv_asm_global_directive})
439
AC_CACHE_CHECK(for .set assembler directive, libc_cv_asm_set_directive, [dnl
440
cat > conftest.s <<EOF
442
@@ -1272,28 +1301,6 @@
443
AC_DEFINE(HAVE_ASM_SET_DIRECTIVE)
446
-AC_CACHE_CHECK(for assembler .type directive prefix,
447
- libc_cv_asm_type_prefix, [dnl
448
-libc_cv_asm_type_prefix=no
449
-for ac_try_prefix in '@' '%' '#'; do
450
- cat > conftest.s <<EOF
451
- ${libc_cv_dot_text}
452
- ${libc_cv_asm_global_directive} foo
453
- .type foo, ${ac_try_prefix}object
458
- if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
459
- libc_cv_asm_type_prefix=${ac_try_prefix}
462
- test "x$libc_cv_asm_type_prefix" != xno && break
464
-if test "x$libc_cv_asm_type_prefix" != xno; then
465
- AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
468
AC_CACHE_CHECK(for assembler gnu_unique_object symbol type,
469
libc_cv_asm_unique_object, [dnl
470
cat > conftest.s <<EOF
471
@@ -1311,29 +1318,6 @@
472
AC_DEFINE(HAVE_ASM_UNIQUE_OBJECT)
475
-# For the multi-arch option we need support in the assembler.
476
-if test "$multi_arch" = yes; then
477
- if test "x$libc_cv_asm_type_prefix" != xno; then
478
-AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
479
- libc_cv_asm_gnu_indirect_function, [dnl
480
-cat > conftest.s <<EOF
481
-.type foo,%gnu_indirect_function
483
-if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
485
- libc_cv_asm_gnu_indirect_function=yes
487
- libc_cv_asm_gnu_indirect_function=no
491
- libc_cv_asm_gnu_indirect_function=no
493
- if test x"$libc_cv_asm_gnu_indirect_function" != xyes; then
494
- AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support])
498
AC_CACHE_CHECK(for .symver assembler directive, libc_cv_asm_symver_directive,
499
[cat > conftest.s <<EOF
501
@@ -1827,11 +1811,11 @@
504
if test $libc_cv_gnu89_inline = yes; then
505
- libc_cv_gnu89_inline=-fgnu89-inline
506
+ gnu89_inline=-fgnu89-inline
508
- libc_cv_gnu89_inline=
511
-AC_SUBST(libc_cv_gnu89_inline)
512
+AC_SUBST(gnu89_inline)
514
if test $elf != yes; then
515
AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
516
--- a/ChangeLog (revision 11211)
517
+++ b/ChangeLog (revision 12365)
519
+2010-12-13 Andreas Schwab <schwab@redhat.com>
521
+ * version.h (VERSION): Bump for 2.12.2 release.
523
+2010-12-10 Andreas Schwab <schwab@redhat.com>
525
+ * wcsmbs/wchar.h (wcpcpy, wcpncpy): Only declare under
528
+2010-12-10 Andreas Schwab <schwab@redhat.com>
530
+ * wcsmbs/wchar.h (wcpcpy, wcpncpy): Add __restrict.
531
+ * wcsmbs/bits/wchar2.h (__wmemmove_chk_warn, wmemmove, wmemset):
533
+ (wcscpy, __wcpcpy_chk, __wcpcpy_alias, wcpcpy, wcsncpy, wcpncpy)
534
+ (wcscat, wcsncat, __wcrtomb_chk, wcrtomb): Add __restrict.
536
+2010-12-09 Ulrich Drepper <drepper@gmail.com>
539
+ * stdlib/msort.c (qsort_r): Make sure both phys_pages and pagesize
542
+2010-12-09 Jakub Jelinek <jakub@redhat.com>
544
+ * string/bits/string3.h (memmove, bcopy): Remove __restrict.
546
+2010-08-11 Ulrich Drepper <drepper@redhat.com>
549
+ * sysdeps/generic/netinet/ip.h (IPTOS_CLASS): Fix definition.
550
+ Patch by Evgeni Bikov <bikovevg@iitp.ru>.
552
+2010-08-21 Mike Frysinger <vapier@gentoo.org>
554
+ * configure.in: Move assembler checks to before sysdep dir checking.
556
+2010-11-24 Andreas Schwab <schwab@redhat.com>
558
+ * resolv/nss_dns/dns-host.c (getanswer_r): Don't handle ttl == 0
560
+ (gaih_getanswer_slice): Likewise.
562
+2010-05-31 Petr Baudis <pasky@suse.cz>
565
+ * elf/ldconfig.c (main): Allow aux_cache_file open()ing to fail
566
+ silently even in the chroot mode.
568
+2010-05-31 Petr Baudis <pasky@suse.cz>
571
+ * nis/nss_compat/compat-initgroups.c (internal_getgrent_r): Fix
572
+ initialization of skip_initgroups_dyn.
574
+2010-09-27 Andreas Schwab <schwab@redhat.com>
577
+ * sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS):
578
+ Mask out sign-bit copies when constructing f_fsid.
580
+2010-11-19 Ulrich Drepper <drepper@gmail.com>
582
+ * sysdeps/unix/sysv/linux/i386/bits/mman.h: Define MAP_HUGETLB.
583
+ * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise.
585
+2010-11-16 Ulrich Drepper <drepper@gmail.com>
587
+ * sysdeps/unix/sysv/linux/sys/swap.h (SWAP_FLAG_DISCARD): Define.
589
+2010-11-11 Andreas Schwab <schwab@redhat.com>
591
+ * posix/fnmatch_loop.c (NEW_PATTERN): Fix use of alloca.
592
+ * posix/Makefile (tests): Add $(objpfx)tst-fnmatch-mem.
593
+ (tst-fnmatch-ENV): Set MALLOC_TRACE.
594
+ ($(objpfx)tst-fnmatch-mem): New rule.
595
+ (generated): Add tst-fnmatch-mem and tst-fnmatch.mtrace.
596
+ * posix/tst-fnmatch.c (main): Call mtrace.
598
+2010-08-09 Ulrich Drepper <drepper@redhat.com>
601
+ * posix/fnmatch.c: Keep track of alloca use and fall back on malloc.
602
+ * posix/fnmatch_loop.c: Likewise.
604
+2010-11-10 Luis Machado <luisgpm@br.ibm.com>
606
+ * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c (__ieee754_sqrtl): Force
609
+2010-11-08 Ulrich Drepper <drepper@gmail.com>
612
+ * sysdeps/i386/bits/byteswap.h: Avoid warning in __bswap_16.
613
+ * sysdeps/x86_64/bits/byteswap.h: Likewise.
615
+2010-08-31 Mike Frysinger <vapier@gentoo.org>
617
+ * sysdeps/unix/sysv/linux/sparc/sys/epoll.h (epoll_create2): Delete.
618
+ (epoll_create1): Declare.
620
+2010-09-06 Andreas Schwab <schwab@redhat.com>
622
+ * manual/Makefile: Don't mix pattern rules with normal rules.
624
+2010-08-12 Andreas Schwab <schwab@redhat.com>
627
+ * locale/programs/locale.c (print_assignment): New function.
628
+ (show_locale_vars): Use it.
630
+2010-10-26 Ulrich Drepper <drepper@gmail.com>
632
+ * elf/rtld.c (dl_main): Move assertion after the point where rtld map
633
+ is added to the list.
635
+2010-10-24 Ulrich Drepper <drepper@redhat.com>
638
+ * malloc/malloc.c (_int_free): Fill correct number of bytes when
641
+2010-09-09 Andreas Schwab <schwab@redhat.com>
643
+ * Makeconfig (sysd-rules-patterns): Add rtld-%:rtld-%.
644
+ (sysd-rules-targets): Remove duplicates.
645
+ * elf/rtld-Rules ($(objpfx)rtld-%.os): Add pattern rules with
646
+ rtld-%.$o dependency.
648
+2010-10-18 Andreas Schwab <schwab@redhat.com>
650
+ * elf/dl-open.c (dl_open_worker): Don't expand DST here, let
651
+ _dl_map_object do it.
653
+2010-10-15 Andreas Schwab <schwab@redhat.com>
655
+ * scripts/data/localplt-s390-linux-gnu.data: New file.
656
+ * scripts/data/localplt-s390x-linux-gnu.data: New file.
658
+2010-10-12 Ulrich Drepper <drepper@redhat.com>
661
+ * posix/regcomp.c (parse_branch): One more memory leak plugged.
662
+ * posix/bug-regex31.input: Add test case.
664
+2010-10-11 Ulrich Drepper <drepper@gmail.com>
666
+ * posix/bug-regex31.c: Rewrite to run multiple tests from stdin.
667
+ * posix/bug-regex31.input: New file.
670
+ * posix/regcomp.c (parse_branch): Free memory when allocation failed.
671
+ (parse_sub_exp): Fix last change, use postorder.
673
+2010-10-11 Ulrich Drepper <drepper@gmail.com>
675
+ * posix/bug-regex31.c: New file.
676
+ * posix/Makefile: Add rules to build and run bug-regex31.
678
+2010-10-11 Ulrich Drepper <drepper@gmail.com>
680
+ * posix/regcomp.c (parse_bracket_exp): Add missing re_free calls.
683
+ * posix/regcomp.c (parse_sub_exp): Free tree data when it is not used.
685
+2010-10-11 Ulrich Drepper <drepper@gmail.com>
688
+ * sysdeps/unix/sysv/linux/check_pf.c (__check_pf): ->ifa_addr might
691
+2010-10-03 Ulrich Drepper <drepper@gmail.com>
694
+ * malloc/mcheck.c: Handle large requests.
696
+2010-09-15 Joseph Myers <joseph@codesourcery.com>
698
+ * sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): When
699
+ implementing getdents64 using getdents syscall, set d_type if
700
+ __ASSUME_GETDENTS32_D_TYPE.
702
+2010-09-14 Andreas Schwab <schwab@redhat.com>
704
+ * sysdeps/s390/s390-32/__longjmp.c (__longjmp): Define register
705
+ variables after CHECK_SP call.
706
+ * sysdeps/s390/s390-64/__longjmp.c (__longjmp): Likewise.
708
+2010-09-08 Chung-Lin Tang <cltang@codesourcery.com>
709
+ Ulrich Drepper <drepper@redhat.com>
712
+ * sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
713
+ (____longjmp_chk): Use %ebx for saving value across system call.
716
+2010-08-31 Mike Frysinger <vapier@gentoo.org>
718
+ * sysdeps/unix/sysv/linux/x86_64/sys/epoll.h: Fix typo.
720
+2010-08-31 Andreas Schwab <schwab@redhat.com>
723
+ * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix array overflow when
724
+ shifting retval into place.
726
+2010-09-14 Ulrich Drepper <drepper@redhat.com>
728
+ * resolv/res_init.c (__res_vinit): Count the default server we added.
730
+2010-08-25 Ulrich Drepper <drepper@redhat.com>
733
+ * resolv/res_init.c (__res_vinit): When no server address at all
734
+ is given default to loopback.
736
+2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
738
+ * sysdeps/i386/elf/Makefile: New file.
740
+2010-07-31 Samuel Thibault <samuel.thibault@ens-lyon.org>
742
+ * hurd/hurdselect.c (_hurd_select): Round timeout up instead of down
743
+ when converting to ms.
745
+2010-07-29 Roland McGrath <roland@redhat.com>
748
+ * manual/locale.texi (Yes-or-No Questions): Fix example code.
750
2010-07-27 Andreas Schwab <schwab@redhat.com>
752
+ * manual/memory.texi (Malloc Tunable Parameters): Document
755
+2010-07-26 Roland McGrath <roland@redhat.com>
758
+ * configure.in (-fgnu89-inline check): Set and substitute
759
+ gnu89_inline, not libc_cv_gnu89_inline.
760
+ * configure: Regenerated.
761
+ * config.make.in (gnu89-inline-CFLAGS): Use @gnu89_inline@.
763
+2010-07-20 Roland McGrath <roland@redhat.com>
765
+ * elf/dl-sysdep.c (_dl_important_hwcaps): Add dsocaps mask to
766
+ dl_hwcap_mask as well as dl_hwcap. Without this, dsocaps matching in
767
+ ld.so.cache was broken. With it, there is no way to disable dsocaps
768
+ like LD_HWCAP_MASK can disable hwcaps.
770
+2010-07-05 Roland McGrath <roland@redhat.com>
772
+ * manual/arith.texi (Rounding Functions): Fix rint description
773
+ implicit in round description.
775
+2010-07-02 Ulrich Drepper <drepper@redhat.com>
777
+ * elf/Makefile: Fix linking for a few tests to make recent linker
780
+2010-06-02 Emilio Pozuelo Monfort <pochu27@gmail.com>
782
+ * hurd/lookup-at.c (__file_name_lookup_at): Accept
783
+ AT_SYMLINK_FOLLOW in AT_FLAGS. Fail with EINVAL if both
784
+ AT_SYMLINK_FOLLOW and AT_SYMLINK_NOFOLLOW are present
786
+ * hurd/hurd/fd.h (__file_name_lookup_at): Update comment.
787
+ * sysdeps/mach/hurd/linkat.c (linkat): Pass O_NOLINK in FLAGS.
789
+2010-11-03 H.J. Lu <hongjiu.lu@intel.com>
792
+ * sysdeps/i386/i686/cacheinfo.c (__x86_64_raw_data_cache_size): New.
793
+ (__x86_64_raw_data_cache_size_half): Likewise.
794
+ (__x86_64_raw_shared_cache_size): Likewise.
795
+ (__x86_64_raw_shared_cache_size_half): Likewise.
797
+ * sysdeps/x86_64/cacheinfo.c (__x86_64_raw_data_cache_size): New.
798
+ (__x86_64_raw_data_cache_size_half): Likewise.
799
+ (__x86_64_raw_shared_cache_size): Likewise.
800
+ (__x86_64_raw_shared_cache_size_half): Likewise.
801
+ (init_cacheinfo): Set __x86_64_raw_data_cache_size,
802
+ __x86_64_raw_data_cache_size_half, __x86_64_raw_shared_cache_size
803
+ and __x86_64_raw_shared_cache_size_half. Round
804
+ __x86_64_data_cache_size_half, __x86_64_data_cache_size
805
+ __x86_64_shared_cache_size_half and __x86_64_shared_cache_size,
806
+ to multiple of 256 bytes.
808
+2010-11-03 Ulrich Drepper <drepper@gmail.com>
811
+ * sysdeps/unix/sysv/linux/ttyname.c (ttyname): Recognize new mangling
812
+ of inacessible symlinks. Verify result of symlink before returning it.
813
+ * sysdeps/unix/sysv/linux/ttyname_r.c (__ttyname_r): Likewise.
814
+ Patch mostly by Miklos Szeredi <miklos@szeredi.hu>.
816
+2010-10-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
817
+ Ulrich Drepper <drepper@gmail.com>
819
+ * elf/dl-object.c (_dl_new_object): Don't append the new object to
820
+ the global list here. Move code to...
821
+ (_dl_add_to_namespace_list): ...here. New function.
822
+ * elf/rtld.c (dl_main): Invoke _dl_add_to_namespace_list.
823
+ * sysdeps/generic/ldsodefs.h (_dl_add_to_namespace_list): Declare.
824
+ * elf/dl-load.c (lose): Don't remove the element from the list.
825
+ (_dl_map_object_from_fd): Invoke _dl_add_to_namespace_list.
826
+ (_dl_map_object): Likewise.
828
+2010-10-25 Ulrich Drepper <drepper@redhat.com>
831
+ * sysdeps/x86_64/multiarch/strchr.S: Fix propagation of search byte
832
+ into all bytes of SSE register.
833
+ Patch by Richard Li <richardpku@gmail.com>.
835
+2010-10-22 Andreas Schwab <schwab@redhat.com>
837
+ * include/dlfcn.h (__RTLD_SECURE): Define.
838
+ * elf/dl-load.c (_dl_map_object): Remove preloaded parameter. Use
839
+ mode & __RTLD_SECURE instead.
840
+ (open_path): Rename preloaded parameter to secure.
841
+ * sysdeps/generic/ldsodefs.h (_dl_map_object): Adjust declaration.
842
+ * elf/dl-open.c (dl_open_worker): Adjust call to _dl_map_object.
843
+ * elf/dl-deps.c (openaux): Likewise.
844
+ * elf/rtld.c (struct map_args): Remove is_preloaded.
845
+ (map_doit): Don't use it.
846
+ (dl_main): Likewise.
847
+ (do_preload): Use __RTLD_SECURE instead of is_preloaded.
848
+ (dlmopen_doit): Add __RTLD_SECURE to mode bits.
850
+2010-10-06 Ulrich Drepper <drepper@gmail.com>
852
+ * string/bug-strstr1.c: New file.
853
+ * string/Makefile: Add rules to build and run bug-strstr1.
855
+2010-10-05 Eric Blake <eblake@redhat.com>
858
+ * string/str-two-way.h (two_way_long_needle): Always clear memory
859
+ when skipping input due to the shift table.
861
+2010-10-03 Ulrich Drepper <drepper@gmail.com>
864
+ * sysdeps/x86_64/strcmp.S: Fix handling of remaining bytes in buffer
866
+ * string/stratcliff.c: Add tests for strcmp and strncmp.
867
+ * wcsmbs/wcsatcliff.c: Adjust for stratcliff change.
869
+2010-08-19 Andreas Schwab <schwab@redhat.com>
871
+ * sysdeps/i386/i686/multiarch/strspn.S [!SHARED]: Fix SSE4.2 check.
873
+2010-08-06 Ulrich Drepper <drepper@redhat.com>
875
+ * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid):
876
+ Also fail if tpwd after pwuid call is NULL.
878
+2010-06-21 Andreas Schwab <schwab@redhat.com>
880
+ * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid):
881
+ Restore proper fallback handling.
883
+2010-06-19 Ulrich Drepper <drepper@redhat.com>
885
+ * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid): Handle
886
+ OOM in getpwuid_r correctly. Return error number when the caller
887
+ should return, otherwise -1.
888
+ (getlogin_r): Adjust to return also for result of __getlogin_r_loginuid
889
+ call returning > 0 value.
890
+ * sysdeps/unix/sysv/linux/getlogin.c (getlogin): Likewise.
892
+2010-07-27 Andreas Schwab <schwab@redhat.com>
894
* version.h (VERSION): Bump for 2.12.1 release.
896
2010-06-02 Kirill A. Shutemov <kirill@shutemov.name>
897
--- a/sysdeps/unix/sysv/linux/sparc/sys/epoll.h (revision 11211)
898
+++ b/sysdeps/unix/sysv/linux/sparc/sys/epoll.h (revision 12365)
900
-/* Copyright (C) 2002-2006, 2007, 2008 Free Software Foundation, Inc.
901
+/* Copyright (C) 2002-2006, 2007, 2008, 2010 Free Software Foundation, Inc.
902
This file is part of the GNU C Library.
904
The GNU C Library is free software; you can redistribute it and/or
909
-/* Flags to be passed to epoll_create2. */
910
+/* Flags to be passed to epoll_create1. */
913
EPOLL_CLOEXEC = 0x400000,
915
returned by epoll_create() should be closed with close(). */
916
extern int epoll_create (int __size) __THROW;
918
-/* Same as epoll_create but with an additional FLAGS parameter. */
919
-extern int epoll_create2 (int __size, int __flags) __THROW;
920
+/* Same as epoll_create but with an FLAGS parameter. The unused SIZE
921
+ parameter has been dropped. */
922
+extern int epoll_create1 (int __flags) __THROW;
925
/* Manipulate an epoll instance "epfd". Returns 0 in case of success,
926
--- a/sysdeps/unix/sysv/linux/i386/bits/mman.h (revision 11211)
927
+++ b/sysdeps/unix/sysv/linux/i386/bits/mman.h (revision 12365)
929
/* Definitions for POSIX memory map interface. Linux/i386 version.
930
- Copyright (C) 1997,2000,2003,2005,2006,2009 Free Software Foundation, Inc.
931
+ Copyright (C) 1997,2000,2003,2005,2006,2009,2010
932
+ Free Software Foundation, Inc.
933
This file is part of the GNU C Library.
935
The GNU C Library is free software; you can redistribute it and/or
937
# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
938
# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
939
# define MAP_STACK 0x20000 /* Allocation is for a stack. */
940
+# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
943
/* Flags to `msync'. */
944
--- a/sysdeps/unix/sysv/linux/ttyname_r.c (revision 11211)
945
+++ b/sysdeps/unix/sysv/linux/ttyname_r.c (revision 12365)
947
-/* Copyright (C) 1991,92,93,1995-2001,2003,2006 Free Software Foundation, Inc.
948
+/* Copyright (C) 1991-1993,1995-2001,2003,2006,2010
949
+ Free Software Foundation, Inc.
950
This file is part of the GNU C Library.
952
The GNU C Library is free software; you can redistribute it and/or
954
if (__builtin_expect (__tcgetattr (fd, &term) < 0, 0))
957
+ if (__fxstat64 (_STAT_VER, fd, &st) < 0)
960
/* We try using the /proc filesystem. */
961
*_fitoa_word (fd, __stpcpy (procname, "/proc/self/fd/"), 10, 0) = '\0';
963
@@ -145,13 +149,31 @@
967
+#define UNREACHABLE_LEN strlen ("(unreachable)")
968
+ if (ret > UNREACHABLE_LEN
969
+ && memcmp (buf, "(unreachable)", UNREACHABLE_LEN) == 0)
971
+ memmove (buf, buf + UNREACHABLE_LEN, ret - UNREACHABLE_LEN);
972
+ ret -= UNREACHABLE_LEN;
975
+ /* readlink need not terminate the string. */
979
+ /* Verify readlink result, fall back on iterating through devices. */
981
+ && __xstat64 (_STAT_VER, buf, &st1) == 0
982
+#ifdef _STATBUF_ST_RDEV
983
+ && S_ISCHR (st1.st_mode)
984
+ && st1.st_rdev == st.st_rdev
986
+ && st1.st_ino == st.st_ino
987
+ && st1.st_dev == st.st_dev
993
- if (__fxstat64 (_STAT_VER, fd, &st) < 0)
996
/* Prepare the result buffer. */
997
memcpy (buf, "/dev/pts/", sizeof ("/dev/pts/"));
998
buflen -= sizeof ("/dev/pts/") - 1;
999
--- a/sysdeps/unix/sysv/linux/getlogin.c (revision 11211)
1000
+++ b/sysdeps/unix/sysv/linux/getlogin.c (revision 12365)
1005
- if (__getlogin_r_loginuid (name, sizeof (name)) == 0)
1007
+ int res = __getlogin_r_loginuid (name, sizeof (name));
1009
+ return res == 0 ? name : NULL;
1011
return getlogin_fd0 ();
1013
--- a/sysdeps/unix/sysv/linux/ttyname.c (revision 11211)
1014
+++ b/sysdeps/unix/sysv/linux/ttyname.c (revision 12365)
1016
-/* Copyright (C) 1991,92,93,1996-2002,2006,2009 Free Software Foundation, Inc.
1017
+/* Copyright (C) 1991-1993,1996-2002,2006,2009,2010
1018
+ Free Software Foundation, Inc.
1019
This file is part of the GNU C Library.
1021
The GNU C Library is free software; you can redistribute it and/or
1023
if (__builtin_expect (__tcgetattr (fd, &term) < 0, 0))
1026
+ if (__fxstat64 (_STAT_VER, fd, &st) < 0)
1029
/* We try using the /proc filesystem. */
1030
*_fitoa_word (fd, __stpcpy (procname, "/proc/self/fd/"), 10, 0) = '\0';
1032
@@ -161,14 +165,33 @@
1034
if ((size_t) len >= buflen)
1037
+#define UNREACHABLE_LEN strlen ("(unreachable)")
1038
+ if (len > UNREACHABLE_LEN
1039
+ && memcmp (ttyname_buf, "(unreachable)", UNREACHABLE_LEN) == 0)
1041
+ memmove (ttyname_buf, ttyname_buf + UNREACHABLE_LEN,
1042
+ len - UNREACHABLE_LEN);
1043
+ len -= UNREACHABLE_LEN;
1046
/* readlink need not terminate the string. */
1047
ttyname_buf[len] = '\0';
1048
- return ttyname_buf;
1050
+ /* Verify readlink result, fall back on iterating through devices. */
1051
+ if (ttyname_buf[0] == '/'
1052
+ && __xstat64 (_STAT_VER, ttyname_buf, &st1) == 0
1053
+#ifdef _STATBUF_ST_RDEV
1054
+ && S_ISCHR (st1.st_mode)
1055
+ && st1.st_rdev == st.st_rdev
1057
+ && st1.st_ino == st.st_ino
1058
+ && st1.st_dev == st.st_dev
1061
+ return ttyname_buf;
1064
- if (__fxstat64 (_STAT_VER, fd, &st) < 0)
1067
if (__xstat64 (_STAT_VER, "/dev/pts", &st1) == 0 && S_ISDIR (st1.st_mode))
1069
#ifdef _STATBUF_ST_RDEV
1070
--- a/sysdeps/unix/sysv/linux/sys/swap.h (revision 11211)
1071
+++ b/sysdeps/unix/sysv/linux/sys/swap.h (revision 12365)
1073
/* Calls to enable and disable swapping on specified locations. Linux version.
1074
- Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
1075
+ Copyright (C) 1996, 1998, 1999, 2010 Free Software Foundation, Inc.
1076
This file is part of the GNU C Library.
1078
The GNU C Library is free software; you can redistribute it and/or
1080
#define SWAP_FLAG_PREFER 0x8000 /* Set if swap priority is specified. */
1081
#define SWAP_FLAG_PRIO_MASK 0x7fff
1082
#define SWAP_FLAG_PRIO_SHIFT 0
1083
+#define SWAP_FLAG_DISCARD 0x10000 /* Discard swap cluster after use. */
1087
--- a/sysdeps/unix/sysv/linux/check_pf.c (revision 11211)
1088
+++ b/sysdeps/unix/sysv/linux/check_pf.c (revision 12365)
1090
/* Determine protocol families for which interfaces exist. Linux version.
1091
- Copyright (C) 2003, 2006, 2007, 2008 Free Software Foundation, Inc.
1092
+ Copyright (C) 2003, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
1093
This file is part of the GNU C Library.
1095
The GNU C Library is free software; you can redistribute it and/or
1096
@@ -304,10 +304,13 @@
1098
struct ifaddrs *runp;
1099
for (runp = ifa; runp != NULL; runp = runp->ifa_next)
1100
- if (runp->ifa_addr->sa_family == PF_INET)
1101
- *seen_ipv4 = true;
1102
- else if (runp->ifa_addr->sa_family == PF_INET6)
1103
- *seen_ipv6 = true;
1104
+ if (runp->ifa_addr != NULL)
1106
+ if (runp->ifa_addr->sa_family == PF_INET)
1107
+ *seen_ipv4 = true;
1108
+ else if (runp->ifa_addr->sa_family == PF_INET6)
1109
+ *seen_ipv6 = true;
1112
(void) freeifaddrs (ifa);
1114
--- a/sysdeps/unix/sysv/linux/getdents.c (revision 11211)
1115
+++ b/sysdeps/unix/sysv/linux/getdents.c (revision 12365)
1117
-/* Copyright (C) 1993, 1995-2003, 2004, 2006, 2007
1118
+/* Copyright (C) 1993, 1995-2004, 2006, 2007, 2010
1119
Free Software Foundation, Inc.
1120
This file is part of the GNU C Library.
1122
@@ -285,7 +285,11 @@
1123
DIRENT_SET_DP_INO(dp, kdp->d_ino);
1124
dp->d_off = kdp->d_off;
1125
dp->d_reclen = new_reclen;
1126
+#ifdef __ASSUME_GETDENTS32_D_TYPE
1127
+ dp->d_type = *((char *) kdp + kdp->d_reclen - 1);
1129
dp->d_type = DT_UNKNOWN;
1131
memcpy (dp->d_name, kdp->d_name,
1132
kdp->d_reclen - offsetof (struct kernel_dirent, d_name));
1134
--- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S (revision 11211)
1135
+++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S (revision 12365)
1137
-/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
1138
+/* Copyright (C) 2001,2004,2005,2006,2009,2010 Free Software Foundation, Inc.
1139
This file is part of the GNU C Library.
1141
The GNU C Library is free software; you can redistribute it and/or
1144
ENTRY(____longjmp_chk)
1145
/* Restore registers. */
1146
- movq (JB_RSP*8)(%rdi),%r8
1147
- movq (JB_RBP*8)(%rdi),%r9
1148
- movq (JB_PC*8)(%rdi),%rdx
1149
+ movq (JB_RSP*8)(%rdi), %r8
1150
+ movq (JB_RBP*8)(%rdi), %r9
1151
+ movq (JB_PC*8)(%rdi), %rdx
1157
/* Save function parameters. */
1160
+ cfi_register (%rdi, %r10)
1162
+ cfi_register (%rsi, %rbx)
1165
leaq -24(%rsp), %rsi
1169
.Lok2: movq %r10, %rdi
1171
+ cfi_restore (%rdi)
1173
+ cfi_restore (%rsi)
1175
.Lok: /* We add unwind information for the target here. */
1176
cfi_def_cfa(%rdi, 0)
1177
@@ -96,11 +100,11 @@
1178
cfi_offset(%r13,JB_R13*8)
1179
cfi_offset(%r14,JB_R14*8)
1180
cfi_offset(%r15,JB_R15*8)
1181
- movq (JB_RBX*8)(%rdi),%rbx
1182
- movq (JB_R12*8)(%rdi),%r12
1183
- movq (JB_R13*8)(%rdi),%r13
1184
- movq (JB_R14*8)(%rdi),%r14
1185
- movq (JB_R15*8)(%rdi),%r15
1186
+ movq (JB_RBX*8)(%rdi), %rbx
1187
+ movq (JB_R12*8)(%rdi), %r12
1188
+ movq (JB_R13*8)(%rdi), %r13
1189
+ movq (JB_R14*8)(%rdi), %r14
1190
+ movq (JB_R15*8)(%rdi), %r15
1191
/* Set return value for setjmp. */
1194
--- a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h (revision 11211)
1195
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h (revision 12365)
1197
/* Definitions for POSIX memory map interface. Linux/x86_64 version.
1198
- Copyright (C) 2001, 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
1199
+ Copyright (C) 2001,2003,2005,2006,2009,2010 Free Software Foundation, Inc.
1200
This file is part of the GNU C Library.
1202
The GNU C Library is free software; you can redistribute it and/or
1204
# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
1205
# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
1206
# define MAP_STACK 0x20000 /* Allocation is for a stack. */
1207
+# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
1210
/* Flags to `msync'. */
1211
--- a/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h (revision 11211)
1212
+++ b/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h (revision 12365)
1214
-/* Copyright (C) 2002,2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
1215
+/* Copyright (C) 2002-2008, 2010 Free Software Foundation, Inc.
1216
This file is part of the GNU C Library.
1218
The GNU C Library is free software; you can redistribute it and/or
1223
-/* Flags to be passed to epoll_create2. */
1224
+/* Flags to be passed to epoll_create1. */
1227
EPOLL_CLOEXEC = 02000000,
1228
--- a/sysdeps/unix/sysv/linux/internal_statvfs.c (revision 11211)
1229
+++ b/sysdeps/unix/sysv/linux/internal_statvfs.c (revision 12365)
1231
buf->f_files = fsbuf->f_files;
1232
buf->f_ffree = fsbuf->f_ffree;
1233
if (sizeof (buf->f_fsid) == sizeof (fsbuf->f_fsid))
1234
- buf->f_fsid = (fsbuf->f_fsid.__val[0]
1235
+ buf->f_fsid = ((fsbuf->f_fsid.__val[0]
1236
+ & ((1UL << (8 * sizeof (fsbuf->f_fsid.__val[0]))) - 1))
1237
| ((unsigned long int) fsbuf->f_fsid.__val[1]
1238
<< (8 * (sizeof (buf->f_fsid)
1239
- sizeof (fsbuf->f_fsid.__val[0])))));
1240
--- a/sysdeps/unix/sysv/linux/getlogin_r.c (revision 11211)
1241
+++ b/sysdeps/unix/sysv/linux/getlogin_r.c (revision 12365)
1246
+/* Try to determine login name from /proc/self/loginuid and return 0
1247
+ if successful. If /proc/self/loginuid cannot be read return -1.
1248
+ Otherwise return the error number. */
1252
__getlogin_r_loginuid (name, namesize)
1255
int fd = open_not_cancel_2 ("/proc/self/loginuid", O_RDONLY);
1260
/* We are reading a 32-bit number. 12 bytes are enough for the text
1261
representation. If not, something is wrong. */
1263
|| (uidbuf[n] = '\0',
1264
uid = strtoul (uidbuf, &endp, 10),
1265
endp == uidbuf || *endp != '\0'))
1269
size_t buflen = 1024;
1270
char *buf = alloca (buflen);
1271
bool use_malloc = false;
1273
struct passwd *tpwd;
1277
- while ((res = __getpwuid_r (uid, &pwd, buf, buflen, &tpwd)) != 0)
1278
+ while ((res = __getpwuid_r (uid, &pwd, buf, buflen, &tpwd)) == ERANGE)
1279
if (__libc_use_alloca (2 * buflen))
1280
- extend_alloca (buf, buflen, 2 * buflen);
1281
+ buf = extend_alloca (buf, buflen, 2 * buflen);
1285
char *newp = realloc (use_malloc ? buf : NULL, buflen);
1301
+ if (res != 0 || tpwd == NULL)
1308
size_t needed = strlen (pwd.pw_name) + 1;
1309
if (needed > namesize)
1315
- if (__getlogin_r_loginuid (name, namesize) == 0)
1317
+ int res = __getlogin_r_loginuid (name, namesize);
1321
return getlogin_r_fd0 (name, namesize);
1323
--- a/sysdeps/i386/bits/byteswap.h (revision 11211)
1324
+++ b/sysdeps/i386/bits/byteswap.h (revision 12365)
1326
/* Macros to swap the order of bytes in integer values.
1327
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008
1328
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008, 2010
1329
Free Software Foundation, Inc.
1330
This file is part of the GNU C Library.
1334
/* Swap bytes in 16 bit value. */
1335
#define __bswap_constant_16(x) \
1336
- ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
1337
+ ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
1341
# define __bswap_16(x) \
1343
- ({ register unsigned short int __v, __x = (x); \
1344
+ ({ register unsigned short int __v, __x = (unsigned short int) (x); \
1345
if (__builtin_constant_p (__x)) \
1346
__v = __bswap_constant_16 (__x); \
1348
__asm__ ("rorw $8, %w0" \
1356
/* This is better than nothing. */
1357
# define __bswap_16(x) \
1359
- ({ register unsigned short int __x = (x); __bswap_constant_16 (__x); }))
1360
+ ({ register unsigned short int __x = (unsigned short int) (x); \
1361
+ __bswap_constant_16 (__x); }))
1364
static __inline unsigned short int
1367
({ union { __extension__ unsigned long long int __ll; \
1368
unsigned long int __l[2]; } __w, __r; \
1369
- if (__builtin_constant_p (x)) \
1370
+ if (__builtin_constant_p (x)) \
1371
__r.__ll = __bswap_constant_64 (x); \
1374
--- a/sysdeps/i386/i686/multiarch/strspn.S (revision 11211)
1375
+++ b/sysdeps/i386/i686/multiarch/strspn.S (revision 12365)
1377
/* Multiple versions of strspn
1378
- Copyright (C) 2009 Free Software Foundation, Inc.
1379
+ Copyright (C) 2009,2010 Free Software Foundation, Inc.
1380
Contributed by Intel Corporation.
1381
This file is part of the GNU C Library.
1385
call __init_cpu_features
1386
1: leal __strspn_ia32, %eax
1387
- testl $index_SSE2, CPUID_OFFSET+index_SSE4_2+__cpu_features
1388
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features
1390
leal __strspn_sse42, %eax
1392
--- a/sysdeps/i386/i686/cacheinfo.c (revision 11211)
1393
+++ b/sysdeps/i386/i686/cacheinfo.c (revision 12365)
1395
#define __x86_64_data_cache_size __x86_data_cache_size
1396
+#define __x86_64_raw_data_cache_size __x86_raw_data_cache_size
1397
#define __x86_64_data_cache_size_half __x86_data_cache_size_half
1398
+#define __x86_64_raw_data_cache_size_half __x86_raw_data_cache_size_half
1399
#define __x86_64_shared_cache_size __x86_shared_cache_size
1400
+#define __x86_64_raw_shared_cache_size __x86_raw_shared_cache_size
1401
#define __x86_64_shared_cache_size_half __x86_shared_cache_size_half
1402
+#define __x86_64_raw_shared_cache_size_half __x86_raw_shared_cache_size_half
1404
#define DISABLE_PREFETCHW
1405
#define DISABLE_PREFERRED_MEMORY_INSTRUCTION
1406
--- a/sysdeps/x86_64/strcmp.S (revision 11211)
1407
+++ b/sysdeps/x86_64/strcmp.S (revision 12365)
1409
jnz LABEL(ashr_1_exittail) /* find null char*/
1411
# ifdef USE_AS_STRNCMP
1414
jbe LABEL(ashr_1_exittail)
1418
jnz LABEL(ashr_2_exittail)
1420
# ifdef USE_AS_STRNCMP
1423
jbe LABEL(ashr_2_exittail)
1427
jnz LABEL(ashr_3_exittail)
1429
# ifdef USE_AS_STRNCMP
1432
jbe LABEL(ashr_3_exittail)
1436
jnz LABEL(ashr_4_exittail)
1438
# ifdef USE_AS_STRNCMP
1441
jbe LABEL(ashr_4_exittail)
1445
jnz LABEL(ashr_5_exittail)
1447
# ifdef USE_AS_STRNCMP
1450
jbe LABEL(ashr_5_exittail)
1454
jnz LABEL(ashr_6_exittail)
1456
# ifdef USE_AS_STRNCMP
1459
jbe LABEL(ashr_6_exittail)
1462
@@ -1055,7 +1055,7 @@
1463
jnz LABEL(ashr_7_exittail)
1465
# ifdef USE_AS_STRNCMP
1468
jbe LABEL(ashr_7_exittail)
1471
@@ -1177,7 +1177,7 @@
1472
jnz LABEL(ashr_8_exittail)
1474
# ifdef USE_AS_STRNCMP
1477
jbe LABEL(ashr_8_exittail)
1480
@@ -1299,7 +1299,7 @@
1481
jnz LABEL(ashr_9_exittail)
1483
# ifdef USE_AS_STRNCMP
1486
jbe LABEL(ashr_9_exittail)
1489
@@ -1421,7 +1421,7 @@
1490
jnz LABEL(ashr_10_exittail)
1492
# ifdef USE_AS_STRNCMP
1495
jbe LABEL(ashr_10_exittail)
1498
@@ -1543,7 +1543,7 @@
1499
jnz LABEL(ashr_11_exittail)
1501
# ifdef USE_AS_STRNCMP
1504
jbe LABEL(ashr_11_exittail)
1507
@@ -1665,7 +1665,7 @@
1508
jnz LABEL(ashr_12_exittail)
1510
# ifdef USE_AS_STRNCMP
1513
jbe LABEL(ashr_12_exittail)
1516
@@ -1787,7 +1787,7 @@
1517
jnz LABEL(ashr_13_exittail)
1519
# ifdef USE_AS_STRNCMP
1522
jbe LABEL(ashr_13_exittail)
1525
@@ -1909,7 +1909,7 @@
1526
jnz LABEL(ashr_14_exittail)
1528
# ifdef USE_AS_STRNCMP
1531
jbe LABEL(ashr_14_exittail)
1534
@@ -2033,8 +2033,8 @@
1535
jnz LABEL(ashr_15_exittail)
1537
# ifdef USE_AS_STRNCMP
1539
- je LABEL(ashr_15_exittail)
1541
+ jbe LABEL(ashr_15_exittail)
1545
--- a/sysdeps/x86_64/cacheinfo.c (revision 11211)
1546
+++ b/sysdeps/x86_64/cacheinfo.c (revision 12365)
1547
@@ -455,13 +455,21 @@
1550
/* Data cache size for use in memory and string routines, typically
1552
+ L1 size, rounded to multiple of 256 bytes. */
1553
long int __x86_64_data_cache_size_half attribute_hidden = 32 * 1024 / 2;
1554
long int __x86_64_data_cache_size attribute_hidden = 32 * 1024;
1555
+/* Similar to __x86_64_data_cache_size_half, but not rounded. */
1556
+long int __x86_64_raw_data_cache_size_half attribute_hidden = 32 * 1024 / 2;
1557
+/* Similar to __x86_64_data_cache_size, but not rounded. */
1558
+long int __x86_64_raw_data_cache_size attribute_hidden = 32 * 1024;
1559
/* Shared cache size for use in memory and string routines, typically
1561
+ L2 or L3 size, rounded to multiple of 256 bytes. */
1562
long int __x86_64_shared_cache_size_half attribute_hidden = 1024 * 1024 / 2;
1563
long int __x86_64_shared_cache_size attribute_hidden = 1024 * 1024;
1564
+/* Similar to __x86_64_shared_cache_size_half, but not rounded. */
1565
+long int __x86_64_raw_shared_cache_size_half attribute_hidden = 1024 * 1024 / 2;
1566
+/* Similar to __x86_64_shared_cache_size, but not rounded. */
1567
+long int __x86_64_raw_shared_cache_size attribute_hidden = 1024 * 1024;
1569
#ifndef DISABLE_PREFETCHW
1570
/* PREFETCHW support flag for use in memory and string routines. */
1571
@@ -661,12 +669,20 @@
1575
+ __x86_64_raw_data_cache_size_half = data / 2;
1576
+ __x86_64_raw_data_cache_size = data;
1577
+ /* Round data cache size to multiple of 256 bytes. */
1578
+ data = data & ~255L;
1579
__x86_64_data_cache_size_half = data / 2;
1580
__x86_64_data_cache_size = data;
1585
+ __x86_64_raw_shared_cache_size_half = shared / 2;
1586
+ __x86_64_raw_shared_cache_size = shared;
1587
+ /* Round shared cache size to multiple of 256 bytes. */
1588
+ shared = shared & ~255L;
1589
__x86_64_shared_cache_size_half = shared / 2;
1590
__x86_64_shared_cache_size = shared;
1592
--- a/sysdeps/x86_64/bits/byteswap.h (revision 11211)
1593
+++ b/sysdeps/x86_64/bits/byteswap.h (revision 12365)
1595
/* Macros to swap the order of bytes in integer values.
1596
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008
1597
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008, 2010
1598
Free Software Foundation, Inc.
1599
This file is part of the GNU C Library.
1603
/* Swap bytes in 16 bit value. */
1604
#define __bswap_constant_16(x) \
1605
- ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
1606
+ ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
1608
#if defined __GNUC__ && __GNUC__ >= 2
1609
# define __bswap_16(x) \
1611
- ({ register unsigned short int __v, __x = (x); \
1612
+ ({ register unsigned short int __v, __x = (unsigned short int) (x); \
1613
if (__builtin_constant_p (__x)) \
1614
__v = __bswap_constant_16 (__x); \
1617
/* This is better than nothing. */
1618
# define __bswap_16(x) \
1620
- ({ register unsigned short int __x = (x); __bswap_constant_16 (__x); }))
1621
+ ({ register unsigned short int __x = (unsigned short int) (x); \
1622
+ __bswap_constant_16 (__x); }))
1626
@@ -120,16 +121,16 @@
1627
# define __bswap_64(x) \
1629
({ union { __extension__ unsigned long long int __ll; \
1630
- unsigned int __l[2]; } __w, __r; \
1631
- if (__builtin_constant_p (x)) \
1632
- __r.__ll = __bswap_constant_64 (x); \
1636
- __r.__l[0] = __bswap_32 (__w.__l[1]); \
1637
- __r.__l[1] = __bswap_32 (__w.__l[0]); \
1640
+ unsigned int __l[2]; } __w, __r; \
1641
+ if (__builtin_constant_p (x)) \
1642
+ __r.__ll = __bswap_constant_64 (x); \
1646
+ __r.__l[0] = __bswap_32 (__w.__l[1]); \
1647
+ __r.__l[1] = __bswap_32 (__w.__l[0]); \
1653
--- a/sysdeps/x86_64/multiarch/strchr.S (revision 11211)
1654
+++ b/sysdeps/x86_64/multiarch/strchr.S (revision 12365)
1656
/* strchr with SSE4.2
1657
- Copyright (C) 2009 Free Software Foundation, Inc.
1658
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
1659
This file is part of the GNU C Library.
1661
The GNU C Library is free software; you can redistribute it and/or
1666
+ pshufb %xmm2, %xmm1
1671
/* Handle unaligned string. */
1673
- pshufb %xmm2, %xmm1
1675
pcmpeqb %xmm0, %xmm2
1676
pcmpeqb %xmm1, %xmm0
1677
--- a/sysdeps/s390/s390-32/__longjmp.c (revision 11211)
1678
+++ b/sysdeps/s390/s390-32/__longjmp.c (revision 12365)
1680
-/* Copyright (C) 2000, 2001, 2005, 2009 Free Software Foundation, Inc.
1681
+/* Copyright (C) 2000, 2001, 2005, 2009, 2010 Free Software Foundation, Inc.
1682
This file is part of the GNU C Library.
1683
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
1687
__longjmp (__jmp_buf env, int val)
1689
- register int r2 __asm ("%r2") = val == 0 ? 1 : val;
1691
- register uintptr_t r3 __asm ("%r3") = THREAD_GET_POINTER_GUARD ();
1692
- register void *r1 __asm ("%r1") = (void *) env;
1693
+ uintptr_t guard = THREAD_GET_POINTER_GUARD ();
1695
- CHECK_SP (env, r3);
1696
+ CHECK_SP (env, guard);
1698
#elif defined CHECK_SP
1701
+ register int r2 __asm ("%r2") = val == 0 ? 1 : val;
1702
+#ifdef PTR_DEMANGLE
1703
+ register uintptr_t r3 __asm ("%r3") = guard;
1704
+ register void *r1 __asm ("%r1") = (void *) env;
1706
/* Restore registers and jump back. */
1707
asm volatile ("ld %%f6,48(%1)\n\t"
1708
"ld %%f4,40(%1)\n\t"
1709
--- a/sysdeps/s390/s390-64/__longjmp.c (revision 11211)
1710
+++ b/sysdeps/s390/s390-64/__longjmp.c (revision 12365)
1712
-/* Copyright (C) 2001, 2005, 2009 Free Software Foundation, Inc.
1713
+/* Copyright (C) 2001, 2005, 2009, 2010 Free Software Foundation, Inc.
1714
This file is part of the GNU C Library.
1715
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
1719
__longjmp (__jmp_buf env, int val)
1721
- register long int r2 __asm ("%r2") = val == 0 ? 1 : val;
1723
- register uintptr_t r3 __asm ("%r3") = THREAD_GET_POINTER_GUARD ();
1724
- register void *r1 __asm ("%r1") = (void *) env;
1725
+ uintptr_t guard = THREAD_GET_POINTER_GUARD ();
1727
- CHECK_SP (env, r3);
1728
+ CHECK_SP (env, guard);
1730
#elif defined CHECK_SP
1733
+ register long int r2 __asm ("%r2") = val == 0 ? 1 : val;
1734
+#ifdef PTR_DEMANGLE
1735
+ register uintptr_t r3 __asm ("%r3") = guard;
1736
+ register void *r1 __asm ("%r1") = (void *) env;
1738
/* Restore registers and jump back. */
1739
asm volatile ("ld %%f7,104(%1)\n\t"
1740
"ld %%f5,96(%1)\n\t"
1741
--- a/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c (revision 11211)
1742
+++ b/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c (revision 12365)
1744
m = ((a.i[2] >> 20) & 0x7ff) - 54;
1749
a.i[2] = (a.i[2] & 0x800fffff) | (m << 20);
1750
- else if (m <= -54) {
1751
+ else if ((int) m <= -54) {
1752
a.i[2] &= 0x80000000;
1755
--- a/sysdeps/mach/hurd/linkat.c (revision 11211)
1756
+++ b/sysdeps/mach/hurd/linkat.c (revision 12365)
1758
/* Make a link between file names relative to open directories. Hurd version.
1759
- Copyright (C) 2006 Free Software Foundation, Inc.
1760
+ Copyright (C) 2006,2010 Free Software Foundation, Inc.
1761
This file is part of the GNU C Library.
1763
The GNU C Library is free software; you can redistribute it and/or
1765
file_t oldfile, linknode, todir;
1768
- oldfile = __file_name_lookup_at (fromfd, flags, from, 0, 0);
1769
+ /* POSIX says linkat doesn't follow symlinks by default, so pass
1770
+ O_NOLINK. That can be overridden by AT_SYMLINK_FOLLOW in FLAGS. */
1771
+ oldfile = __file_name_lookup_at (fromfd, flags, from, O_NOLINK, 0);
1772
if (oldfile == MACH_PORT_NULL)
1775
--- a/sysdeps/generic/ldsodefs.h (revision 11211)
1776
+++ b/sysdeps/generic/ldsodefs.h (revision 12365)
1777
@@ -832,11 +832,9 @@
1779
/* Open the shared object NAME and map in its segments.
1780
LOADER's DT_RPATH is used in searching for NAME.
1781
- If the object is already opened, returns its existing map.
1782
- For preloaded shared objects PRELOADED is set to a non-zero
1783
- value to allow additional security checks. */
1784
+ If the object is already opened, returns its existing map. */
1785
extern struct link_map *_dl_map_object (struct link_map *loader,
1786
- const char *name, int preloaded,
1788
int type, int trace_mode, int mode,
1790
internal_function attribute_hidden;
1791
@@ -901,8 +899,11 @@
1792
extern ElfW(Addr) _dl_symbol_value (struct link_map *map, const char *name)
1795
-/* Allocate a `struct link_map' for a new object being loaded,
1796
- and enter it into the _dl_main_map list. */
1797
+/* Add the new link_map NEW to the end of the namespace list. */
1798
+extern void _dl_add_to_namespace_list (struct link_map *new, Lmid_t nsid)
1799
+ internal_function attribute_hidden;
1801
+/* Allocate a `struct link_map' for a new object being loaded. */
1802
extern struct link_map *_dl_new_object (char *realname, const char *libname,
1803
int type, struct link_map *loader,
1804
int mode, Lmid_t nsid)
1805
--- a/sysdeps/generic/netinet/ip.h (revision 11211)
1806
+++ b/sysdeps/generic/netinet/ip.h (revision 12365)
1808
-/* Copyright (C) 1991,92,93,95,96,97,98,99,2000,2009 Free Software
1810
+/* Copyright (C) 1991-1993,1995-2000,2009,2010 Free Software Foundation, Inc.
1811
This file is part of the GNU C Library.
1813
The GNU C Library is free software; you can redistribute it and/or
1817
#define IPTOS_CLASS_MASK 0xe0
1818
-#define IPTOS_CLASS(class) ((tos) & IPTOS_CLASS_MASK)
1819
+#define IPTOS_CLASS(class) ((class) & IPTOS_CLASS_MASK)
1820
#define IPTOS_CLASS_CS0 0x00
1821
#define IPTOS_CLASS_CS1 0x20
1822
#define IPTOS_CLASS_CS2 0x40
1823
--- a/hurd/hurdselect.c (revision 11211)
1824
+++ b/hurd/hurdselect.c (revision 12365)
1826
int firstfd, lastfd;
1827
mach_msg_timeout_t to = (timeout != NULL ?
1828
(timeout->tv_sec * 1000 +
1829
- timeout->tv_nsec / 1000000) :
1830
+ (timeout->tv_nsec + 999999) / 1000000) :
1834
--- a/hurd/lookup-at.c (revision 11211)
1835
+++ b/hurd/lookup-at.c (revision 12365)
1840
+ if ((at_flags & AT_SYMLINK_FOLLOW) && (at_flags & AT_SYMLINK_NOFOLLOW))
1841
+ return (__hurd_fail (EINVAL), MACH_PORT_NULL);
1843
flags |= (at_flags & AT_SYMLINK_NOFOLLOW) ? O_NOLINK : 0;
1844
at_flags &= ~AT_SYMLINK_NOFOLLOW;
1845
+ if (at_flags & AT_SYMLINK_FOLLOW)
1846
+ flags &= ~O_NOLINK;
1847
+ at_flags &= ~AT_SYMLINK_FOLLOW;
1849
return (__hurd_fail (EINVAL), MACH_PORT_NULL);
1851
--- a/hurd/hurd/fd.h (revision 11211)
1852
+++ b/hurd/hurd/fd.h (revision 12365)
1854
const sigset_t *sigmask);
1856
/* Variant of file_name_lookup used in *at function implementations.
1857
- AT_FLAGS should contain only AT_SYMLINK_NOFOLLOW; other bits
1859
+ AT_FLAGS may only contain AT_SYMLINK_FOLLOW or AT_SYMLINK_NOFOLLOW,
1860
+ which will remove and add O_NOLINK from FLAGS respectively.
1861
+ Other bits cause EINVAL. */
1862
extern file_t __file_name_lookup_at (int fd, int at_flags,
1863
const char *file_name,
1864
int flags, mode_t mode);
1865
--- a/Makeconfig (revision 11211)
1866
+++ b/Makeconfig (revision 12365)
1868
-include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
1869
$(CPPFLAGS-$(suffix $@)) \
1870
$(foreach lib,$(libof-$(basename $(@F))) \
1871
- $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
1872
+ $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
1873
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
1874
override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
1875
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
1877
# emitted into sysd-rules. A sysdeps Makeconfig fragment can
1878
# add its own special object file prefix to this list with e.g. foo-%:%
1879
# to have foo-*.? compiled from *.? using $(foo-CPPFLAGS).
1880
-sysd-rules-patterns := %:% rtld-%:% m_%:s_%
1881
+sysd-rules-patterns := %:% rtld-%:rtld-% rtld-%:% m_%:s_%
1883
# Let sysdeps/ subdirs contain a Makeconfig fragment for us to include here.
1884
sysdep-makeconfigs := $(wildcard $(+sysdep_dirs:=/Makeconfig))
1885
@@ -1001,8 +1001,8 @@
1888
# Compute just the target patterns. Makeconfig has set sysd-rules-patterns.
1889
-sysd-rules-targets := $(foreach p,$(sysd-rules-patterns),\
1890
- $(firstword $(subst :, ,$p)))
1891
+sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns),\
1892
+ $(firstword $(subst :, ,$p))))
1894
endif # Makeconfig not yet included
1896
--- a/string/bits/string3.h (revision 11211)
1897
+++ b/string/bits/string3.h (revision 12365)
1899
-/* Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
1900
+/* Copyright (C) 2004, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
1901
This file is part of the GNU C Library.
1903
The GNU C Library is free software; you can redistribute it and/or
1907
__extern_always_inline void *
1908
-__NTH (memmove (void *__restrict __dest, __const void *__restrict __src,
1910
+__NTH (memmove (void *__dest, __const void *__src, size_t __len))
1912
return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
1917
__extern_always_inline void
1918
-__NTH (bcopy (__const void *__restrict __src, void *__restrict __dest,
1920
+__NTH (bcopy (__const void *__src, void *__dest, size_t __len))
1922
(void) __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
1924
--- a/string/stratcliff.c (revision 11211)
1925
+++ b/string/stratcliff.c (revision 12365)
1927
/* Test for string function add boundaries of usable memory.
1928
- Copyright (C) 1996,1997,1999-2003,2007, 2009 Free Software Foundation, Inc.
1929
+ Copyright (C) 1996,1997,1999-2003,2007,2009,2010
1930
+ Free Software Foundation, Inc.
1931
This file is part of the GNU C Library.
1932
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
1935
# define MEMCPY memcpy
1936
# define MEMPCPY mempcpy
1937
# define MEMCHR memchr
1938
+# define STRCMP strcmp
1939
+# define STRNCMP strncmp
1944
if (adr == MAP_FAILED || dest == MAP_FAILED)
1946
if (errno == ENOSYS)
1947
- puts ("No test, mmap not available.");
1948
+ puts ("No test, mmap not available.");
1951
- printf ("mmap failed: %m");
1955
+ printf ("mmap failed: %m");
1963
/* strlen/wcslen test */
1964
for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
1966
- for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
1968
+ for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
1970
adr[inner] = L('\0');
1972
@@ -107,12 +110,12 @@
1974
adr[inner] = L('T');
1979
/* strnlen/wcsnlen test */
1980
for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
1982
- for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
1984
+ for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
1986
adr[inner] = L('\0');
1990
adr[inner] = L('T');
1994
for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
1997
for (inner = MAX (outer, nchars - 64); inner <= nchars; ++inner)
1999
if (STRNLEN (&adr[outer], inner - outer)
2000
@@ -139,11 +142,11 @@
2007
/* strchr/wcschr test */
2008
for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
2011
for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
2013
for (inner = middle; inner < nchars; ++inner)
2015
adr[middle] = L('T');
2022
adr[nchars - 1] = L('\0');
2025
/* strrchr/wcsrchr test */
2026
for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
2029
for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
2031
for (inner = middle; inner < nchars; ++inner)
2032
@@ -204,11 +207,11 @@
2033
adr[middle] = L('T');
2040
for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
2043
for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
2045
adr[middle] = L('V');
2048
adr[middle] = L('T');
2052
for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
2055
CHAR *cp = MEMCHR (&adr[outer], L('V'), nchars - outer);
2058
@@ -235,13 +238,13 @@
2059
STRINGIFY (MEMCHR), outer);
2065
/* This function only exists for single-byte characters. */
2067
/* rawmemchr test */
2068
for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
2071
for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
2073
adr[middle] = L('V');
2074
@@ -257,13 +260,13 @@
2076
adr[middle] = L('T');
2082
/* strcpy/wcscpy test */
2083
for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
2085
- for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
2087
+ for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
2089
adr[inner] = L('\0');
2091
@@ -277,8 +280,75 @@
2093
adr[inner] = L('T');
2098
+ /* strcmp/wcscmp tests */
2099
+ for (outer = 1; outer < 32; ++outer)
2100
+ for (middle = 0; middle < 16; ++middle)
2102
+ MEMSET (adr + middle, L('T'), 256);
2103
+ adr[256] = L('\0');
2104
+ MEMSET (dest + nchars - outer, L('T'), outer - 1);
2105
+ dest[nchars - 1] = L('\0');
2107
+ if (STRCMP (adr + middle, dest + nchars - outer) <= 0)
2109
+ printf ("%s 1 flunked for outer = %d, middle = %d\n",
2110
+ STRINGIFY (STRCMP), outer, middle);
2114
+ if (STRCMP (dest + nchars - outer, adr + middle) >= 0)
2116
+ printf ("%s 2 flunked for outer = %d, middle = %d\n",
2117
+ STRINGIFY (STRCMP), outer, middle);
2122
+ /* strncmp/wcsncmp tests */
2123
+ for (outer = 1; outer < 32; ++outer)
2124
+ for (middle = 0; middle < 16; ++middle)
2126
+ MEMSET (adr + middle, L('T'), 256);
2127
+ adr[256] = L('\0');
2128
+ MEMSET (dest + nchars - outer, L('T'), outer - 1);
2129
+ dest[nchars - 1] = L('U');
2131
+ for (inner = 0; inner < outer; ++inner)
2133
+ if (STRNCMP (adr + middle, dest + nchars - outer, inner) != 0)
2135
+ printf ("%s 1 flunked for outer = %d, middle = %d, "
2137
+ STRINGIFY (STRNCMP), outer, middle, inner);
2141
+ if (STRNCMP (dest + nchars - outer, adr + middle, inner) != 0)
2143
+ printf ("%s 2 flunked for outer = %d, middle = %d, "
2145
+ STRINGIFY (STRNCMP), outer, middle, inner);
2150
+ if (STRNCMP (adr + middle, dest + nchars - outer, outer) >= 0)
2152
+ printf ("%s 1 flunked for outer = %d, middle = %d, full\n",
2153
+ STRINGIFY (STRNCMP), outer, middle);
2157
+ if (STRNCMP (dest + nchars - outer, adr + middle, outer) <= 0)
2159
+ printf ("%s 2 flunked for outer = %d, middle = %d, full\n",
2160
+ STRINGIFY (STRNCMP), outer, middle);
2165
/* strncpy/wcsncpy tests */
2166
adr[nchars - 1] = L('T');
2167
for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
2168
@@ -295,12 +365,12 @@
2174
adr[nchars - 1] = L('\0');
2176
for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
2178
- for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
2180
+ for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
2184
@@ -334,12 +404,12 @@
2186
adr[inner] = L('T');
2191
/* stpcpy/wcpcpy test */
2192
for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
2194
- for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
2196
+ for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
2198
adr[inner] = L('\0');
2202
adr[inner] = L('T');
2207
/* stpncpy/wcpncpy test */
2208
adr[nchars - 1] = L('T');
2210
adr[nchars - 1] = L('\0');
2212
for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
2214
- for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
2216
+ for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
2218
adr[middle] = L('\0');
2222
adr[middle] = L('T');
2227
/* memcpy/wmemcpy test */
2228
for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
2229
--- a/string/str-two-way.h (revision 11211)
2230
+++ b/string/str-two-way.h (revision 12365)
2232
a byte out of place, there can be no match until
2233
after the mismatch. */
2234
shift = needle_len - period;
2241
--- a/string/Makefile (revision 11211)
2242
+++ b/string/Makefile (revision 12365)
2244
bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \
2245
tst-strtok tst-strfry \
2246
bug-strtok1 $(addprefix test-,$(strop-tests)) \
2247
- tst-strxfrm2 tst-endian tst-svc2
2248
+ tst-strxfrm2 tst-endian tst-svc2 bug-strstr1 bug-strchr1
2249
tests-$(OPTION_EGLIBC_ENVZ) += bug-envz1
2250
tests-$(OPTION_EGLIBC_LOCALE_CODE) \
2251
+= tst-strxfrm bug-strcoll1
2253
CFLAGS-stratcliff.c = -fno-builtin
2254
CFLAGS-test-ffs.c = -fno-builtin
2255
CFLAGS-tst-inlcall.c = -fno-builtin
2256
+CFLAGS-bug-strstr1.c = -fno-builtin
2258
# eglibc: ifeq ($(cross-compiling),no)
2259
tests: $(objpfx)tst-svc.out
2260
--- a/string/bug-strchr1.c (revision 0)
2261
+++ b/string/bug-strchr1.c (revision 12365)
2264
+#include <string.h>
2269
+ char s[] __attribute__((aligned(16))) = "\xff";
2270
+ char *p = strchr (s, '\xfe');
2271
+ printf ("%p\n", p);
2275
+#define TEST_FUNCTION do_test ()
2276
+#include "../test-skeleton.c"
2277
--- a/string/bug-strstr1.c (revision 0)
2278
+++ b/string/bug-strstr1.c (revision 12365)
2281
+#include <string.h>
2283
+int main (int argc, char** argv)
2285
+ const char haystack[] =
2286
+ "F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD_C3_A7_20_EF_BF_BD";
2288
+ const char needle[] =
2289
+ "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
2291
+ const char* sub = strstr (haystack, needle);
2297
+ fprintf (stderr, "BUG: expected NULL, got:\n%s\n%s\n", sub, needle);
2298
+ for (j = 0; needle[j] != '\0'; ++j)
2299
+ putchar (needle[j] == sub[j] ? ' ' : '^');
2306
--- a/locale/xlocale.c (revision 11211)
2307
+++ b/locale/xlocale.c (revision 12365)
2310
#if defined (NL_CURRENT_INDIRECT)
2311
#define DEFINE_CATEGORY(category, category_name, items, a) \
2312
- __thread struct locale_data * const *_nl_current_##category \
2313
+ __thread struct __locale_data * const *_nl_current_##category \
2314
attribute_hidden = &_nl_C_locobj.__locales[category];
2315
#include "categories.def"
2316
#undef DEFINE_CATEGORY
2317
--- a/locale/programs/locale.c (revision 11211)
2318
+++ b/locale/programs/locale.c (revision 12365)
2319
@@ -765,6 +765,29 @@
2320
twalk (all_data, print_names);
2323
+/* Print a properly quoted assignment of NAME with VAL, using double
2324
+ quotes iff DQUOTE is true. */
2326
+print_assignment (const char *name, const char *val, bool dquote)
2328
+ printf ("%s=", name);
2331
+ while (*val != '\0')
2334
+ = strcspn (val, dquote ? "$`\"\\" : "~|&;<>()$`\\\"' \t\n");
2335
+ printf ("%.*s", (int) segment, val);
2347
/* We have to show the contents of the environments determining the
2350
show_locale_vars (void)
2353
- const char *lcall = getenv ("LC_ALL");
2354
+ const char *lcall = getenv ("LC_ALL") ? : "";
2355
const char *lang = getenv ("LANG") ? : "";
2357
auto void get_source (const char *name);
2358
@@ -781,15 +804,15 @@
2360
char *val = getenv (name);
2362
- if ((lcall ?: "")[0] != '\0' || val == NULL)
2363
- printf ("%s=\"%s\"\n", name,
2364
- (lcall ?: "")[0] ? lcall : (lang ?: "")[0] ? lang : "POSIX");
2365
+ if (lcall[0] != '\0' || val == NULL)
2366
+ print_assignment (name, lcall[0] ? lcall : lang[0] ? lang : "POSIX",
2369
- printf ("%s=%s\n", name, val);
2370
+ print_assignment (name, val, false);
2373
/* LANG has to be the first value. */
2374
- printf ("LANG=%s\n", lang);
2375
+ print_assignment ("LANG", lang, false);
2377
/* Now all categories in an unspecified order. */
2378
for (cat_no = 0; cat_no < NCATEGORIES; ++cat_no)
2380
get_source (category[cat_no].name);
2382
/* The last is the LC_ALL value. */
2383
- printf ("LC_ALL=%s\n", lcall ? : "");
2384
+ print_assignment ("LC_ALL", lcall, false);
2388
--- a/INSTALL (revision 11211)
2389
+++ b/INSTALL (revision 12365)
2390
@@ -329,11 +329,12 @@
2391
Check the FAQ for any special compiler issues on particular
2394
- * GNU `binutils' 2.15 or later
2397
You must use GNU `binutils' (as and ld) to build the GNU C library.
2398
No other assembler or linker has the necessary functionality at the
2400
+ moment. The configure scripts checks for the appropriate version
2401
+ for the platform. Too-old versions will prevent building glibc.
2403
* GNU `texinfo' 3.12f
2406
errors or omissions in this manual, please report them to the bug
2407
database. If you refer to specific sections of the manual, please
2408
include the section names for easier identification.
2410
--- a/malloc/malloc.c (revision 11211)
2411
+++ b/malloc/malloc.c (revision 12365)
2412
@@ -4850,7 +4850,7 @@
2415
if (__builtin_expect (perturb_byte, 0))
2416
- free_perturb (chunk2mem(p), size - SIZE_SZ);
2417
+ free_perturb (chunk2mem(p), size - 2 * SIZE_SZ);
2420
unsigned int idx = fastbin_index(size);
2421
@@ -4954,7 +4954,7 @@
2424
if (__builtin_expect (perturb_byte, 0))
2425
- free_perturb (chunk2mem(p), size - SIZE_SZ);
2426
+ free_perturb (chunk2mem(p), size - 2 * SIZE_SZ);
2428
/* consolidate backward */
2429
if (!prev_inuse(p)) {
2430
--- a/malloc/mcheck.c (revision 11211)
2431
+++ b/malloc/mcheck.c (revision 12365)
2433
/* Standard debugging hooks for `malloc'.
2434
- Copyright (C) 1990-1997,1999,2000-2002,2007 Free Software Foundation, Inc.
2435
+ Copyright (C) 1990-1997,1999,2000-2002,2007,2010
2436
+ Free Software Foundation, Inc.
2437
This file is part of the GNU C Library.
2438
Written May 1989 by Mike Haertel.
2441
# include <stdint.h>
2443
# include <libintl.h>
2444
+# include <errno.h>
2447
/* Old hook values. */
2448
@@ -209,6 +211,12 @@
2450
mcheck_check_all ();
2452
+ if (size > ~((size_t) 0) - (sizeof (struct hdr) + 1))
2454
+ __set_errno (ENOMEM);
2458
__malloc_hook = old_malloc_hook;
2459
if (old_malloc_hook != NULL)
2460
hdr = (struct hdr *) (*old_malloc_hook) (sizeof (struct hdr) + size + 1,
2461
@@ -241,6 +249,12 @@
2463
slop = (sizeof *hdr + alignment - 1) & -alignment;
2465
+ if (size > ~((size_t) 0) - (slop + 1))
2467
+ __set_errno (ENOMEM);
2471
__memalign_hook = old_memalign_hook;
2472
if (old_memalign_hook != NULL)
2473
block = (*old_memalign_hook) (alignment, slop + size + 1, caller);
2474
@@ -276,6 +290,12 @@
2476
mcheck_check_all ();
2478
+ if (size > ~((size_t) 0) - (sizeof (struct hdr) + 1))
2480
+ __set_errno (ENOMEM);
2486
hdr = ((struct hdr *) ptr) - 1;
2487
--- a/nptl/tst-abstime.c (revision 0)
2488
+++ b/nptl/tst-abstime.c (revision 12365)
2490
+/* Copyright (C) 2010 Free Software Foundation, Inc.
2491
+ This file is part of the GNU C Library.
2492
+ Contributed by Andreas Schwab <schwab@redhat.com>, 2010.
2494
+ The GNU C Library is free software; you can redistribute it and/or
2495
+ modify it under the terms of the GNU Lesser General Public
2496
+ License as published by the Free Software Foundation; either
2497
+ version 2.1 of the License, or (at your option) any later version.
2499
+ The GNU C Library is distributed in the hope that it will be useful,
2500
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2501
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2502
+ Lesser General Public License for more details.
2504
+ You should have received a copy of the GNU Lesser General Public
2505
+ License along with the GNU C Library; if not, write to the Free
2506
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2507
+ 02111-1307 USA. */
2510
+#include <pthread.h>
2511
+#include <semaphore.h>
2514
+static pthread_cond_t c = PTHREAD_COND_INITIALIZER;
2515
+static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER;
2516
+static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
2517
+static pthread_rwlock_t rw1 = PTHREAD_RWLOCK_INITIALIZER;
2518
+static pthread_rwlock_t rw2 = PTHREAD_RWLOCK_INITIALIZER;
2526
+ struct timespec t = { -2, 0 };
2528
+ r = pthread_mutex_timedlock (&m1, &t);
2529
+ if (r != ETIMEDOUT)
2531
+ puts ("pthread_mutex_timedlock did not return ETIMEDOUT");
2534
+ r = pthread_rwlock_timedrdlock (&rw1, &t);
2535
+ if (r != ETIMEDOUT)
2537
+ puts ("pthread_rwlock_timedrdlock did not return ETIMEDOUT");
2540
+ r = pthread_rwlock_timedwrlock (&rw2, &t);
2541
+ if (r != ETIMEDOUT)
2543
+ puts ("pthread_rwlock_timedwrlock did not return ETIMEDOUT");
2546
+ return (void *) res;
2554
+ struct timespec t = { -2, 0 };
2557
+ sem_init (&sem, 0, 0);
2558
+ r = sem_timedwait (&sem, &t);
2559
+ if (r != -1 || errno != ETIMEDOUT)
2561
+ puts ("sem_timedwait did not fail with ETIMEDOUT");
2565
+ pthread_mutex_lock (&m1);
2566
+ pthread_rwlock_wrlock (&rw1);
2567
+ pthread_rwlock_rdlock (&rw2);
2568
+ pthread_mutex_lock (&m2);
2569
+ if (pthread_create (&pth, 0, th, 0) != 0)
2571
+ puts ("cannot create thread");
2574
+ r = pthread_cond_timedwait (&c, &m2, &t);
2575
+ if (r != ETIMEDOUT)
2577
+ puts ("pthread_cond_timedwait did not return ETIMEDOUT");
2581
+ pthread_join (pth, &thres);
2582
+ return res | (thres != NULL);
2586
+#define TEST_FUNCTION do_test ()
2587
+#include "../test-skeleton.c"
2588
--- a/nptl/Makefile (revision 11211)
2589
+++ b/nptl/Makefile (revision 12365)
2595
tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \
2596
tst-getpid1 tst-getpid2 tst-getpid3 \
2597
tst-initializers1 $(patsubst %,tst-initializers1-%,c89 gnu89 c99 gnu99)
2599
$(objpfx)tst-_res1mod2.so: $(objpfx)tst-_res1mod1.so
2600
LDFLAGS-tst-_res1mod1.so = -Wl,-soname,tst-_res1mod1.so
2601
LDFLAGS-tst-_res1mod2.so = -Wl,-soname,tst-_res1mod2.so
2602
-$(objpfx)tst-_res1: $(objpfx)tst-_res1mod2.so $(shared-thread-library)
2603
+$(objpfx)tst-_res1: $(objpfx)tst-_res1mod1.so $(objpfx)tst-_res1mod2.so \
2604
+ $(shared-thread-library)
2606
$(objpfx)tst-cond11: $(common-objpfx)rt/librt.a
2607
$(objpfx)tst-cond19: $(common-objpfx)rt/librt.a
2608
--- a/nptl/ChangeLog (revision 11211)
2609
+++ b/nptl/ChangeLog (revision 12365)
2611
+2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
2612
+ Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2614
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
2615
+ FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
2617
+2010-07-03 Ulrich Drepper <drepper@redhat.com>
2619
+ * tst-abstime.c (do_test): Some more cleanups
2621
+2010-07-02 Ulrich Drepper <drepper@redhat.com>
2623
+ * tst-abstime.c: Correct testing and add test for sem_timedwait.
2625
+2010-07-01 Andreas Schwab <schwab@redhat.com>
2626
+ Ulrich Drepper <drepper@redhat.com>
2628
+ * Makefile (tests): Add tst-abstime.
2629
+ * tst-abstime.c: New file.
2630
+ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2631
+ (__lll_timedlock_wait): Check for timestamp before the Epoch.
2632
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2633
+ (__lll_timedlock_wait): Likewise.
2634
+ * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2635
+ (__lll_robust_timedlock_wait): Likewise.
2636
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2637
+ (__pthread_cond_timedwait): Likewise.
2638
+ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2639
+ (pthread_rwlock_timedrdlock): Likewise.
2640
+ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2641
+ (pthread_rwlock_timedwrlock): Likewise.
2642
+ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2645
+2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
2647
+ * nptl/sysdeps/unix/sysv/linux/i386/Makefile: New file.
2649
+2010-07-01 Ulrich Drepper <drepper@redhat.com>
2651
+ * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
2653
+2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
2656
+ * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
2657
+ * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
2658
+ of "struct pthread".
2660
2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
2662
* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
2663
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S (revision 11211)
2664
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S (revision 12365)
2666
-/* Copyright (C) 2002,2003,2004,2005,2007,2009 Free Software Foundation, Inc.
2667
+/* Copyright (C) 2002-2005,2007,2009,2010 Free Software Foundation, Inc.
2668
This file is part of the GNU C Library.
2669
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
2673
orl $FUTEX_WAKE, %ecx
2675
- xorl $(FUTEX_WAKE ^ FUTEX_WAKE_OP), %ecx
2676
movl $SYS_futex, %eax
2677
/* %edx should be 1 already from $FUTEX_WAKE_OP syscall.
2679
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S (revision 11211)
2680
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S (revision 12365)
2682
-/* Copyright (C) 2002-2004, 2006, 2007, 2009 Free Software Foundation, Inc.
2683
+/* Copyright (C) 2002-2004,2006,2007,2009,2010 Free Software Foundation, Inc.
2684
This file is part of the GNU C Library.
2685
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
2701
+8: movl $ETIMEDOUT, %eax
2704
# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
2706
/* Check for a valid timeout value. */
2707
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S (revision 11211)
2708
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S (revision 12365)
2710
-/* Copyright (C) 2002-2005, 2007, 2009 Free Software Foundation, Inc.
2711
+/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
2712
This file is part of the GNU C Library.
2713
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
2720
+ js 16f /* Time is already up. */
2722
movl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %esi
2723
xorl PSHARED(%r12), %esi
2725
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S (revision 11211)
2726
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S (revision 12365)
2728
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009
2729
- Free Software Foundation, Inc.
2730
+/* Copyright (C) 2002=2007, 2009, 2010 Free Software Foundation, Inc.
2731
This file is part of the GNU C Library.
2732
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
2742
cfi_adjust_cfa_offset(8)
2743
cfi_rel_offset(%r9, 0)
2744
@@ -180,7 +182,10 @@
2745
cfi_adjust_cfa_offset(-8)
2748
+7: movl $ETIMEDOUT, %eax
2752
# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
2754
/* Check for a valid timeout value. */
2755
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (revision 11211)
2756
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (revision 12365)
2758
-/* Copyright (C) 2002-2006, 2007, 2009 Free Software Foundation, Inc.
2759
+/* Copyright (C) 2002-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
2760
This file is part of the GNU C Library.
2761
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
2763
@@ -169,9 +169,13 @@
2771
cfi_adjust_cfa_offset(8)
2772
cfi_rel_offset(%r9, 0)
2775
movl $0xffffffff, %r9d
2776
LOAD_FUTEX_WAIT_ABS (%esi)
2781
+5: movl $ETIMEDOUT, %eax
2784
# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
2786
/* Check for a valid timeout value. */
2787
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (revision 11211)
2788
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (revision 12365)
2790
-/* Copyright (C) 2002, 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
2791
+/* Copyright (C) 2002,2003,2005,2007,2009,2010 Free Software Foundation, Inc.
2792
This file is part of the GNU C Library.
2793
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
2802
/* This push is only needed to store the sem_t pointer for the
2803
exception handler. */
2805
@@ -169,6 +172,19 @@
2811
+ movq errno@gottpoff(%rip), %rdx
2812
+ movl $ETIMEDOUT, %fs:(%rdx)
2814
+ callq __errno_location@plt
2815
+ movl $ETIMEDOUT, (%rax)
2822
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
2825
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S (revision 11211)
2826
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S (revision 12365)
2828
-/* Copyright (C) 2002-2005, 2007, 2009 Free Software Foundation, Inc.
2829
+/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
2830
This file is part of the GNU C Library.
2831
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
2833
@@ -144,6 +144,10 @@
2838
+ movq $-ETIMEDOUT, %r14
2841
38: movl cond_futex(%rdi), %r12d
2844
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S (revision 11211)
2845
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S (revision 12365)
2847
-/* Copyright (C) 2002, 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
2848
+/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
2849
This file is part of the GNU C Library.
2850
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
2857
+ js 16f /* Time is already up. */
2859
movl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %esi
2860
xorl PSHARED(%r12), %esi
2862
--- a/nptl/sysdeps/x86_64/tls.h (revision 11211)
2863
+++ b/nptl/sysdeps/x86_64/tls.h (revision 12365)
2864
@@ -117,12 +117,7 @@
2865
# define TLS_TCB_SIZE sizeof (struct pthread)
2867
/* Alignment requirements for the TCB. */
2868
-//# define TLS_TCB_ALIGN __alignof__ (struct pthread)
2869
-// Normally the above would be correct But we have to store post-AVX
2870
-// vector registers in the TCB and we want the storage to be aligned.
2871
-// unfortunately there isn't yet a type for these values and hence no
2872
-// 32-byte alignment requirement. Make this explicit, for now.
2873
-# define TLS_TCB_ALIGN 32
2874
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
2876
/* The TCB can have any size and the memory following the address the
2877
thread pointer points to is unspecified. Allocate the TCB there. */
2878
--- a/nptl/sysdeps/x86_64/pthreaddef.h (revision 11211)
2879
+++ b/nptl/sysdeps/x86_64/pthreaddef.h (revision 12365)
2881
/* Minimal stack size after allocating thread descriptor and guard size. */
2882
#define MINIMAL_REST_STACK 2048
2884
-/* Alignment requirement for TCB. */
2885
-#define TCB_ALIGNMENT 16
2886
+/* Alignment requirement for TCB. Need to store post-AVX vector registers
2887
+ in the TCB and we want the storage to be aligned at 32-byte. */
2888
+#define TCB_ALIGNMENT 32
2891
/* Location of current stack frame. The frame pointer is not usable. */
2892
--- a/NEWS (revision 11211)
2893
+++ b/NEWS (revision 12365)
2895
-GNU C Library NEWS -- history of user-visible changes. 2010-5-4
2896
+GNU C Library NEWS -- history of user-visible changes. 2010-12-13
2897
Copyright (C) 1992-2009, 2010 Free Software Foundation, Inc.
2898
See the end for copying conditions.
2900
Please send GNU C library bug reports via <http://sources.redhat.com/bugzilla/>
2901
using `glibc' in the "product" field.
2905
+* The following bugs are resolved with this release:
2907
+ 12077, 12092, 12113, 12159, 12167, 12191, 11840, 11856, 10851, 7066,
2908
+ 11968, 12005, 12093, 12078, 12140, 11904, 12194, 11883, 11611,
2909
+ 10085, 11149, 11903, 11655
2913
+* The following bugs are resolved with this release:
2919
* The following bugs are resolved with this release:
2920
--- a/posix/regcomp.c (revision 11211)
2921
+++ b/posix/regcomp.c (revision 12365)
2922
@@ -2170,16 +2170,21 @@
2923
exp = parse_expression (regexp, preg, token, syntax, nest, err);
2924
if (BE (*err != REG_NOERROR && exp == NULL, 0))
2927
+ postorder (tree, free_tree, NULL);
2930
if (tree != NULL && exp != NULL)
2932
- tree = create_tree (dfa, tree, exp, CONCAT);
2934
+ bin_tree_t *newtree = create_tree (dfa, tree, exp, CONCAT);
2935
+ if (newtree == NULL)
2937
+ postorder (exp, free_tree, NULL);
2938
+ postorder (tree, free_tree, NULL);
2944
else if (tree == NULL)
2946
@@ -2428,7 +2433,11 @@
2948
tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
2949
if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
2950
- *err = REG_EPAREN;
2953
+ postorder (tree, free_tree, NULL);
2954
+ *err = REG_EPAREN;
2956
if (BE (*err != REG_NOERROR, 0))
2959
@@ -3055,6 +3064,10 @@
2960
if (BE (sbcset == NULL, 0))
2961
#endif /* RE_ENABLE_I18N */
2964
+#ifdef RE_ENABLE_I18N
2970
--- a/posix/tst-fnmatch.c (revision 11211)
2971
+++ b/posix/tst-fnmatch.c (revision 12365)
2973
/* Tests for fnmatch function.
2974
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
2975
+ Copyright (C) 2000, 2001, 2010 Free Software Foundation, Inc.
2976
This file is part of the GNU C Library.
2978
The GNU C Library is free software; you can redistribute it and/or
2982
#include <sys/types.h>
2983
+#include <mcheck.h>
2986
static char *next_input (char **line, int first, int last);
2988
size_t escpatternlen = 0;
2993
/* Read lines from stdin with the following format:
2995
locale input-string match-string flags result
2996
--- a/posix/fnmatch_loop.c (revision 11211)
2997
+++ b/posix/fnmatch_loop.c (revision 12365)
2999
-/* Copyright (C) 1991-1993,1996-2001,2003-2005,2007
3000
+/* Copyright (C) 1991-1993,1996-2001,2003-2005,2007,2010
3001
Free Software Foundation, Inc.
3002
This file is part of the GNU C Library.
3005
it matches, nonzero if not. */
3006
static int FCT (const CHAR *pattern, const CHAR *string,
3007
const CHAR *string_end, int no_leading_period, int flags,
3008
- struct STRUCT *ends)
3009
+ struct STRUCT *ends, size_t alloca_used)
3011
static int EXT (INT opt, const CHAR *pattern, const CHAR *string,
3012
- const CHAR *string_end, int no_leading_period, int flags)
3013
+ const CHAR *string_end, int no_leading_period, int flags,
3014
+ size_t alloca_used)
3016
static const CHAR *END (const CHAR *patternp) internal_function;
3020
-FCT (pattern, string, string_end, no_leading_period, flags, ends)
3021
+FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
3022
const CHAR *pattern;
3024
const CHAR *string_end;
3025
int no_leading_period;
3027
struct STRUCT *ends;
3028
+ size_t alloca_used;
3030
register const CHAR *p = pattern, *n = string;
3034
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
3038
- res = EXT (c, p, n, string_end, no_leading_period,
3040
+ int res = EXT (c, p, n, string_end, no_leading_period,
3041
+ flags, alloca_used);
3045
@@ -106,10 +106,8 @@
3047
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
3051
- res = EXT (c, p, n, string_end, no_leading_period,
3053
+ int res = EXT (c, p, n, string_end, no_leading_period,
3054
+ flags, alloca_used);
3060
for (--p; n < endp; ++n, no_leading_period = 0)
3061
if (FCT (p, n, string_end, no_leading_period, flags2,
3063
+ &end, alloca_used) == 0)
3066
else if (c == L('/') && (flags & FNM_FILE_NAME))
3069
if (n < string_end && *n == L('/')
3070
&& (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags,
3072
+ NULL, alloca_used) == 0))
3077
for (--p; n < endp; ++n, no_leading_period = 0)
3078
if (FOLD ((UCHAR) *n) == c
3079
&& (FCT (p, n, string_end, no_leading_period, flags2,
3081
+ &end, alloca_used) == 0))
3084
if (end.pattern == NULL)
3086
_NL_COLLATE_SYMB_EXTRAMB);
3088
/* Locate the character in the hashing
3091
hash = elem_hash (str, c1);
3096
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
3100
- res = EXT (c, p, n, string_end, no_leading_period, flags);
3101
+ int res = EXT (c, p, n, string_end, no_leading_period, flags,
3106
@@ -1061,26 +1058,32 @@
3109
EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
3110
- int no_leading_period, int flags)
3111
+ int no_leading_period, int flags, size_t alloca_used)
3117
struct patternlist *next;
3121
struct patternlist **lastp = &list;
3122
size_t pattern_len = STRLEN (pattern);
3123
+ int any_malloced = 0;
3128
/* Parse the pattern. Store the individual parts in the list. */
3130
for (startp = p = pattern + 1; level >= 0; ++p)
3132
- /* This is an invalid pattern. */
3135
+ /* This is an invalid pattern. */
3139
else if (*p == L('['))
3141
/* Handle brackets special. */
3142
@@ -1097,8 +1100,11 @@
3143
/* Skip over all characters of the list. */
3144
while (*p != L(']'))
3145
if (*p++ == L('\0'))
3146
- /* This is no valid pattern. */
3149
+ /* This is no valid pattern. */
3154
else if ((*p == L('?') || *p == L('*') || *p == L('+') || *p == L('@')
3155
|| *p == L('!')) && p[1] == L('('))
3156
@@ -1111,15 +1117,25 @@
3157
/* This means we found the end of the pattern. */
3158
#define NEW_PATTERN \
3159
struct patternlist *newp; \
3161
- if (opt == L('?') || opt == L('@')) \
3162
- newp = alloca (sizeof (struct patternlist) \
3163
- + (pattern_len * sizeof (CHAR))); \
3164
+ size_t slen = (opt == L('?') || opt == L('@') \
3165
+ ? pattern_len : (p - startp + 1)); \
3166
+ slen = sizeof (struct patternlist) + (slen * sizeof (CHAR)); \
3167
+ int malloced = ! __libc_use_alloca (alloca_used + slen); \
3168
+ if (__builtin_expect (malloced, 0)) \
3170
+ newp = malloc (slen); \
3171
+ if (newp == NULL) \
3176
+ any_malloced = 1; \
3179
- newp = alloca (sizeof (struct patternlist) \
3180
- + ((p - startp + 1) * sizeof (CHAR))); \
3181
+ newp = alloca_account (slen, alloca_used); \
3182
+ newp->next = NULL; \
3183
+ newp->malloced = malloced; \
3184
*((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L('\0'); \
3185
- newp->next = NULL; \
3189
@@ -1140,8 +1156,9 @@
3193
- if (FCT (p, string, string_end, no_leading_period, flags, NULL) == 0)
3195
+ if (FCT (p, string, string_end, no_leading_period, flags, NULL,
3196
+ alloca_used) == 0)
3201
@@ -1152,7 +1169,7 @@
3203
if (FCT (list->str, string, rs, no_leading_period,
3204
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
3206
+ NULL, alloca_used) == 0
3207
/* This was successful. Now match the rest with the rest
3209
&& (FCT (p, rs, string_end,
3210
@@ -1160,7 +1177,7 @@
3212
: rs[-1] == '/' && NO_LEADING_PERIOD (flags) ? 1 : 0,
3213
flags & FNM_FILE_NAME
3214
- ? flags : flags & ~FNM_PERIOD, NULL) == 0
3215
+ ? flags : flags & ~FNM_PERIOD, NULL, alloca_used) == 0
3216
/* This didn't work. Try the whole pattern. */
3218
&& FCT (pattern - 1, rs, string_end,
3219
@@ -1169,18 +1186,21 @@
3220
: (rs[-1] == '/' && NO_LEADING_PERIOD (flags)
3222
flags & FNM_FILE_NAME
3223
- ? flags : flags & ~FNM_PERIOD, NULL) == 0)))
3224
+ ? flags : flags & ~FNM_PERIOD, NULL,
3225
+ alloca_used) == 0)))
3226
/* It worked. Signal success. */
3230
while ((list = list->next) != NULL);
3232
/* None of the patterns lead to a match. */
3233
- return FNM_NOMATCH;
3234
+ retval = FNM_NOMATCH;
3238
- if (FCT (p, string, string_end, no_leading_period, flags, NULL) == 0)
3240
+ if (FCT (p, string, string_end, no_leading_period, flags, NULL,
3241
+ alloca_used) == 0)
3246
@@ -1192,13 +1212,14 @@
3247
if (FCT (STRCAT (list->str, p), string, string_end,
3249
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
3251
+ NULL, alloca_used) == 0)
3252
/* It worked. Signal success. */
3255
while ((list = list->next) != NULL);
3257
/* None of the patterns lead to a match. */
3258
- return FNM_NOMATCH;
3259
+ retval = FNM_NOMATCH;
3263
for (rs = string; rs <= string_end; ++rs)
3264
@@ -1208,7 +1229,7 @@
3265
for (runp = list; runp != NULL; runp = runp->next)
3266
if (FCT (runp->str, string, rs, no_leading_period,
3267
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
3269
+ NULL, alloca_used) == 0)
3272
/* If none of the patterns matched see whether the rest does. */
3273
@@ -1218,21 +1239,34 @@
3275
: rs[-1] == '/' && NO_LEADING_PERIOD (flags) ? 1 : 0,
3276
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
3278
+ NULL, alloca_used) == 0))
3279
/* This is successful. */
3284
/* None of the patterns together with the rest of the pattern
3286
- return FNM_NOMATCH;
3287
+ retval = FNM_NOMATCH;
3291
assert (! "Invalid extended matching operator");
3300
+ while (list != NULL)
3302
+ struct patternlist *old = list;
3303
+ list = list->next;
3304
+ if (old->malloced)
3312
--- a/posix/bug-regex31.c (revision 0)
3313
+++ b/posix/bug-regex31.c (revision 12365)
3315
+#include <mcheck.h>
3318
+#include <sys/types.h>
3328
+ while (! feof (stdin))
3330
+ ssize_t n = getline (&buf, &len, stdin);
3333
+ if (buf[n - 1] == '\n')
3334
+ buf[n - 1] = '\0';
3337
+ int rc = regcomp (®ex, buf, REG_EXTENDED);
3339
+ printf ("%s: Error %d (expected)\n", buf, rc);
3342
+ printf ("%s: succeeded !\n", buf);
3351
--- a/posix/Makefile (revision 11211)
3352
+++ b/posix/Makefile (revision 12365)
3354
bug-regex14 bug-regex15 \
3355
bug-regex21 bug-regex24 \
3356
bug-regex27 bug-regex28 bug-regex29 bug-regex30 \
3358
tst-nice tst-nanosleep \
3360
tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
3361
@@ -136,10 +137,12 @@
3362
annexc annexc.out wordexp-tst.out bug-regex2-mem \
3363
bug-regex2.mtrace bug-regex14-mem bug-regex14.mtrace \
3364
bug-regex21-mem bug-regex21.mtrace \
3365
+ bug-regex31-mem bug-regex31.mtrace \
3366
tst-rxspencer-mem tst-rxspencer.mtrace tst-getconf.out \
3367
tst-pcre-mem tst-pcre.mtrace tst-boost-mem tst-boost.mtrace \
3368
bug-ga2.mtrace bug-ga2-mem bug-glob2.mtrace bug-glob2-mem \
3369
- tst-vfork3-mem tst-vfork3.mtrace getconf.speclist
3370
+ tst-vfork3-mem tst-vfork3.mtrace getconf.speclist \
3371
+ tst-fnmatch-mem tst-fnmatch.mtrace
3376
# eglibc: ifeq (no,$(cross-compiling))
3377
tests: $(objpfx)bug-regex2-mem \
3378
$(objpfx)bug-regex21-mem \
3379
+ $(objpfx)bug-regex31-mem \
3380
$(objpfx)tst-getconf.out \
3381
- $(objpfx)bug-glob2-mem $(objpfx)tst-vfork3-mem
3382
+ $(objpfx)bug-glob2-mem $(objpfx)tst-vfork3-mem $(objpfx)tst-fnmatch-mem
3383
ifeq (y,($OPTION_POSIX_REGEXP_GLIBC))
3384
tests: $(objpfx)bug-regex14-mem $(objpfx)tst-rxspencer-mem \
3385
$(objpfx)tst-pcre-mem $(objpfx)tst-boost-mem
3386
@@ -276,6 +280,11 @@
3387
$(objpfx)annexc: annexc.c
3390
+tst-fnmatch-ENV += MALLOC_TRACE=$(objpfx)tst-fnmatch.mtrace
3392
+$(objpfx)tst-fnmatch-mem: $(objpfx)tst-fnmatch.out
3393
+ $(common-objpfx)malloc/mtrace $(objpfx)tst-fnmatch.mtrace > $@
3395
bug-regex2-ENV = MALLOC_TRACE=$(objpfx)bug-regex2.mtrace
3397
$(objpfx)bug-regex2-mem: $(objpfx)bug-regex2.out
3398
@@ -291,6 +300,11 @@
3399
$(objpfx)bug-regex21-mem: $(objpfx)bug-regex21.out
3400
$(common-objpfx)malloc/mtrace $(objpfx)bug-regex21.mtrace > $@
3402
+bug-regex31-ENV = MALLOC_TRACE=$(objpfx)bug-regex31.mtrace
3404
+$(objpfx)bug-regex31-mem: $(objpfx)bug-regex31.out
3405
+ $(common-objpfx)malloc/mtrace $(objpfx)bug-regex31.mtrace > $@
3407
tst-vfork3-ENV = MALLOC_TRACE=$(objpfx)tst-vfork3.mtrace
3409
$(objpfx)tst-vfork3-mem: $(objpfx)tst-vfork3.out
3410
--- a/posix/bug-regex31.input (revision 0)
3411
+++ b/posix/bug-regex31.input (revision 12365)
3417
--- a/posix/fnmatch.c (revision 11211)
3418
+++ b/posix/fnmatch.c (revision 12365)
3420
-/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2007
3421
+/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2007,2010
3422
Free Software Foundation, Inc.
3423
This file is part of the GNU C Library.
3426
# include <stdlib.h>
3430
+# include <alloca.h>
3432
+# define alloca_account(size., var) alloca (size)
3435
/* For platform which support the ISO C amendement 1 functionality we
3436
support user defined character classes. */
3437
#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
3438
@@ -334,8 +340,11 @@
3442
+ wchar_t *wpattern_malloc = NULL;
3444
+ wchar_t *wstring_malloc = NULL;
3446
+ size_t alloca_used = 0;
3448
/* Convert the strings into wide characters. */
3449
memset (&ps, '\0', sizeof (ps));
3452
if (__builtin_expect (n < 1024, 1))
3454
- wpattern = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
3455
+ wpattern = (wchar_t *) alloca_account ((n + 1) * sizeof (wchar_t),
3457
n = mbsrtowcs (wpattern, &p, n + 1, &ps);
3458
if (__builtin_expect (n == (size_t) -1, 0))
3460
@@ -369,8 +379,11 @@
3461
XXX Do we have to set `errno' to something which mbsrtows hasn't
3464
- wpattern = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
3465
+ wpattern_malloc = wpattern
3466
+ = (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));
3467
assert (mbsinit (&ps));
3468
+ if (wpattern == NULL)
3470
(void) mbsrtowcs (wpattern, &pattern, n + 1, &ps);
3473
@@ -383,13 +396,18 @@
3475
if (__builtin_expect (n < 1024, 1))
3477
- wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
3478
+ wstring = (wchar_t *) alloca_account ((n + 1) * sizeof (wchar_t),
3480
n = mbsrtowcs (wstring, &p, n + 1, &ps);
3481
if (__builtin_expect (n == (size_t) -1, 0))
3482
- /* Something wrong.
3483
- XXX Do we have to set `errno' to something which mbsrtows hasn't
3487
+ /* Something wrong.
3488
+ XXX Do we have to set `errno' to something which
3489
+ mbsrtows hasn't already done? */
3491
+ free (wpattern_malloc);
3496
memset (&ps, '\0', sizeof (ps));
3497
@@ -404,19 +422,32 @@
3499
XXX Do we have to set `errno' to something which mbsrtows hasn't
3502
- wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
3505
+ wstring_malloc = wstring
3506
+ = (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));
3507
+ if (wstring == NULL)
3509
+ free (wpattern_malloc);
3512
assert (mbsinit (&ps));
3513
(void) mbsrtowcs (wstring, &string, n + 1, &ps);
3516
- return internal_fnwmatch (wpattern, wstring, wstring + n,
3517
- flags & FNM_PERIOD, flags, NULL);
3518
+ int res = internal_fnwmatch (wpattern, wstring, wstring + n,
3519
+ flags & FNM_PERIOD, flags, NULL,
3522
+ free (wstring_malloc);
3523
+ free (wpattern_malloc);
3527
# endif /* mbstate_t and mbsrtowcs or _LIBC. */
3529
return internal_fnmatch (pattern, string, string + strlen (string),
3530
- flags & FNM_PERIOD, flags, NULL);
3531
+ flags & FNM_PERIOD, flags, NULL, 0);
3535
--- a/resolv/res_init.c (revision 11211)
3536
+++ b/resolv/res_init.c (revision 12365)
3537
@@ -176,13 +176,6 @@
3538
statp->id = res_randomid();
3542
- statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
3544
- statp->nsaddr.sin_addr.s_addr = INADDR_ANY;
3546
- statp->nsaddr.sin_family = AF_INET;
3547
- statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
3551
@@ -321,24 +314,24 @@
3556
- struct in6_addr a6;
3559
+ struct in6_addr a6;
3562
- if ((el = strchr(cp, '\n')) != NULL)
3564
+ if ((el = strchr(cp, '\n')) != NULL)
3566
if ((el = strchr(cp, SCOPE_DELIMITER)) != NULL)
3568
- if ((*cp != '\0') &&
3569
- (inet_pton(AF_INET6, cp, &a6) > 0)) {
3570
- struct sockaddr_in6 *sa6;
3571
+ if ((*cp != '\0') &&
3572
+ (inet_pton(AF_INET6, cp, &a6) > 0)) {
3573
+ struct sockaddr_in6 *sa6;
3575
- sa6 = malloc(sizeof(*sa6));
3576
- if (sa6 != NULL) {
3577
- sa6->sin6_family = AF_INET6;
3578
- sa6->sin6_port = htons(NAMESERVER_PORT);
3579
+ sa6 = malloc(sizeof(*sa6));
3580
+ if (sa6 != NULL) {
3581
+ sa6->sin6_family = AF_INET6;
3582
+ sa6->sin6_port = htons(NAMESERVER_PORT);
3583
sa6->sin6_flowinfo = 0;
3584
- sa6->sin6_addr = a6;
3585
+ sa6->sin6_addr = a6;
3587
if (__builtin_expect (el == NULL, 1))
3588
sa6->sin6_scope_id = 0;
3590
statp->_u._ext.nsaddrs[nservall] = sa6;
3591
statp->_u._ext.nssocks[nservall] = -1;
3592
statp->_u._ext.nsmap[nservall] = MAXNS + 1;
3602
@@ -433,6 +426,12 @@
3606
+ if (__builtin_expect(statp->nscount == 0, 0)) {
3607
+ statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
3608
+ statp->nsaddr.sin_family = AF_INET;
3609
+ statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
3610
+ statp->nscount = 1;
3612
if (statp->defdname[0] == 0 &&
3613
__gethostname(buf, sizeof(statp->defdname) - 1) == 0 &&
3614
(cp = strchr(buf, '.')) != NULL)
3615
@@ -538,12 +537,12 @@
3616
} else if (!strncmp(cp, "no-check-names",
3617
sizeof("no-check-names") - 1)) {
3618
statp->options |= RES_NOCHECKNAME;
3619
- } else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) {
3620
+ } else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) {
3621
statp->options |= RES_USE_EDNS0;
3622
- } else if (!strncmp(cp, "single-request-reopen",
3623
+ } else if (!strncmp(cp, "single-request-reopen",
3624
sizeof("single-request-reopen") - 1)) {
3625
statp->options |= RES_SNGLKUPREOP;
3626
- } else if (!strncmp(cp, "single-request",
3627
+ } else if (!strncmp(cp, "single-request",
3628
sizeof("single-request") - 1)) {
3629
statp->options |= RES_SNGLKUP;
3631
--- a/resolv/nss_dns/dns-host.c (revision 11211)
3632
+++ b/resolv/nss_dns/dns-host.c (revision 12365)
3634
int (*name_ok) (const char *);
3635
u_char packtmp[NS_MAXCDNAME];
3636
int have_to_map = 0;
3638
uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
3640
if (__builtin_expect (buflen < sizeof (struct host_data) + pad, 0))
3642
cp += INT16SZ; /* type */
3643
class = __ns_get16 (cp);
3644
cp += INT16SZ; /* class */
3645
- ttl = __ns_get32 (cp);
3646
+ int32_t ttl = __ns_get32 (cp);
3647
cp += INT32SZ; /* TTL */
3648
n = __ns_get16 (cp);
3649
cp += INT16SZ; /* len */
3654
- if (ttlp != NULL && ttl != 0)
3659
@@ -1163,7 +1162,7 @@
3663
- if (ttl != 0 && ttlp != NULL)
3667
(*pat)->name = canon ?: h_name;
3668
--- a/version.h (revision 11211)
3669
+++ b/version.h (revision 12365)
3671
/* This file just defines the current version number of libc. */
3673
#define RELEASE "stable"
3674
-#define VERSION "2.12.1"
3675
+#define VERSION "2.12.2"
3676
--- a/manual/arith.texi (revision 11211)
3677
+++ b/manual/arith.texi (revision 12365)
3678
@@ -1407,7 +1407,8 @@
3680
@deftypefunx {long double} roundl (long double @var{x})
3681
These functions are similar to @code{rint}, but they round halfway
3682
-cases away from zero instead of to the nearest even integer.
3683
+cases away from zero instead of to the nearest integer (or other
3684
+current rounding mode).
3688
--- a/manual/Makefile (revision 11211)
3689
+++ b/manual/Makefile (revision 12365)
3690
@@ -243,9 +243,12 @@
3692
stubs: $(objpfx)stubs
3694
-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
3695
+$(objpfx)stubs ../po/manual.pot:
3696
$(make-target-directory)
3699
+ $(make-target-directory)
3702
# Make the target directory if it doesn't exist, using the `mkinstalldirs'
3703
# script that does `mkdir -p' even if `mkdir' doesn't support that flag.
3704
--- a/manual/memory.texi (revision 11211)
3705
+++ b/manual/memory.texi (revision 12365)
3706
@@ -702,6 +702,11 @@
3708
The maximum number of chunks to allocate with @code{mmap}. Setting this
3709
to zero disables all use of @code{mmap}.
3711
+If non-zero, memory blocks are filled with values depending on some
3712
+low order bits of this parameter when they are allocated (except when
3713
+allocated by @code{calloc}) and freed. This can be used to debug the
3714
+use of uninitialized or freed heap memory.
3718
--- a/manual/locale.texi (revision 11211)
3719
+++ b/manual/locale.texi (revision 12365)
3720
@@ -1210,7 +1210,7 @@
3721
/* @r{Prepare the @code{getline} call.} */
3724
- while (getline (&line, &len, stdout) >= 0)
3725
+ while (getline (&line, &len, stdin) >= 0)
3727
/* @r{Check the response.} */
3728
int res = rpmatch (line);
3729
--- a/configure (revision 11211)
3730
+++ b/configure (revision 12365)
3734
libc_cv_have_initfini
3735
-libc_cv_gnu89_inline
3740
@@ -3873,9 +3873,6 @@
3744
-if test x"$multi_arch" != xno; then
3745
- multi_arch_d=/multiarch
3748
# Check whether --enable-experimental-malloc was given.
3749
if test "${enable_experimental_malloc+set}" = set; then
3750
@@ -4309,6 +4306,140 @@
3754
+# For the multi-arch option we need support in the assembler.
3755
+{ $as_echo "$as_me:$LINENO: checking for assembler gnu_indirect_function symbol type support" >&5
3756
+$as_echo_n "checking for assembler gnu_indirect_function symbol type support... " >&6; }
3757
+if test "${libc_cv_asm_gnu_indirect_function+set}" = set; then
3758
+ $as_echo_n "(cached) " >&6
3760
+ cat > conftest.s <<EOF
3761
+.type foo,%gnu_indirect_function
3763
+if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5;
3765
+ libc_cv_asm_gnu_indirect_function=yes
3767
+ libc_cv_asm_gnu_indirect_function=no
3771
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_gnu_indirect_function" >&5
3772
+$as_echo "$libc_cv_asm_gnu_indirect_function" >&6; }
3774
+{ $as_echo "$as_me:$LINENO: checking whether .text pseudo-op must be used" >&5
3775
+$as_echo_n "checking whether .text pseudo-op must be used... " >&6; }
3776
+if test "${libc_cv_dot_text+set}" = set; then
3777
+ $as_echo_n "(cached) " >&6
3779
+ cat > conftest.s <<EOF
3783
+if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
3784
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3785
+ (eval $ac_try) 2>&5
3787
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3788
+ (exit $ac_status); }; }; then
3789
+ libc_cv_dot_text=.text
3794
+if test -z "$libc_cv_dot_text"; then
3795
+ { $as_echo "$as_me:$LINENO: result: no" >&5
3796
+$as_echo "no" >&6; }
3798
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
3799
+$as_echo "yes" >&6; }
3802
+{ $as_echo "$as_me:$LINENO: checking for assembler global-symbol directive" >&5
3803
+$as_echo_n "checking for assembler global-symbol directive... " >&6; }
3804
+if test "${libc_cv_asm_global_directive+set}" = set; then
3805
+ $as_echo_n "(cached) " >&6
3807
+ libc_cv_asm_global_directive=UNKNOWN
3808
+for ac_globl in .globl .global .EXPORT; do
3809
+ cat > conftest.s <<EOF
3810
+ ${libc_cv_dot_text}
3814
+ if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
3815
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3816
+ (eval $ac_try) 2>&5
3818
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3819
+ (exit $ac_status); }; }; then
3820
+ libc_cv_asm_global_directive=${ac_globl}
3823
+ test $libc_cv_asm_global_directive != UNKNOWN && break
3826
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_global_directive" >&5
3827
+$as_echo "$libc_cv_asm_global_directive" >&6; }
3828
+if test $libc_cv_asm_global_directive = UNKNOWN; then
3829
+ { { $as_echo "$as_me:$LINENO: error: cannot determine asm global directive" >&5
3830
+$as_echo "$as_me: error: cannot determine asm global directive" >&2;}
3831
+ { (exit 1); exit 1; }; }
3833
+ cat >>confdefs.h <<_ACEOF
3834
+#define ASM_GLOBAL_DIRECTIVE ${libc_cv_asm_global_directive}
3839
+{ $as_echo "$as_me:$LINENO: checking for assembler .type directive prefix" >&5
3840
+$as_echo_n "checking for assembler .type directive prefix... " >&6; }
3841
+if test "${libc_cv_asm_type_prefix+set}" = set; then
3842
+ $as_echo_n "(cached) " >&6
3844
+ libc_cv_asm_type_prefix=no
3845
+for ac_try_prefix in '@' '%' '#'; do
3846
+ cat > conftest.s <<EOF
3847
+ ${libc_cv_dot_text}
3848
+ ${libc_cv_asm_global_directive} foo
3849
+ .type foo, ${ac_try_prefix}object
3854
+ if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
3855
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3856
+ (eval $ac_try) 2>&5
3858
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3859
+ (exit $ac_status); }; }; then
3860
+ libc_cv_asm_type_prefix=${ac_try_prefix}
3863
+ test "x$libc_cv_asm_type_prefix" != xno && break
3866
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_type_prefix" >&5
3867
+$as_echo "$libc_cv_asm_type_prefix" >&6; }
3868
+if test "x$libc_cv_asm_type_prefix" != xno; then
3869
+ cat >>confdefs.h <<_ACEOF
3870
+#define ASM_TYPE_DIRECTIVE_PREFIX ${libc_cv_asm_type_prefix}
3875
+if test x"$libc_cv_asm_gnu_indirect_function" != xyes -a x"$libc_cv_asm_type_prefix" = xno; then
3876
+ if test x"$multi_arch" = xyes; then
3877
+ { { $as_echo "$as_me:$LINENO: error: --enable-multi-arch support requires assembler and linker support" >&5
3878
+$as_echo "$as_me: error: --enable-multi-arch support requires assembler and linker support" >&2;}
3879
+ { (exit 1); exit 1; }; }
3884
+if test x"$multi_arch" != xno; then
3885
+ multi_arch_d=/multiarch
3888
# Compute the list of sysdep directories for this configuration.
3889
# This can take a while to compute.
3890
sysdep_dir=$srcdir/sysdeps
3891
@@ -4425,35 +4556,14 @@
3893
# If the assembler supports gnu_indirect_function symbol type and the
3894
# architecture supports multi-arch, we enable multi-arch by default.
3895
-if test "$multi_arch" = default; then
3896
-{ $as_echo "$as_me:$LINENO: checking for assembler gnu_indirect_function symbol type support" >&5
3897
-$as_echo_n "checking for assembler gnu_indirect_function symbol type support... " >&6; }
3898
-if test "${libc_cv_asm_gnu_indirect_function+set}" = set; then
3899
- $as_echo_n "(cached) " >&6
3901
- cat > conftest.s <<EOF
3902
-.type foo,%gnu_indirect_function
3904
-if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5;
3906
- libc_cv_asm_gnu_indirect_function=yes
3908
- libc_cv_asm_gnu_indirect_function=no
3912
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_gnu_indirect_function" >&5
3913
-$as_echo "$libc_cv_asm_gnu_indirect_function" >&6; }
3914
+case $sysnames_add_ons$sysnames in
3919
- if test "$libc_cv_asm_gnu_indirect_function" = yes; then
3920
- case $sysnames_add_ons$sysnames in
3921
- *"$multi_arch_d"*)
3927
-if test x"$multi_arch" = xyes; then
3930
+if test x"$multi_arch" != xno; then
3931
cat >>confdefs.h <<\_ACEOF
3932
#define USE_MULTIARCH 1
3934
@@ -6020,71 +6130,6 @@
3935
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
3938
-{ $as_echo "$as_me:$LINENO: checking whether .text pseudo-op must be used" >&5
3939
-$as_echo_n "checking whether .text pseudo-op must be used... " >&6; }
3940
-if test "${libc_cv_dot_text+set}" = set; then
3941
- $as_echo_n "(cached) " >&6
3943
- cat > conftest.s <<EOF
3947
-if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
3948
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3949
- (eval $ac_try) 2>&5
3951
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3952
- (exit $ac_status); }; }; then
3953
- libc_cv_dot_text=.text
3958
-if test -z "$libc_cv_dot_text"; then
3959
- { $as_echo "$as_me:$LINENO: result: no" >&5
3960
-$as_echo "no" >&6; }
3962
- { $as_echo "$as_me:$LINENO: result: yes" >&5
3963
-$as_echo "yes" >&6; }
3966
-{ $as_echo "$as_me:$LINENO: checking for assembler global-symbol directive" >&5
3967
-$as_echo_n "checking for assembler global-symbol directive... " >&6; }
3968
-if test "${libc_cv_asm_global_directive+set}" = set; then
3969
- $as_echo_n "(cached) " >&6
3971
- libc_cv_asm_global_directive=UNKNOWN
3972
-for ac_globl in .globl .global .EXPORT; do
3973
- cat > conftest.s <<EOF
3974
- ${libc_cv_dot_text}
3978
- if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
3979
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3980
- (eval $ac_try) 2>&5
3982
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3983
- (exit $ac_status); }; }; then
3984
- libc_cv_asm_global_directive=${ac_globl}
3987
- test $libc_cv_asm_global_directive != UNKNOWN && break
3990
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_global_directive" >&5
3991
-$as_echo "$libc_cv_asm_global_directive" >&6; }
3992
-if test $libc_cv_asm_global_directive = UNKNOWN; then
3993
- { { $as_echo "$as_me:$LINENO: error: cannot determine asm global directive" >&5
3994
-$as_echo "$as_me: error: cannot determine asm global directive" >&2;}
3995
- { (exit 1); exit 1; }; }
3997
- cat >>confdefs.h <<_ACEOF
3998
-#define ASM_GLOBAL_DIRECTIVE ${libc_cv_asm_global_directive}
4003
{ $as_echo "$as_me:$LINENO: checking for .set assembler directive" >&5
4004
$as_echo_n "checking for .set assembler directive... " >&6; }
4005
if test "${libc_cv_asm_set_directive+set}" = set; then
4006
@@ -6120,42 +6165,6 @@
4010
-{ $as_echo "$as_me:$LINENO: checking for assembler .type directive prefix" >&5
4011
-$as_echo_n "checking for assembler .type directive prefix... " >&6; }
4012
-if test "${libc_cv_asm_type_prefix+set}" = set; then
4013
- $as_echo_n "(cached) " >&6
4015
- libc_cv_asm_type_prefix=no
4016
-for ac_try_prefix in '@' '%' '#'; do
4017
- cat > conftest.s <<EOF
4018
- ${libc_cv_dot_text}
4019
- ${libc_cv_asm_global_directive} foo
4020
- .type foo, ${ac_try_prefix}object
4025
- if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
4026
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4027
- (eval $ac_try) 2>&5
4029
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4030
- (exit $ac_status); }; }; then
4031
- libc_cv_asm_type_prefix=${ac_try_prefix}
4034
- test "x$libc_cv_asm_type_prefix" != xno && break
4037
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_type_prefix" >&5
4038
-$as_echo "$libc_cv_asm_type_prefix" >&6; }
4039
-if test "x$libc_cv_asm_type_prefix" != xno; then
4040
- cat >>confdefs.h <<_ACEOF
4041
-#define ASM_TYPE_DIRECTIVE_PREFIX ${libc_cv_asm_type_prefix}
4046
{ $as_echo "$as_me:$LINENO: checking for assembler gnu_unique_object symbol type" >&5
4047
$as_echo_n "checking for assembler gnu_unique_object symbol type... " >&6; }
4048
if test "${libc_cv_asm_unique_object+set}" = set; then
4049
@@ -6182,37 +6191,6 @@
4053
-# For the multi-arch option we need support in the assembler.
4054
-if test "$multi_arch" = yes; then
4055
- if test "x$libc_cv_asm_type_prefix" != xno; then
4056
-{ $as_echo "$as_me:$LINENO: checking for assembler gnu_indirect_function symbol type support" >&5
4057
-$as_echo_n "checking for assembler gnu_indirect_function symbol type support... " >&6; }
4058
-if test "${libc_cv_asm_gnu_indirect_function+set}" = set; then
4059
- $as_echo_n "(cached) " >&6
4061
- cat > conftest.s <<EOF
4062
-.type foo,%gnu_indirect_function
4064
-if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5;
4066
- libc_cv_asm_gnu_indirect_function=yes
4068
- libc_cv_asm_gnu_indirect_function=no
4072
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_gnu_indirect_function" >&5
4073
-$as_echo "$libc_cv_asm_gnu_indirect_function" >&6; }
4075
- libc_cv_asm_gnu_indirect_function=no
4077
- if test x"$libc_cv_asm_gnu_indirect_function" != xyes; then
4078
- { { $as_echo "$as_me:$LINENO: error: --enable-multi-arch support requires assembler and linker support" >&5
4079
-$as_echo "$as_me: error: --enable-multi-arch support requires assembler and linker support" >&2;}
4080
- { (exit 1); exit 1; }; }
4084
{ $as_echo "$as_me:$LINENO: checking for .symver assembler directive" >&5
4085
$as_echo_n "checking for .symver assembler directive... " >&6; }
4086
if test "${libc_cv_asm_symver_directive+set}" = set; then
4087
@@ -6998,9 +6976,9 @@
4088
{ $as_echo "$as_me:$LINENO: result: $libc_cv_gnu89_inline" >&5
4089
$as_echo "$libc_cv_gnu89_inline" >&6; }
4090
if test $libc_cv_gnu89_inline = yes; then
4091
- libc_cv_gnu89_inline=-fgnu89-inline
4092
+ gnu89_inline=-fgnu89-inline
4094
- libc_cv_gnu89_inline=
4099
--- a/ChangeLog.eglibc (revision 11211)
4100
+++ b/ChangeLog.eglibc (revision 12365)
4102
+2010-12-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4104
+ Backport from trunk:
4105
+ 2010-12-19 Gordon Schumacher <whiplash@pobox.com>
4106
+ * locale/xlocale.x (DEFINE_CATEGORY): Fix merge issue.
4107
+ * wcsmbs/wcsmbsload.c (wcsmbs_load_conv): Same.
4109
2010-03-31 Joseph Myers <joseph@codesourcery.com>
4111
* manual/Makefile (stamp-pkgvers): Substitute @@ for @ in
4112
--- a/nis/nss_compat/compat-initgroups.c (revision 11211)
4113
+++ b/nis/nss_compat/compat-initgroups.c (revision 12365)
4114
@@ -474,18 +474,21 @@
4115
/* If the selected module does not support getgrent_r or
4116
initgroups_dyn, abort. We cannot find the needed group
4118
- if (nss_getgrent_r == NULL && nss_initgroups_dyn == NULL)
4119
+ if (nss_initgroups_dyn == NULL || nss_getgrgid_r == NULL)
4121
+ if (nss_setgrent != NULL)
4124
+ ent->need_endgrent = true;
4126
+ ent->skip_initgroups_dyn = true;
4129
+ if (ent->skip_initgroups_dyn && nss_getgrent_r == NULL)
4130
return NSS_STATUS_UNAVAIL;
4134
- if (nss_initgroups_dyn == NULL && nss_setgrent != NULL)
4137
- ent->need_endgrent = true;
4139
- ent->skip_initgroups_dyn = true;
4141
return getgrent_next_nss (ent, buffer, buflen, user, group,
4142
start, size, groupsp, limit, errnop);
4144
--- a/elf/dl-open.c (revision 11211)
4145
+++ b/elf/dl-open.c (revision 12365)
4146
@@ -221,38 +221,9 @@
4148
assert (_dl_debug_initialize (0, args->nsid)->r_state == RT_CONSISTENT);
4150
- /* Maybe we have to expand a DST. */
4151
- if (__builtin_expect (dst != NULL, 0))
4153
- size_t len = strlen (file);
4155
- /* Determine how much space we need. We have to allocate the
4156
- memory locally. */
4157
- size_t required = DL_DST_REQUIRED (call_map, file, len,
4158
- _dl_dst_count (dst, 0));
4160
- /* Get space for the new file name. */
4161
- char *new_file = (char *) alloca (required + 1);
4163
- /* Generate the new file name. */
4164
- _dl_dst_substitute (call_map, file, new_file, 0);
4166
- /* If the substitution failed don't try to load. */
4167
- if (*new_file == '\0')
4168
- _dl_signal_error (0, "dlopen", NULL,
4169
- N_("empty dynamic string token substitution"));
4171
- /* Now we have a new file name. */
4174
- /* It does not matter whether call_map is set even if we
4175
- computed it only because of the DST. Since the path contains
4176
- a slash the value is not used. See dl-load.c. */
4179
/* Load the named object. */
4180
struct link_map *new;
4181
- args->map = new = _dl_map_object (call_map, file, 0, lt_loaded, 0,
4182
+ args->map = new = _dl_map_object (call_map, file, lt_loaded, 0,
4183
mode | __RTLD_CALLMAP, args->nsid);
4185
/* If the pointer returned is NULL this means the RTLD_NOLOAD flag is
4186
--- a/elf/rtld-Rules (revision 11211)
4187
+++ b/elf/rtld-Rules (revision 12365)
4189
# Subroutine makefile for compiling libc modules linked into dynamic linker.
4191
-# Copyright (C) 2002, 2003, 2005, 2006, 2008 Free Software Foundation, Inc.
4192
+# Copyright (C) 2002,2003,2005,2006,2008,2010 Free Software Foundation, Inc.
4193
# This file is part of the GNU C Library.
4195
# The GNU C Library is free software; you can redistribute it and/or
4197
# Use the verbose option of ar and tar when not running silently.
4198
ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
4206
# These are the basic compilation rules corresponding to the Makerules ones.
4207
# The sysd-rules generated makefile already defines pattern rules for rtld-%
4208
# targets built from sysdeps source files.
4209
+$(objpfx)rtld-%.os: rtld-%.S $(before-compile)
4210
+ $(compile-command.S) $(rtld-CPPFLAGS)
4211
+$(objpfx)rtld-%.os: rtld-%.s $(before-compile)
4212
+ $(compile-command.s) $(rtld-CPPFLAGS)
4213
+$(objpfx)rtld-%.os: rtld-%.c $(before-compile)
4214
+ $(compile-command.c) $(rtld-CPPFLAGS)
4215
$(objpfx)rtld-%.os: %.S $(before-compile)
4216
$(compile-command.S) $(rtld-CPPFLAGS)
4217
$(objpfx)rtld-%.os: %.s $(before-compile)
4219
$(compile-command.c) $(rtld-CPPFLAGS)
4221
# The rules for generated source files.
4222
+$(objpfx)rtld-%.os: $(objpfx)rtld-%.S $(before-compile); $(compile-command.S)
4223
+$(objpfx)rtld-%.os: $(objpfx)rtld-%.s $(before-compile); $(compile-command.s)
4224
+$(objpfx)rtld-%.os: $(objpfx)rtld-%.c $(before-compile); $(compile-command.c)
4225
$(objpfx)rtld-%.os: $(objpfx)%.S $(before-compile); $(compile-command.S)
4226
$(objpfx)rtld-%.os: $(objpfx)%.s $(before-compile); $(compile-command.s)
4227
$(objpfx)rtld-%.os: $(objpfx)%.c $(before-compile); $(compile-command.c)
4228
--- a/elf/dl-sysdep.c (revision 11211)
4229
+++ b/elf/dl-sysdep.c (revision 12365)
4230
@@ -425,6 +425,11 @@
4232
const ElfW(Word) mask = ((const ElfW(Word) *) dsocaps)[-1];
4233
GLRO(dl_hwcap) |= (uint64_t) mask << _DL_FIRST_EXTRA;
4234
+ /* Note that we add the dsocaps to the set already chosen by the
4235
+ LD_HWCAP_MASK environment variable (or default HWCAP_IMPORTANT).
4236
+ So there is no way to request ignoring an OS-supplied dsocap
4237
+ string and bit like you can ignore an OS-supplied HWCAP bit. */
4238
+ GLRO(dl_hwcap_mask) |= (uint64_t) mask << _DL_FIRST_EXTRA;
4240
for (const char *p = dsocaps; p < dsocaps + dsocapslen; p += len + 1)
4242
--- a/elf/Makefile (revision 11211)
4243
+++ b/elf/Makefile (revision 12365)
4244
@@ -766,11 +766,11 @@
4245
$(objpfx)tst-tls9: $(libdl)
4246
$(objpfx)tst-tls9.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
4248
-$(objpfx)tst-tls10: $(objpfx)tst-tlsmod8.so
4249
+$(objpfx)tst-tls10: $(objpfx)tst-tlsmod8.so $(objpfx)tst-tlsmod7.so
4251
-$(objpfx)tst-tls11: $(objpfx)tst-tlsmod10.so
4252
+$(objpfx)tst-tls11: $(objpfx)tst-tlsmod10.so $(objpfx)tst-tlsmod9.so
4254
-$(objpfx)tst-tls12: $(objpfx)tst-tlsmod12.so
4255
+$(objpfx)tst-tls12: $(objpfx)tst-tlsmod12.so $(objpfx)tst-tlsmod11.so
4257
$(objpfx)tst-tls13: $(libdl)
4258
$(objpfx)tst-tls13.out: $(objpfx)tst-tlsmod13a.so
4259
--- a/elf/dl-object.c (revision 11211)
4260
+++ b/elf/dl-object.c (revision 12365)
4262
/* Storage management for the chain of loaded shared objects.
4263
- Copyright (C) 1995-2002,2004,2006-2008,2009 Free Software Foundation, Inc.
4264
+ Copyright (C) 1995-2002,2004,2006-2009,2010 Free Software Foundation, Inc.
4265
This file is part of the GNU C Library.
4267
The GNU C Library is free software; you can redistribute it and/or
4272
+/* Add the new link_map NEW to the end of the namespace list. */
4275
+_dl_add_to_namespace_list (struct link_map *new, Lmid_t nsid)
4277
+ /* We modify the list of loaded objects. */
4278
+ __rtld_lock_lock_recursive (GL(dl_load_write_lock));
4280
+ if (GL(dl_ns)[nsid]._ns_loaded != NULL)
4282
+ struct link_map *l = GL(dl_ns)[nsid]._ns_loaded;
4283
+ while (l->l_next != NULL)
4286
+ /* new->l_next = NULL; Would be necessary but we use calloc. */
4290
+ GL(dl_ns)[nsid]._ns_loaded = new;
4291
+ ++GL(dl_ns)[nsid]._ns_nloaded;
4292
+ new->l_serial = GL(dl_load_adds);
4293
+ ++GL(dl_load_adds);
4295
+ __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
4299
/* Allocate a `struct link_map' for a new object being loaded,
4300
and enter it into the _dl_loaded list. */
4304
_dl_new_object (char *realname, const char *libname, int type,
4305
struct link_map *loader, int mode, Lmid_t nsid)
4309
size_t libname_len = strlen (libname) + 1;
4310
struct link_map *new;
4311
struct libname_list *newname;
4312
@@ -93,32 +118,13 @@
4313
new->l_scope = new->l_scope_mem;
4314
new->l_scope_max = sizeof (new->l_scope_mem) / sizeof (new->l_scope_mem[0]);
4316
- /* We modify the list of loaded objects. */
4317
- __rtld_lock_lock_recursive (GL(dl_load_write_lock));
4319
/* Counter for the scopes we have to handle. */
4323
if (GL(dl_ns)[nsid]._ns_loaded != NULL)
4325
- l = GL(dl_ns)[nsid]._ns_loaded;
4326
- while (l->l_next != NULL)
4329
- /* new->l_next = NULL; Would be necessary but we use calloc. */
4331
+ /* Add the global scope. */
4332
+ new->l_scope[idx++] = &GL(dl_ns)[nsid]._ns_loaded->l_searchlist;
4334
- /* Add the global scope. */
4335
- new->l_scope[idx++] = &GL(dl_ns)[nsid]._ns_loaded->l_searchlist;
4338
- GL(dl_ns)[nsid]._ns_loaded = new;
4339
- ++GL(dl_ns)[nsid]._ns_nloaded;
4340
- new->l_serial = GL(dl_load_adds);
4341
- ++GL(dl_load_adds);
4343
- __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
4345
/* If we have no loader the new object acts as it. */
4348
--- a/elf/rtld.c (revision 11211)
4349
+++ b/elf/rtld.c (revision 12365)
4351
/* Argument to map_doit. */
4353
struct link_map *loader;
4356
/* Return value of map_doit. */
4357
struct link_map *map;
4358
@@ -627,16 +626,17 @@
4361
struct map_args *args = (struct map_args *) a;
4362
- args->map = _dl_map_object (args->loader, args->str,
4363
- args->is_preloaded, lt_library, 0, args->mode,
4365
+ args->map = _dl_map_object (args->loader, args->str, lt_library, 0,
4366
+ args->mode, LM_ID_BASE);
4370
dlmopen_doit (void *a)
4372
struct dlmopen_args *args = (struct dlmopen_args *) a;
4373
- args->map = _dl_open (args->fname, RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT,
4374
+ args->map = _dl_open (args->fname,
4375
+ (RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT
4377
dl_main, LM_ID_NEWLM, _dl_argc, INTUSE(_dl_argv),
4383
args.loader = main_map;
4384
- args.is_preloaded = 1;
4386
+ args.mode = __RTLD_SECURE;
4388
unsigned int old_nloaded = GL(dl_ns)[LM_ID_BASE]._ns_nloaded;
4390
@@ -1054,7 +1053,6 @@
4392
args.str = rtld_progname;
4394
- args.is_preloaded = 0;
4395
args.mode = __RTLD_OPENEXEC;
4396
(void) _dl_catch_error (&objname, &err_str, &malloced, map_doit,
4398
@@ -1066,7 +1064,7 @@
4401
HP_TIMING_NOW (start);
4402
- _dl_map_object (NULL, rtld_progname, 0, lt_library, 0,
4403
+ _dl_map_object (NULL, rtld_progname, lt_library, 0,
4404
__RTLD_OPENEXEC, LM_ID_BASE);
4405
HP_TIMING_NOW (stop);
4407
@@ -1110,11 +1108,15 @@
4408
main_map = _dl_new_object ((char *) "", "", lt_executable, NULL,
4409
__RTLD_OPENEXEC, LM_ID_BASE);
4410
assert (main_map != NULL);
4411
- assert (main_map == GL(dl_ns)[LM_ID_BASE]._ns_loaded);
4412
main_map->l_phdr = phdr;
4413
main_map->l_phnum = phnum;
4414
main_map->l_entry = *user_entry;
4416
+ /* Even though the link map is not yet fully initialized we can add
4417
+ it to the map list since there are no possible users running yet. */
4418
+ _dl_add_to_namespace_list (main_map, LM_ID_BASE);
4419
+ assert (main_map == GL(dl_ns)[LM_ID_BASE]._ns_loaded);
4421
/* At this point we are in a bit of trouble. We would have to
4422
fill in the values for l_dev and l_ino. But in general we
4423
do not know where the file is. We also do not handle AT_EXECFD
4424
@@ -1257,7 +1259,7 @@
4425
/* We were invoked directly, so the program might not have a
4427
_dl_rtld_libname.name = GL(dl_rtld_map).l_name;
4428
- /* _dl_rtld_libname.next = NULL; Already zero. */
4429
+ /* _dl_rtld_libname.next = NULL; Already zero. */
4430
GL(dl_rtld_map).l_libname = &_dl_rtld_libname;
4433
@@ -1382,6 +1384,9 @@
4434
l->l_libname->name = memcpy (copy, dsoname, len);
4437
+ /* Add the vDSO to the object list. */
4438
+ _dl_add_to_namespace_list (l, LM_ID_BASE);
4440
/* Rearrange the list so this DSO appears after rtld_map. */
4441
assert (l->l_next == NULL);
4442
assert (l->l_prev == main_map);
4443
--- a/elf/dl-deps.c (revision 11211)
4444
+++ b/elf/dl-deps.c (revision 12365)
4447
struct openaux_args *args = (struct openaux_args *) a;
4449
- args->aux = _dl_map_object (args->map, args->name, 0,
4450
+ args->aux = _dl_map_object (args->map, args->name,
4451
(args->map->l_type == lt_executable
4452
? lt_library : args->map->l_type),
4453
args->trace_mode, args->open_mode,
4454
--- a/elf/dl-load.c (revision 11211)
4455
+++ b/elf/dl-load.c (revision 12365)
4456
@@ -801,22 +801,7 @@
4457
/* The file might already be closed. */
4459
(void) __close (fd);
4462
- /* We modify the list of loaded objects. */
4463
- __rtld_lock_lock_recursive (GL(dl_load_write_lock));
4464
- /* Remove the stillborn object from the list and free it. */
4465
- assert (l->l_next == NULL);
4466
- if (l->l_prev == NULL)
4467
- /* No other module loaded. This happens only in the static library,
4468
- or in rtld under --verify. */
4469
- GL(dl_ns)[l->l_ns]._ns_loaded = NULL;
4471
- l->l_prev->l_next = NULL;
4472
- --GL(dl_ns)[l->l_ns]._ns_nloaded;
4474
- __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
4481
never be unloaded. */
4484
+ /* Add the map for the mirrored object to the object list. */
4485
+ _dl_add_to_namespace_list (l, nsid);
4490
@@ -1495,6 +1483,9 @@
4491
add_name_to_object (l, ((const char *) D_PTR (l, l_info[DT_STRTAB])
4492
+ l->l_info[DT_SONAME]->d_un.d_val));
4494
+ /* Now that the object is fully initialized add it to the object list. */
4495
+ _dl_add_to_namespace_list (l, nsid);
4498
/* Auditing checkpoint: we have a new object. */
4499
if (__builtin_expect (GLRO(dl_naudit) > 0, 0)
4500
@@ -1815,7 +1806,7 @@
4501
if MAY_FREE_DIRS is true. */
4504
-open_path (const char *name, size_t namelen, int preloaded,
4505
+open_path (const char *name, size_t namelen, int secure,
4506
struct r_search_path_struct *sps, char **realname,
4507
struct filebuf *fbp, struct link_map *loader, int whatcode,
4508
bool *found_other_class)
4509
@@ -1897,7 +1888,7 @@
4510
/* Remember whether we found any existing directory. */
4511
here_any |= this_dir->status[cnt] != nonexisting;
4513
- if (fd != -1 && __builtin_expect (preloaded, 0)
4514
+ if (fd != -1 && __builtin_expect (secure, 0)
4515
&& INTUSE(__libc_enable_secure))
4517
/* This is an extra security effort to make sure nobody can
4518
@@ -1966,7 +1957,7 @@
4522
-_dl_map_object (struct link_map *loader, const char *name, int preloaded,
4523
+_dl_map_object (struct link_map *loader, const char *name,
4524
int type, int trace_mode, int mode, Lmid_t nsid)
4527
@@ -2070,7 +2061,8 @@
4528
for (l = loader; l; l = l->l_loader)
4529
if (cache_rpath (l, &l->l_rpath_dirs, DT_RPATH, "RPATH"))
4531
- fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs,
4532
+ fd = open_path (name, namelen, mode & __RTLD_SECURE,
4534
&realname, &fb, loader, LA_SER_RUNPATH,
4535
&found_other_class);
4537
@@ -2085,14 +2077,15 @@
4538
&& main_map != NULL && main_map->l_type != lt_loaded
4539
&& cache_rpath (main_map, &main_map->l_rpath_dirs, DT_RPATH,
4541
- fd = open_path (name, namelen, preloaded, &main_map->l_rpath_dirs,
4542
+ fd = open_path (name, namelen, mode & __RTLD_SECURE,
4543
+ &main_map->l_rpath_dirs,
4544
&realname, &fb, loader ?: main_map, LA_SER_RUNPATH,
4545
&found_other_class);
4548
/* Try the LD_LIBRARY_PATH environment variable. */
4549
if (fd == -1 && env_path_list.dirs != (void *) -1)
4550
- fd = open_path (name, namelen, preloaded, &env_path_list,
4551
+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &env_path_list,
4553
loader ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded,
4554
LA_SER_LIBPATH, &found_other_class);
4555
@@ -2101,12 +2094,12 @@
4556
if (fd == -1 && loader != NULL
4557
&& cache_rpath (loader, &loader->l_runpath_dirs,
4558
DT_RUNPATH, "RUNPATH"))
4559
- fd = open_path (name, namelen, preloaded,
4560
+ fd = open_path (name, namelen, mode & __RTLD_SECURE,
4561
&loader->l_runpath_dirs, &realname, &fb, loader,
4562
LA_SER_RUNPATH, &found_other_class);
4565
- && (__builtin_expect (! preloaded, 1)
4566
+ && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
4567
|| ! INTUSE(__libc_enable_secure)))
4569
/* Check the list of libraries in the file /etc/ld.so.cache,
4570
@@ -2172,7 +2165,7 @@
4571
&& ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
4572
|| __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
4573
&& rtld_search_dirs.dirs != (void *) -1)
4574
- fd = open_path (name, namelen, preloaded, &rtld_search_dirs,
4575
+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
4576
&realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
4578
/* Add another newline when we are tracing the library loading. */
4579
@@ -2217,7 +2210,7 @@
4581
static const Elf_Symndx dummy_bucket = STN_UNDEF;
4583
- /* Enter the new object in the list of loaded objects. */
4584
+ /* Allocate a new object map. */
4585
if ((name_copy = local_strdup (name)) == NULL
4586
|| (l = _dl_new_object (name_copy, name, type, loader,
4587
mode, nsid)) == NULL)
4588
@@ -2235,6 +2228,9 @@
4592
+ /* Enter the object in the object list. */
4593
+ _dl_add_to_namespace_list (l, nsid);
4597
else if (found_other_class)
4598
--- a/elf/ldconfig.c (revision 11211)
4599
+++ b/elf/ldconfig.c (revision 12365)
4600
@@ -1362,14 +1362,9 @@
4602
const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
4605
- aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
4606
- if (aux_cache_file == NULL)
4607
- error (EXIT_FAILURE, errno, _("Can't open cache file %s\n"),
4608
- _PATH_LDCONFIG_AUX_CACHE);
4610
+ aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
4612
- if (! opt_ignore_aux_cache)
4613
+ if (! opt_ignore_aux_cache && aux_cache_file)
4614
load_aux_cache (aux_cache_file);
4617
@@ -1379,7 +1374,8 @@
4618
if (opt_build_cache)
4620
save_cache (cache_file);
4621
- save_aux_cache (aux_cache_file);
4622
+ if (aux_cache_file)
4623
+ save_aux_cache (aux_cache_file);
4627
--- a/ports/sysdeps/unix/sysv/linux/m68k/sysdep.h (revision 11211)
4628
+++ b/ports/sysdeps/unix/sysv/linux/m68k/sysdep.h (revision 12365)
4630
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4633
-#ifndef _LINUX_M68K_SYSDEP_H
4634
-#define _LINUX_M68K_SYSDEP_H 1
4636
-#include <sysdeps/unix/sysdep.h>
4637
-#include <sysdeps/m68k/sysdep.h>
4640
/* Defines RTLD_PRIVATE_ERRNO. */
4643
move.l %d0, -(%sp); \
4644
jbsr __m68k_read_tp@PLTPC; \
4645
- lea (_GLOBAL_OFFSET_TABLE_@GOTPC, %pc), %a1; \
4646
+ SYSCALL_ERROR_LOAD_GOT (%a1); \
4647
add.l (SYSCALL_ERROR_ERRNO@TLSIE, %a1), %a0; \
4648
move.l (%sp)+, (%a0); \
4651
even when statically linked. */
4652
# define NEED_STATIC_SYSINFO_DSO 1
4656
--- a/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h (revision 11211)
4657
+++ b/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h (revision 12365)
4659
-/* Copyright (C) 2008 Free Software Foundation, Inc.
4660
+/* Copyright (C) 2008, 2010 Free Software Foundation, Inc.
4661
This file is part of the GNU C Library.
4663
The GNU C Library is free software; you can redistribute it and/or
4670
+#define HOST_TEXT_START_ADDR u.start_code
4671
+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
4674
--- a/ports/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h (revision 0)
4675
+++ b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h (revision 12365)
4677
+/* Copyright (C) 2010 Free Software Foundation, Inc.
4678
+ This file is part of the GNU C Library.
4680
+ The GNU C Library is free software; you can redistribute it and/or
4681
+ modify it under the terms of the GNU Lesser General Public
4682
+ License as published by the Free Software Foundation; either
4683
+ version 2.1 of the License, or (at your option) any later version.
4685
+ The GNU C Library is distributed in the hope that it will be useful,
4686
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4687
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4688
+ Lesser General Public License for more details.
4690
+ You should have received a copy of the GNU Lesser General Public
4691
+ License along with the GNU C Library; if not, write to the Free
4692
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4693
+ 02111-1307 USA. */
4695
+#ifndef _LINUX_M68K_M680X0_SYSDEP_H
4696
+#define _LINUX_M68K_M680X0_SYSDEP_H 1
4698
+#include <sysdeps/unix/sysdep.h>
4699
+#include <sysdeps/m68k/m680x0/sysdep.h>
4700
+#include <sysdeps/unix/sysv/linux/m68k/sysdep.h>
4702
+#define SYSCALL_ERROR_LOAD_GOT(reg) \
4703
+ lea (_GLOBAL_OFFSET_TABLE_@GOTPC, %pc), reg
4706
--- a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h (revision 0)
4707
+++ b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h (revision 12365)
4709
+/* Copyright (C) 2010 Free Software Foundation, Inc.
4710
+ This file is part of the GNU C Library.
4712
+ The GNU C Library is free software; you can redistribute it and/or
4713
+ modify it under the terms of the GNU Lesser General Public
4714
+ License as published by the Free Software Foundation; either
4715
+ version 2.1 of the License, or (at your option) any later version.
4717
+ The GNU C Library is distributed in the hope that it will be useful,
4718
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4719
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4720
+ Lesser General Public License for more details.
4722
+ You should have received a copy of the GNU Lesser General Public
4723
+ License along with the GNU C Library; if not, write to the Free
4724
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4725
+ 02111-1307 USA. */
4727
+#ifndef _LINUX_M68K_COLDFIRE_SYSDEP_H
4728
+#define _LINUX_M68K_COLDFIRE_SYSDEP_H 1
4730
+#include <sysdeps/unix/sysdep.h>
4731
+#include <sysdeps/m68k/coldfire/sysdep.h>
4732
+#include <sysdeps/unix/sysv/linux/m68k/sysdep.h>
4734
+#define SYSCALL_ERROR_LOAD_GOT(reg) \
4735
+ move.l &_GLOBAL_OFFSET_TABLE_@GOTPC, reg; \
4736
+ lea (-6, %pc, reg), reg
4739
--- a/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h (revision 11211)
4740
+++ b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h (revision 12365)
4744
#include_next <kernel-features.h>
4746
+/* The n32 syscall ABI did not have a getdents64 syscall until
4748
+#if _MIPS_SIM == _ABIN32 && __LINUX_KERNEL_VERSION < 0x020623
4749
+# undef __ASSUME_GETDENTS64_SYSCALL
4751
--- a/ports/sysdeps/unix/mips/mips64/n32/sysdep.h (revision 11211)
4752
+++ b/ports/sysdeps/unix/mips/mips64/n32/sysdep.h (revision 12365)
4756
99: j __syscall_error; \
4760
li v0, SYS_ify(syscall_name); \
4761
--- a/ports/sysdeps/unix/mips/mips64/n64/sysdep.h (revision 11211)
4762
+++ b/ports/sysdeps/unix/mips/mips64/n64/sysdep.h (revision 12365)
4766
99: j __syscall_error; \
4770
li v0, SYS_ify(syscall_name); \
4771
--- a/ports/sysdeps/m68k/sysdep.h (revision 11211)
4772
+++ b/ports/sysdeps/m68k/sysdep.h (revision 12365)
4774
/* Assembler macros for m68k.
4775
- Copyright (C) 1998, 2003 Free Software Foundation, Inc.
4776
+ Copyright (C) 1998, 2003, 2010 Free Software Foundation, Inc.
4777
This file is part of the GNU C Library.
4779
The GNU C Library is free software; you can redistribute it and/or
4781
# define JUMPTARGET(name) name
4784
-/* Perform operation OP with PC-relative SRC as the first operand and
4785
- DST as the second. TMP is available as a temporary if needed. */
4786
-#ifdef __mcoldfire__
4787
-#define PCREL_OP(OP, SRC, DST, TMP) \
4788
- move.l &SRC - ., TMP; OP (-8, %pc, TMP), DST
4790
-#define PCREL_OP(OP, SRC, DST, TMP) \
4796
-/* As above, but PC is the spelling of the PC register. We need this
4797
- so that the macro can be used in both normal and extended asms. */
4798
-#ifdef __mcoldfire__
4799
-#define PCREL_OP(OP, SRC, DST, TMP, PC) \
4800
- "move.l #" SRC " - ., " TMP "\n\t" OP " (-8, " PC ", " TMP "), " DST
4802
-#define PCREL_OP(OP, SRC, DST, TMP, PC) \
4803
- OP " " SRC "(" PC "), " DST
4806
#endif /* __ASSEMBLER__ */
4807
--- a/ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h (revision 11211)
4808
+++ b/ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h (revision 12365)
4810
/* Define a const math function. */
4811
#define __m81_defun(rettype, func, args) \
4812
__m81_inline rettype __attribute__((__const__)) \
4813
- __m81_u(func) args
4814
+ __NTH (__m81_u(func) args)
4816
/* Define the three variants of a math function that has a direct
4817
implementation in the m68k fpu. FUNC is the name for C (which will be
4821
__m81_inline float_type \
4822
-__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \
4824
+__NTH (__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \
4825
+ float_type __z)) \
4827
return (__x * __y) + __z; \
4831
# define __inline_functions(float_type, s) \
4833
-__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
4834
- float_type *__cosx) \
4835
+__NTH (__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
4836
+ float_type *__cosx)) \
4838
__asm ("fsincos%.x %2,%1:%0" \
4839
: "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \
4840
@@ -368,13 +368,13 @@
4841
NAME, to make token pasting work correctly with -traditional. */
4842
# define __inline_forward_c(rettype, name, args1, args2) \
4843
__MATH_INLINE rettype __attribute__((__const__)) \
4845
+__NTH (name args1) \
4847
return __CONCAT(__,name) args2; \
4850
# define __inline_forward(rettype, name, args1, args2) \
4851
-__MATH_INLINE rettype name args1 \
4852
+__MATH_INLINE rettype __NTH (name args1) \
4854
return __CONCAT(__,name) args2; \
4856
--- a/ports/sysdeps/m68k/m680x0/sysdep.h (revision 0)
4857
+++ b/ports/sysdeps/m68k/m680x0/sysdep.h (revision 12365)
4859
+/* Assembler macros for m680x0.
4860
+ Copyright (C) 2010 Free Software Foundation, Inc.
4861
+ This file is part of the GNU C Library.
4863
+ The GNU C Library is free software; you can redistribute it and/or
4864
+ modify it under the terms of the GNU Lesser General Public
4865
+ License as published by the Free Software Foundation; either
4866
+ version 2.1 of the License, or (at your option) any later version.
4868
+ The GNU C Library is distributed in the hope that it will be useful,
4869
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4870
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4871
+ Lesser General Public License for more details.
4873
+ You should have received a copy of the GNU Lesser General Public
4874
+ License along with the GNU C Library; if not, write to the Free
4875
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4876
+ 02111-1307 USA. */
4878
+#include <sysdeps/m68k/sysdep.h>
4880
+#ifdef __ASSEMBLER__
4882
+/* Perform operation OP with PC-relative SRC as the first operand and
4883
+ DST as the second. TMP is available as a temporary if needed. */
4884
+#define PCREL_OP(OP, SRC, DST, TMP) \
4889
+/* As above, but PC is the spelling of the PC register. We need this
4890
+ so that the macro can be used in both normal and extended asms. */
4891
+#define PCREL_OP(OP, SRC, DST, TMP, PC) \
4892
+ OP " " SRC "(" PC "), " DST
4894
+#endif /* __ASSEMBLER__ */
4895
--- a/ports/sysdeps/m68k/coldfire/sysdep.h (revision 0)
4896
+++ b/ports/sysdeps/m68k/coldfire/sysdep.h (revision 12365)
4898
+/* Assembler macros for Coldfire.
4899
+ Copyright (C) 1998, 2003, 2010 Free Software Foundation, Inc.
4900
+ This file is part of the GNU C Library.
4902
+ The GNU C Library is free software; you can redistribute it and/or
4903
+ modify it under the terms of the GNU Lesser General Public
4904
+ License as published by the Free Software Foundation; either
4905
+ version 2.1 of the License, or (at your option) any later version.
4907
+ The GNU C Library is distributed in the hope that it will be useful,
4908
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4909
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4910
+ Lesser General Public License for more details.
4912
+ You should have received a copy of the GNU Lesser General Public
4913
+ License along with the GNU C Library; if not, write to the Free
4914
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4915
+ 02111-1307 USA. */
4917
+#include <sysdeps/m68k/sysdep.h>
4919
+#ifdef __ASSEMBLER__
4921
+/* Perform operation OP with PC-relative SRC as the first operand and
4922
+ DST as the second. TMP is available as a temporary if needed. */
4923
+# define PCREL_OP(OP, SRC, DST, TMP) \
4924
+ move.l &SRC - ., TMP; OP (-8, %pc, TMP), DST
4928
+/* As above, but PC is the spelling of the PC register. We need this
4929
+ so that the macro can be used in both normal and extended asms. */
4930
+# define PCREL_OP(OP, SRC, DST, TMP, PC) \
4931
+ "move.l #" SRC " - ., " TMP "\n\t" OP " (-8, " PC ", " TMP "), " DST
4933
+#endif /* __ASSEMBLER__ */
4934
--- a/ports/ChangeLog.mips (revision 11211)
4935
+++ b/ports/ChangeLog.mips (revision 12365)
4937
+2010-08-13 Joseph Myers <joseph@codesourcery.com>
4939
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h
4940
+ (__ASSUME_GETDENTS64_SYSCALL): Undefine for n32 ABI before 2.6.35.
4942
+2010-08-13 Chandrakala Chavva <cchavva@caviumnetworks.com>
4944
+ * sysdeps/unix/mips/mips64/n64/sysdep.h (PSEUDO): Add 'nop' in
4946
+ * sysdeps/unix/mips/mips64/n32/sysdep.h (PSEUDO): Ditto.
4948
2010-05-21 Joseph Myers <joseph@codesourcery.com>
4950
* sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c,
4951
--- a/ports/ChangeLog.m68k (revision 11211)
4952
+++ b/ports/ChangeLog.m68k (revision 12365)
4954
+2010-08-25 Andreas Schwab <schwab@linux-m68k.org>
4956
+ * sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h
4957
+ (SYSCALL_ERROR_LOAD_GOT): Use & instead of #.
4959
+2010-08-02 Andreas Schwab <schwab@linux-m68k.org>
4961
+ * sysdeps/m68k/coldfire/sysdep.h: New file.
4962
+ (PCREL_OP): Define.
4963
+ * sysdeps/m68k/m680x0/sysdep.h: New file.
4964
+ (PCREL_OP): Define.
4965
+ * sysdeps/m68k/sysdep.h (PCREL_OP): Don't define here.
4966
+ * sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h: New file.
4967
+ (SYSCALL_ERROR_LOAD_GOT): Define.
4968
+ * sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h: New file.
4969
+ (SYSCALL_ERROR_LOAD_GOT): Define.
4970
+ * sysdeps/unix/sysv/linux/m68k/sysdep.h: Don't include subordinate
4972
+ (SYSCALL_ERROR_HANDLER) [PIC && USE___THREAD]: Use
4973
+ SYSCALL_ERROR_LOAD_GOT.
4975
+2010-06-13 Andreas Schwab <schwab@linux-m68k.org>
4977
+ * sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Mark all functions as
4980
+ * sysdeps/unix/sysv/linux/m68k/sys/user.h (NBPG, UPAGES)
4981
+ (HOST_TEXT_START_ADDR, HOST_STACK_END_ADDR): Define.
4983
+2010-06-11 Andreas Schwab <schwab@linux-m68k.org>
4985
+ * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h: Force
4986
+ alignment of futex variables.
4988
2010-03-13 Andreas Schwab <schwab@linux-m68k.org>
4990
* sysdeps/m68k/m680x0/fpu/s_ccosh.c: Use signbit macro.