[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r14410 - in /fsf/trunk/libc: ./ crypt/ elf/ iconvdata/ localedata/ localedata/tests-mbwc/ scripts/



Author: eglibc
Date: Sun Jul  3 00:22:40 2011
New Revision: 14410

Log:
Import glibc-mainline for 2011-07-03

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/Makefile
    fsf/trunk/libc/Makerules
    fsf/trunk/libc/aclocal.m4
    fsf/trunk/libc/config.make.in
    fsf/trunk/libc/configure
    fsf/trunk/libc/configure.in
    fsf/trunk/libc/crypt/sha256.c
    fsf/trunk/libc/crypt/sha256.h
    fsf/trunk/libc/crypt/sha512.c
    fsf/trunk/libc/crypt/sha512.h
    fsf/trunk/libc/elf/Makefile
    fsf/trunk/libc/elf/dynamic-link.h
    fsf/trunk/libc/iconvdata/extra-module.mk
    fsf/trunk/libc/localedata/ChangeLog
    fsf/trunk/libc/localedata/tests-mbwc/tst_funcs.h
    fsf/trunk/libc/scripts/check-local-headers.sh

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Jul  3 00:22:40 2011
@@ -1,3 +1,56 @@
+2011-07-02  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* Makerules ($(common-objpfx)format.lds): Fail if result is empty.
+
+	* Makefile ($(common-objpfx)testrun.sh): Generate to work relative to
+	containing directory rather than embedding absolute directory names.
+
+	* scripts/check-local-headers.sh: Rewritten using awk.
+	Match by word, not by line.  Print error messages for matches.
+	* Makefile ($(objpfx)check-local-headers.out): Pass AWK in to it.
+
+	* Makerules [shlib-lds-flags empty]:
+	($(common-objpfx)libc_pic.opts): New target.
+	($(common-objpfx)libc_pic.os.clean): New target.
+	($(common-objpfx)libc.so): Link it instead of libc_pic.os.
+
+	* config.make.in (OBJCOPY): New variable.
+	* aclocal.m4 (LIBC_PROG_BINUTILS): Substitute OBJCOPY too.
+	* configure: Regenerated.
+
+	* config.make.in (use-default-link): New variable.
+	* configure.in (use_default_link): Grok --with-default-link to set it.
+	* configure: Regenerated.
+	* Makerules [$(elf) = yes] [$(use-default-link) = yes]:
+	(shlib-lds, shlib-lds-flags): Define to empty.
+
+	* Makerules (shlib-lds): New variable.
+	(shlib-lds-flags): New variable.
+	(build-shlib, build-moduile, build-module-asneeded): Use it.
+	($(common-objpfx)libc.so): Use $(shlib-lds).
+	($(extra-modules-build:%=$(objpfx)%.so)): Likewise.
+	* iconvdata/extra-module.mk ($(objpfx)$(mod).so): Likewise.
+
+	* elf/dynamic-link.h (elf_get_dynamic_info): Make asserts accept
+	DT_FLAGS/DT_FLAGS_1 with zero flags.
+
+	* elf/Makefile ($(objpfx)ld.so): Use -defsym=_begin=0 instead of
+	linker script munging.
+
+2011-07-02  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* crypt/sha512.h (struct sha512_ctx): Add union to access total also
+	as 128-bit value.
+	* crypt/sha512.c (sha512_process_block): Perform total addition using
+	128-bit if possible.
+	(__sha512_finish_ctx): Likewise.
+	* crypt/sha256.h (struct sha256_ctx): Add union to access total also
+	as 64-bit value.
+	* crypt/sha256.c (SWAP64): Define.
+	(sha256_process_block): Perform total addition using 64-bit if
+	possible.
+	(__sha256_finish_ctx): Likewise.
+
 2011-07-01  Ulrich Drepper  <drepper@xxxxxxxxx>
 
 	* nscd/pwdcache.c (cache_addpw): Cleanup.  Add branch prediction.

Modified: fsf/trunk/libc/Makefile
==============================================================================
--- fsf/trunk/libc/Makefile (original)
+++ fsf/trunk/libc/Makefile Sun Jul  3 00:22:40 2011
@@ -163,8 +163,10 @@
 $(common-objpfx)testrun.sh: $(common-objpfx)config.make \
 			    $(..)Makeconfig $(..)Makefile
 	(echo '#!/bin/sh'; \
-	 echo "GCONV_PATH='$(common-objpfx)iconvdata' \\"; \
-	 echo 'exec $(run-program-prefix) $${1+"$$@"}'; \
+	 echo 'builddir=`dirname "$$0"`'; \
+	 echo 'GCONV_PATH="$${builddir}/iconvdata" \'; \
+	 echo 'exec $(subst $(common-objdir),"$${builddir}",\
+			    $(run-program-prefix)) $${1+"$$@"}'; \
 	) > $@T
 	chmod a+x $@T
 	mv -f $@T $@
@@ -284,7 +286,8 @@
 endif
 
 $(objpfx)check-local-headers.out: scripts/check-local-headers.sh
-	scripts/check-local-headers.sh "$(includedir)" "$(objpfx)" > $@
+	AWK='$(AWK)' scripts/check-local-headers.sh \
+	  "$(includedir)" "$(objpfx)" > $@
 
 ifneq ($(PERL),no)
 installed-headers = argp/argp.h assert/assert.h catgets/nl_types.h \

Modified: fsf/trunk/libc/Makerules
==============================================================================
--- fsf/trunk/libc/Makerules (original)
+++ fsf/trunk/libc/Makerules Sun Jul  3 00:22:40 2011
@@ -479,6 +479,11 @@
 endif
 
 ifeq (yes,$(elf))
+ifeq (yes,$(use-default-link))
+# If the linker is good enough, we can let it use its default linker script.
+shlib-lds =
+shlib-lds-flags =
+else
 # binutils only position loadable notes into the first page for binaries,
 # not for shared objects
 $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
@@ -514,8 +519,12 @@
 	mv -f $@T $@
 common-generated += shlib.lds
 
+shlib-lds = $(common-objpfx)shlib.lds
+shlib-lds-flags = -T $(shlib-lds)
+endif
+
 define build-shlib
-$(build-shlib-helper) -o $@ -T $(common-objpfx)shlib.lds \
+$(build-shlib-helper) -o $@ $(shlib-lds-flags) \
 	  $(csu-objpfx)abi-note.o $(build-shlib-objlist)
 endef
 else
@@ -557,11 +566,11 @@
 # binutils only position loadable notes into the first page for binaries,
 # not for shared objects
 define build-module
-$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
+$(build-module-helper) -o $@ $(shlib-lds-flags) \
 	  $(csu-objpfx)abi-note.o $(build-module-objlist)
 endef
 define build-module-asneeded
-$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
+$(build-module-helper) -o $@ $(shlib-lds-flags) \
 	  $(csu-objpfx)abi-note.o \
 	  -Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed
 endef
@@ -612,13 +621,30 @@
 ifeq ($(elf),yes)
 $(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
 	$(LINK.o) -nostdlib -nostartfiles -r -o $@ \
-	$(LDFLAGS-c_pic.os) -Wl,-d -Wl,--whole-archive $^
+	$(LDFLAGS-c_pic.os) -Wl,-d -Wl,--whole-archive $^ -o $@
+
+ifeq (,$(strip $(shlib-lds-flags)))
+# Generate a list of -R options to excise .gnu.glibc-stub.* sections.
+$(common-objpfx)libc_pic.opts: $(common-objpfx)libc_pic.os
+	$(OBJDUMP) -h $< | \
+	$(AWK) '$$2 ~ /\.gnu\.glibc-stub\./ { print "-R", $$2 }' \
+		> $@T
+	mv -f $@T $@
+# Apply those -R options.
+$(common-objpfx)libc_pic.os.clean: $(common-objpfx)libc_pic.opts \
+				   $(common-objpfx)libc_pic.os
+	$(OBJCOPY) @$^ $@
+generated += libc_pic.opts libc_pic.os.clean
+
+libc_pic_clean := .clean
+endif
+
 # Use our own special initializer and finalizer files for libc.so.
 $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
-			 $(common-objpfx)libc_pic.os \
+			 $(common-objpfx)libc_pic.os$(libc_pic_clean) \
 			 $(elfobjdir)/sofini.os \
 			 $(elfobjdir)/interp.os $(elfobjdir)/ld.so \
-			 $(common-objpfx)shlib.lds
+			 $(shlib-lds)
 	$(build-shlib)
 ifeq ($(versioning),yes)
 $(common-objpfx)libc.so: $(common-objpfx)libc.map
@@ -689,7 +715,7 @@
 
 extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
 $(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
-		$(objpfx)%.os $(common-objpfx)shlib.lds \
+		$(objpfx)%.os $(shlib-lds) \
 		$(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
 	$(build-module)
 endif
@@ -967,6 +993,7 @@
 	$(LINK.o) -shared $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS.so) \
 		  -x c /dev/null -o $@.so -Wl,--verbose -v 2>&1 \
 	| sed -n -f $< > $@.new
+	test -s $@.new
 	rm -f $@.so
 	mv -f $@.new $@
 common-generated += format.lds

Modified: fsf/trunk/libc/aclocal.m4
==============================================================================
--- fsf/trunk/libc/aclocal.m4 (original)
+++ fsf/trunk/libc/aclocal.m4 Sun Jul  3 00:22:40 2011
@@ -101,6 +101,8 @@
 AC_SUBST(AR)
 OBJDUMP=`$CC -print-prog-name=objdump`
 AC_SUBST(OBJDUMP)
+OBJCOPY=`$CC -print-prog-name=objcopy`
+AC_SUBST(OBJCOPY)
 
 # Determine whether we are using GNU binutils.
 AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu,

Modified: fsf/trunk/libc/config.make.in
==============================================================================
--- fsf/trunk/libc/config.make.in (original)
+++ fsf/trunk/libc/config.make.in Sun Jul  3 00:22:40 2011
@@ -69,6 +69,7 @@
 fno-unit-at-a-time = @fno_unit_at_a_time@
 bind-now = @bindnow@
 have-hash-style = @libc_cv_hashstyle@
+use-default-link = @use_default_link@
 
 static-libgcc = @libc_cv_gcc_static_libgcc@
 
@@ -115,6 +116,7 @@
 BISON = @BISON@
 AUTOCONF = @AUTOCONF@
 OBJDUMP = @OBJDUMP@
+OBJCOPY = @OBJCOPY@
 
 # Installation tools.
 INSTALL = @INSTALL@

Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Sun Jul  3 00:22:40 2011
@@ -677,6 +677,7 @@
 LD
 AS
 MIG
+OBJCOPY
 OBJDUMP
 AR
 LN_S
@@ -696,6 +697,7 @@
 bindnow
 oldest_abi
 enable_check_abi
+use_default_link
 with_cvs
 with_fp
 ac_ct_CXX
@@ -770,6 +772,7 @@
 with_xcoff
 with_cvs
 with_headers
+with_default_link
 enable_sanity_checks
 enable_check_abi
 enable_shared
@@ -1464,6 +1467,7 @@
   --without-cvs           if CVS should not be used
   --with-headers=PATH     location of system headers to use (for example
                           /usr/src/linux/include) [default=compiler default]
+  --with-default-link     do not use explicit linker scripts [default=no]
   --with-tls              enable support for TLS
   --without-__thread      do not use TLS features even when supporting them
   --with-cpu=CPU          select code for CPU variant
@@ -3578,6 +3582,16 @@
   withval=$with_headers; sysheaders=$withval
 else
   sysheaders=''
+fi
+
+
+
+
+# Check whether --with-default-link was given.
+if test "${with_default_link+set}" = set; then :
+  withval=$with_default_link; use_default_link=$withval
+else
+  use_default_link=no
 fi
 
 
@@ -4673,6 +4687,8 @@
 
 OBJDUMP=`$CC -print-prog-name=objdump`
 
+OBJCOPY=`$CC -print-prog-name=objcopy`
+
 
 # Determine whether we are using GNU binutils.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AS is GNU as" >&5

Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Sun Jul  3 00:22:40 2011
@@ -113,6 +113,14 @@
 			    @<:@default=compiler default@:>@]),
 	    [sysheaders=$withval],
 	    [sysheaders=''])
+
+AC_SUBST(use_default_link)
+AC_ARG_WITH([default-link],
+	    AC_HELP_STRING([--with-default-link],
+			   [do not use explicit linker scripts
+			    @<:@default=no@:>@]),
+	    [use_default_link=$withval],
+	    [use_default_link=no])
 
 AC_ARG_ENABLE([sanity-checks],
 	      AC_HELP_STRING([--disable-sanity-checks],

Modified: fsf/trunk/libc/crypt/sha256.c
==============================================================================
--- fsf/trunk/libc/crypt/sha256.c (original)
+++ fsf/trunk/libc/crypt/sha256.c Sun Jul  3 00:22:40 2011
@@ -1,6 +1,6 @@
 /* Functions to compute SHA256 message digest of files or memory blocks.
    according to the definition of SHA256 in FIPS 180-2.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -35,12 +35,23 @@
 # ifdef _LIBC
 #  include <byteswap.h>
 #  define SWAP(n) bswap_32 (n)
+#  define SWAP64(n) bswap_64 (n)
 # else
 #  define SWAP(n) \
     (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
+#  define SWAP64(n) \
+  (((n) << 56)					\
+   | (((n) & 0xff00) << 40)			\
+   | (((n) & 0xff0000) << 24)			\
+   | (((n) & 0xff000000) << 8)			\
+   | (((n) >> 8) & 0xff000000)			\
+   | (((n) >> 24) & 0xff0000)			\
+   | (((n) >> 40) & 0xff00)			\
+   | ((n) >> 56))
 # endif
 #else
 # define SWAP(n) (n)
+# define SWAP64(n) (n)
 #endif
 
 
@@ -89,10 +100,8 @@
 
   /* First increment the byte count.  FIPS 180-2 specifies the possible
      length of the file up to 2^64 bits.  Here we only compute the
-     number of bytes.  Do a double word increment.  */
-  ctx->total[0] += len;
-  if (ctx->total[0] < len)
-    ++ctx->total[1];
+     number of bytes.  */
+  ctx->total64 += len;
 
   /* Process all bytes in the buffer with 64 bytes in each round of
      the loop.  */
@@ -186,7 +195,7 @@
   ctx->H[6] = 0x1f83d9ab;
   ctx->H[7] = 0x5be0cd19;
 
-  ctx->total[0] = ctx->total[1] = 0;
+  ctx->total64 = 0;
   ctx->buflen = 0;
 }
 
@@ -206,17 +215,21 @@
   size_t pad;
 
   /* Now count remaining bytes.  */
-  ctx->total[0] += bytes;
-  if (ctx->total[0] < bytes)
-    ++ctx->total[1];
+  ctx->total64 += bytes;
 
   pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes;
   memcpy (&ctx->buffer[bytes], fillbuf, pad);
 
   /* Put the 64-bit file length in *bits* at the end of the buffer.  */
-  *(uint32_t *) &ctx->buffer[bytes + pad + 4] = SWAP (ctx->total[0] << 3);
-  *(uint32_t *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) |
-						  (ctx->total[0] >> 29));
+#ifdef _STRING_ARCH_unaligned
+  *(uint64_t *)  &ctx->buffer[bytes + pad] = SWAP64 (ctx->total64 << 3);
+#else
+  *(uint32_t *) &ctx->buffer[bytes + pad + 4]
+    = SWAP (ctx->total[TOTAL64_low] << 3);
+  *(uint32_t *) &ctx->buffer[bytes + pad]
+    = SWAP ((ctx->total[TOTAL64_high] << 3) |
+	    (ctx->total[TOTAL64_low] >> 29));
+#endif
 
   /* Process last bytes.  */
   sha256_process_block (ctx->buffer, bytes + pad + 8, ctx);

Modified: fsf/trunk/libc/crypt/sha256.h
==============================================================================
--- fsf/trunk/libc/crypt/sha256.h (original)
+++ fsf/trunk/libc/crypt/sha256.h Sun Jul  3 00:22:40 2011
@@ -1,6 +1,6 @@
 /* Declaration of functions and data types used for SHA256 sum computing
    library functions.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,7 @@
 #include <limits.h>
 #include <stdint.h>
 #include <stdio.h>
+#include <endian.h>
 
 
 /* Structure to save state of computation between the single steps.  */
@@ -31,7 +32,13 @@
 {
   uint32_t H[8];
 
-  uint32_t total[2];
+  union
+  {
+    uint64_t total64;
+#define TOTAL64_low (1 - (BYTE_ORDER == LITTLE_ENDIAN))
+#define TOTAL64_high (BYTE_ORDER == LITTLE_ENDIAN)
+    uint32_t total[2];
+  };
   uint32_t buflen;
   char buffer[128] __attribute__ ((__aligned__ (__alignof__ (uint32_t))));
 };

Modified: fsf/trunk/libc/crypt/sha512.c
==============================================================================
--- fsf/trunk/libc/crypt/sha512.c (original)
+++ fsf/trunk/libc/crypt/sha512.c Sun Jul  3 00:22:40 2011
@@ -1,6 +1,6 @@
 /* Functions to compute SHA512 message digest of files or memory blocks.
    according to the definition of SHA512 in FIPS 180-2.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -121,9 +121,13 @@
   /* First increment the byte count.  FIPS 180-2 specifies the possible
      length of the file up to 2^128 bits.  Here we only compute the
      number of bytes.  Do a double word increment.  */
-  ctx->total[0] += len;
-  if (ctx->total[0] < len)
-    ++ctx->total[1];
+#ifdef USE_TOTAL128
+  ctx->total128 += len;
+#else
+  ctx->total[TOTAL128_low] += len;
+  if (ctx->total[TOTAL128_low] < len)
+    ++ctx->total[TOTAL128_high];
+#endif
 
   /* Process all bytes in the buffer with 128 bytes in each round of
      the loop.  */
@@ -237,17 +241,23 @@
   size_t pad;
 
   /* Now count remaining bytes.  */
-  ctx->total[0] += bytes;
-  if (ctx->total[0] < bytes)
-    ++ctx->total[1];
+#ifdef USE_TOTAL128
+  ctx->total128 += bytes;
+#else
+  ctx->total[TOTAL128_low] += bytes;
+  if (ctx->total[TOTAL128_low] < bytes)
+    ++ctx->total[TOTAL128_high];
+#endif
 
   pad = bytes >= 112 ? 128 + 112 - bytes : 112 - bytes;
   memcpy (&ctx->buffer[bytes], fillbuf, pad);
 
   /* Put the 128-bit file length in *bits* at the end of the buffer.  */
-  *(uint64_t *) &ctx->buffer[bytes + pad + 8] = SWAP (ctx->total[0] << 3);
-  *(uint64_t *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) |
-						  (ctx->total[0] >> 61));
+  *(uint64_t *) &ctx->buffer[bytes + pad + 8]
+    = SWAP (ctx->total[TOTAL128_low] << 3);
+  *(uint64_t *) &ctx->buffer[bytes + pad]
+    = SWAP ((ctx->total[TOTAL128_high] << 3) |
+	    (ctx->total[TOTAL128_low] >> 61));
 
   /* Process last bytes.  */
   sha512_process_block (ctx->buffer, bytes + pad + 16, ctx);

Modified: fsf/trunk/libc/crypt/sha512.h
==============================================================================
--- fsf/trunk/libc/crypt/sha512.h (original)
+++ fsf/trunk/libc/crypt/sha512.h Sun Jul  3 00:22:40 2011
@@ -1,6 +1,6 @@
 /* Declaration of functions and data types used for SHA512 sum computing
    library functions.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,8 @@
 #include <limits.h>
 #include <stdint.h>
 #include <stdio.h>
+#include <endian.h>
+#include <bits/wordsize.h>
 
 
 /* Structure to save state of computation between the single steps.  */
@@ -31,7 +33,21 @@
 {
   uint64_t H[8];
 
-  uint64_t total[2];
+  union
+  {
+#if defined __GNUC__ && __WORDSIZE == 64
+# define USE_TOTAL128
+    unsigned int total128 __attribute__ ((__mode__ (TI)));
+#endif
+#if BYTE_ORDER == LITTLE_ENDIAN
+# define TOTAL128_low 0
+# define TOTAL128_high 1
+#else
+# define TOTAL128_low 1
+# define TOTAL128_high 0
+#endif
+    uint64_t total[2];
+  };
   uint64_t buflen;
   char buffer[256] __attribute__ ((__aligned__ (__alignof__ (uint64_t))));
 };

Modified: fsf/trunk/libc/elf/Makefile
==============================================================================
--- fsf/trunk/libc/elf/Makefile (original)
+++ fsf/trunk/libc/elf/Makefile Sun Jul  3 00:22:40 2011
@@ -406,19 +406,11 @@
 z-now-yes = -Wl,-z,now
 
 $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map)
-	@rm -f $@.lds
-	$(LINK.o) -nostdlib -nostartfiles -shared $(z-now-$(bind-now))	\
-		  $(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 |	\
-		  LC_ALL=C \
-		  sed -e '/^=========/,/^=========/!d;/^=========/d'	\
-		      -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
-		  > $@.lds
-	test -s $@.lds
 	$(LINK.o) -nostdlib -nostartfiles -shared -o $@			\
 		  $(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now))	\
 		  $(filter-out $(map-file),$^) $(load-map-file)		\
-		  -Wl,-soname=$(rtld-installed-name) -T $@.lds
-	rm -f $@.lds
+		  -Wl,-soname=$(rtld-installed-name)			\
+		  -Wl,-defsym=_begin=0
 	readelf -s $@ \
 	  | $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
 

Modified: fsf/trunk/libc/elf/dynamic-link.h
==============================================================================
--- fsf/trunk/libc/elf/dynamic-link.h (original)
+++ fsf/trunk/libc/elf/dynamic-link.h Sun Jul  3 00:22:40 2011
@@ -1,5 +1,5 @@
 /* Inline functions for dynamic linking.
-   Copyright (C) 1995-2005, 2006, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1995-2005,2006,2008,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -201,9 +201,9 @@
 #ifdef RTLD_BOOTSTRAP
   /* Only the bind now flags are allowed.  */
   assert (info[VERSYMIDX (DT_FLAGS_1)] == NULL
-	  || info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val == DF_1_NOW);
+	  || (info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val & ~DF_1_NOW) == 0);
   assert (info[DT_FLAGS] == NULL
-	  || info[DT_FLAGS]->d_un.d_val == DF_BIND_NOW);
+	  || (info[DT_FLAGS]->d_un.d_val & ~DF_BIND_NOW) == 0);
   /* Flags must not be set for ld.so.  */
   assert (info[DT_RUNPATH] == NULL);
   assert (info[DT_RPATH] == NULL);

Modified: fsf/trunk/libc/iconvdata/extra-module.mk
==============================================================================
--- fsf/trunk/libc/iconvdata/extra-module.mk (original)
+++ fsf/trunk/libc/iconvdata/extra-module.mk Sun Jul  3 00:22:40 2011
@@ -4,7 +4,7 @@
 extra-objs := $(extra-objs) $(patsubst %,%.os,$($(mod)-routines))
 
 $(objpfx)$(mod).so: $(addprefix $(objpfx),$(addsuffix .os,$($(mod)-routines)))\
-		    $(common-objpfx)shlib.lds
+		    $(shlib-lds)
 	$(build-module-asneeded)
 
 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.

Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Sun Jul  3 00:22:40 2011
@@ -1,3 +1,8 @@
+2011-07-02  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* tests-mbwc/tst_funcs.h (TST_DECL_VARS, TST_HEAD_LOCALE):
+	Remove unused variable.
+
 2011-05-21  Ulrich Drepper  <drepper@xxxxxxxxx>
 
 	[BZ #12788]

Modified: fsf/trunk/libc/localedata/tests-mbwc/tst_funcs.h
==============================================================================
--- fsf/trunk/libc/localedata/tests-mbwc/tst_funcs.h (original)
+++ fsf/trunk/libc/localedata/tests-mbwc/tst_funcs.h Sun Jul  3 00:22:40 2011
@@ -84,7 +84,7 @@
 #define TST_DECL_VARS(_type_)				\
 	int   loc, rec, err_count = 0;			\
 	int   warn_count __attribute__ ((unused));	\
-	int   func_id, seq_num = 0;			\
+	int   seq_num = 0;				\
 	const char *locale;				\
 	int   err_exp, ret_flg;				\
 	int errno_save = 0;				\
@@ -96,8 +96,7 @@
 
 
 #define TST_HEAD_LOCALE(ofunc, s_func) \
-  func_id = TST_HEAD (ofunc).func_id;					      \
-  locale  = TST_HEAD (ofunc).locale;					      \
+  locale = TST_HEAD (ofunc).locale;					      \
   if (setlocale (LC_ALL, locale) == NULL)				      \
     {									      \
       fprintf (stderr, "Warning : can't set locale: %s\nskipping ...\n",      \

Modified: fsf/trunk/libc/scripts/check-local-headers.sh
==============================================================================
--- fsf/trunk/libc/scripts/check-local-headers.sh (original)
+++ fsf/trunk/libc/scripts/check-local-headers.sh Sun Jul  3 00:22:40 2011
@@ -1,5 +1,5 @@
 #! /bin/bash
-# Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2005,2007,2009,2011 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -23,18 +23,21 @@
 # To avoid long paths.
 cd "$objpfx"
 
-
 # Search all dependency files for file names in the include directory.
 # There are a few system headers we are known to use.
-if fgrep "$includedir" */*.{o,os,oS}.d |
-fgrep -v "$includedir/asm" |
-fgrep -v "$includedir/linux" |
-fgrep -v "$includedir/selinux" |
-fgrep -v "$includedir/sys/capability.h" |
-fgrep -v "$includedir/gd" |
-fgrep -v "$includedir/nss3"; then
-  # If we found a match something is wrong.
-  exit 1
-fi
-
-exit 0
+exec ${AWK} -v includedir="$includedir" '
+BEGIN {
+  status = 0
+  exclude = "^" includedir \
+    "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h)"
+}
+/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
+{
+  for (i = 1; i <= NF; ++i) {
+    if ($i ~ ("^" includedir) && $i !~ exclude) {
+      print "***", obj, "uses", $i
+      status = 1
+    }
+  }
+}
+END { exit status }' */*.{o,os,oS}.d