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

[commits] r14662 - in /trunk: libc/ libc/bits/ libc/crypt/ libc/csu/ libc/debug/ libc/elf/ libc/iconvdata/ libc/inet/ libc/intl/ libc/...



Author: joseph
Date: Fri Jul 22 06:43:39 2011
New Revision: 14662

Log:
Merge changes between 14282 and r14661 from /fsf/trunk.

Added:
    trunk/libc/nss/nss_db/db-init.c
      - copied unchanged from r14661, fsf/trunk/libc/nss/nss_db/db-init.c
    trunk/libc/nss/nss_files/files-init.c
      - copied unchanged from r14661, fsf/trunk/libc/nss/nss_files/files-init.c
    trunk/libc/string/test-strncat.c
      - copied unchanged from r14661, fsf/trunk/libc/string/test-strncat.c
    trunk/libc/sysdeps/i386/i686/multiarch/stpcpy-sse2.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/stpcpy-sse2.S
    trunk/libc/sysdeps/i386/i686/multiarch/stpcpy-ssse3.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/stpcpy-ssse3.S
    trunk/libc/sysdeps/i386/i686/multiarch/stpcpy.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/stpcpy.S
    trunk/libc/sysdeps/i386/i686/multiarch/stpncpy-sse2.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/stpncpy-sse2.S
    trunk/libc/sysdeps/i386/i686/multiarch/stpncpy-ssse3.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/stpncpy-ssse3.S
    trunk/libc/sysdeps/i386/i686/multiarch/stpncpy.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/stpncpy.S
    trunk/libc/sysdeps/i386/i686/multiarch/strcpy-sse2.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcpy-sse2.S
    trunk/libc/sysdeps/i386/i686/multiarch/strcpy-ssse3.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcpy-ssse3.S
    trunk/libc/sysdeps/i386/i686/multiarch/strcpy.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcpy.S
    trunk/libc/sysdeps/i386/i686/multiarch/strncpy-c.c
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strncpy-c.c
    trunk/libc/sysdeps/i386/i686/multiarch/strncpy-sse2.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strncpy-sse2.S
    trunk/libc/sysdeps/i386/i686/multiarch/strncpy-ssse3.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strncpy-ssse3.S
    trunk/libc/sysdeps/i386/i686/multiarch/strncpy.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strncpy.S
    trunk/libc/sysdeps/x86_64/multiarch/stpcpy-sse2-unaligned.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/stpcpy-sse2-unaligned.S
    trunk/libc/sysdeps/x86_64/multiarch/stpcpy-ssse3.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/stpcpy-ssse3.S
    trunk/libc/sysdeps/x86_64/multiarch/stpncpy-sse2-unaligned.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/stpncpy-sse2-unaligned.S
    trunk/libc/sysdeps/x86_64/multiarch/stpncpy-ssse3.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/stpncpy-ssse3.S
    trunk/libc/sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S
    trunk/libc/sysdeps/x86_64/multiarch/strcat-ssse3.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strcat-ssse3.S
    trunk/libc/sysdeps/x86_64/multiarch/strcat.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strcat.S
    trunk/libc/sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S
    trunk/libc/sysdeps/x86_64/multiarch/strcpy-ssse3.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strcpy-ssse3.S
    trunk/libc/sysdeps/x86_64/multiarch/strlen-sse2-pminub.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strlen-sse2-pminub.S
    trunk/libc/sysdeps/x86_64/multiarch/strncat-c.c
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strncat-c.c
    trunk/libc/sysdeps/x86_64/multiarch/strncat-sse2-unaligned.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strncat-sse2-unaligned.S
    trunk/libc/sysdeps/x86_64/multiarch/strncat-ssse3.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strncat-ssse3.S
    trunk/libc/sysdeps/x86_64/multiarch/strncat.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strncat.S
    trunk/libc/sysdeps/x86_64/multiarch/strncpy-sse2-unaligned.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strncpy-sse2-unaligned.S
    trunk/libc/sysdeps/x86_64/multiarch/strncpy-ssse3.S
      - copied unchanged from r14661, fsf/trunk/libc/sysdeps/x86_64/multiarch/strncpy-ssse3.S
Modified:
    trunk/libc/ChangeLog
    trunk/libc/Makefile
    trunk/libc/Makerules
    trunk/libc/NEWS
    trunk/libc/aclocal.m4
    trunk/libc/bits/sched.h
    trunk/libc/config.make.in
    trunk/libc/configure
    trunk/libc/configure.in
    trunk/libc/crypt/md5.c
    trunk/libc/crypt/md5.h
    trunk/libc/crypt/sha256.c
    trunk/libc/crypt/sha256.h
    trunk/libc/crypt/sha512.c
    trunk/libc/crypt/sha512.h
    trunk/libc/csu/elf-init.c
    trunk/libc/debug/xtrace.sh
    trunk/libc/elf/Makefile
    trunk/libc/elf/cache.c
    trunk/libc/elf/dl-close.c
    trunk/libc/elf/dl-fini.c
    trunk/libc/elf/dynamic-link.h
    trunk/libc/elf/soinit.c
    trunk/libc/elf/tst-audit4.c
    trunk/libc/elf/tst-audit6.c
    trunk/libc/iconvdata/extra-module.mk
    trunk/libc/iconvdata/gb18030.c
    trunk/libc/iconvdata/johab.c
    trunk/libc/inet/getnetgrent_r.c
    trunk/libc/intl/dcigettext.c
    trunk/libc/localedata/ChangeLog
    trunk/libc/localedata/tests-mbwc/tst_funcs.h
    trunk/libc/malloc/Makefile
    trunk/libc/malloc/hooks.c
    trunk/libc/malloc/memusage.sh
    trunk/libc/manual/intro.texi
    trunk/libc/misc/sys/cdefs.h
    trunk/libc/nis/nss_compat/compat-pwd.c
    trunk/libc/nis/nss_compat/compat-spwd.c
    trunk/libc/nis/nss_nisplus/nisplus-ethers.c
    trunk/libc/nis/nss_nisplus/nisplus-spwd.c
    trunk/libc/nptl/ChangeLog
    trunk/libc/nptl/allocatestack.c
    trunk/libc/nptl/nptl-init.c
    trunk/libc/nptl/pthreadP.h
    trunk/libc/nptl/sysdeps/pthread/pthread-functions.h
    trunk/libc/nptl/sysdeps/unix/sysv/linux/fork.c
    trunk/libc/nscd/aicache.c
    trunk/libc/nscd/cache.c
    trunk/libc/nscd/connections.c
    trunk/libc/nscd/grpcache.c
    trunk/libc/nscd/hstcache.c
    trunk/libc/nscd/initgrcache.c
    trunk/libc/nscd/nscd.c
    trunk/libc/nscd/nscd.h
    trunk/libc/nscd/nscd_conf.c
    trunk/libc/nscd/nscd_getserv_r.c
    trunk/libc/nscd/pwdcache.c
    trunk/libc/nscd/servicescache.c
    trunk/libc/nss/Makefile
    trunk/libc/nss/Versions
    trunk/libc/nss/nss_db/db-XXX.c
    trunk/libc/nss/nss_db/db-open.c
    trunk/libc/nss/nsswitch.c
    trunk/libc/nss/nsswitch.h
    trunk/libc/po/bg.po
    trunk/libc/po/cs.po
    trunk/libc/po/fr.po
    trunk/libc/po/ja.po
    trunk/libc/po/ko.po
    trunk/libc/po/nl.po
    trunk/libc/po/pl.po
    trunk/libc/po/ru.po
    trunk/libc/po/sv.po
    trunk/libc/posix/getopt.c
    trunk/libc/posix/glob.c
    trunk/libc/resolv/res_comp.c
    trunk/libc/resolv/res_query.c
    trunk/libc/scripts/check-local-headers.sh
    trunk/libc/stdlib/strtod_l.c
    trunk/libc/stdlib/tst-strtod.c
    trunk/libc/string/Makefile
    trunk/libc/string/strncat.c
    trunk/libc/string/strxfrm_l.c
    trunk/libc/string/tester.c
    trunk/libc/sysdeps/generic/dl-irel.h
    trunk/libc/sysdeps/generic/ldsodefs.h
    trunk/libc/sysdeps/i386/Makefile
    trunk/libc/sysdeps/i386/i686/multiarch/Makefile
    trunk/libc/sysdeps/i386/i686/multiarch/strstr-c.c
    trunk/libc/sysdeps/posix/getaddrinfo.c
    trunk/libc/sysdeps/s390/s390-64/Makefile
    trunk/libc/sysdeps/unix/sysv/linux/Makefile
    trunk/libc/sysdeps/unix/sysv/linux/bits/sched.h
    trunk/libc/sysdeps/unix/sysv/linux/bits/sigcontext.h
    trunk/libc/sysdeps/unix/sysv/linux/fpathconf.c
    trunk/libc/sysdeps/unix/sysv/linux/getsysstats.c
    trunk/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
    trunk/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h
    trunk/libc/sysdeps/unix/sysv/linux/pathconf.c
    trunk/libc/sysdeps/unix/sysv/linux/pathconf.h
    trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
    trunk/libc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
    trunk/libc/sysdeps/unix/sysv/linux/sys/sysmacros.h
    trunk/libc/sysdeps/wordsize-64/tst-writev.c
    trunk/libc/sysdeps/x86_64/bits/link.h
    trunk/libc/sysdeps/x86_64/dl-trampoline.S
    trunk/libc/sysdeps/x86_64/multiarch/Makefile
    trunk/libc/sysdeps/x86_64/multiarch/init-arch.c
    trunk/libc/sysdeps/x86_64/multiarch/init-arch.h
    trunk/libc/sysdeps/x86_64/multiarch/strcpy.S
    trunk/libc/sysdeps/x86_64/multiarch/strlen-no-bsf.S
    trunk/libc/sysdeps/x86_64/multiarch/strlen.S
    trunk/ports/ChangeLog.arm
    trunk/ports/ChangeLog.m68k
    trunk/ports/sysdeps/arm/elf/start.S
    trunk/ports/sysdeps/m68k/dl-trampoline.S

Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Fri Jul 22 06:43:39 2011
@@ -1,3 +1,562 @@
+2011-07-21  Liubov Dmitrieva  <liubov.dmitrieva@xxxxxxxxx>
+
+	* sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: Fix overfow
+	bug in strncpy/strncat.
+	* sysdeps/x86_64/multiarch/strcpy-ssse3.S: Likewise.
+
+2011-07-21  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* string/tester.c (test_strcat): Add tests for different alignments
+	of source and destination.
+	(test_strncat): Likewise.
+
+2011-07-20  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12852]
+	* posix/glob.c (glob): Check passed in values before using them in
+	expressions to avoid some overflows.
+	(glob_in_dir): Likewise.
+
+	[BZ #13007]
+	* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): More complete
+	check for AVX enablement so that we don't crash with old kernels and
+	new hardware.
+	* elf/tst-audit4.c: Add same checks here.
+	* elf/tst-audit6.c: Likewise.
+
+	* sysdeps/x86_64/bits/link.h (La_x86_64_ymm): Force 16-byte alignment.
+
+2011-07-09  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/pathconf.c: Include <string.h>.
+
+2011-07-20  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* po/cs.po: Update from translation team.
+	* po/bg.po: Likewise.
+
+2011-07-12  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	* misc/sys/cdefs.h: Add support for const attribute.
+	* sysdeps/unix/sysv/linux/sys/sysmacros.h: Add __attribute_const__
+	to gnu_dev_{major,minor,makedev} functions.
+
+2011-07-20  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	* intl/dcigettext.c (get_output_charset): Add missing bracket.
+
+2011-07-20  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* resolv/res_query.c (__libc_res_nquerydomain): Use size_t for
+	strlen results.
+
+2011-07-13  Andreas Krebbel  <Andreas.Krebbel@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
+	(INTERNAL_VSYSCALL_NCS): Use r10 for backing up the return address
+	register in order to avoid conflicts with the soft frame pointer
+	being held in r11 when necessary.
+	* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
+	(INTERNAL_VSYSCALL_NCS): Likewise.
+
+2011-07-14  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	* elf/dl-fini.c (_dl_sort_fini): Remove unused link_map *l argument,
+	* elf/dl-fini.c (_dl_fini): Adjust caller.
+	* elf/dl-close.c (_dl_close_worker): Likewise.
+	* sysdeps/generic/ldsodefs.h: Adjust declaration.
+
+2011-07-15  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	* elf/cache.c (load_aux_cache): Remove unnecessary condition of
+	"aux_cache->nlibs < 0".
+
+	* nscd/nscd_conf.c (nscd_parse_file): Remove unnecessary condition
+	in the reload-count case.
+
+2011-07-15  Liubov Dmitrieva  <liubov.dmitrieva@xxxxxxxxx>
+
+	* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
+	strcat-ssse3 strcat-sse2-unaligned strncat-ssse3
+	strncat-sse2-unaligned strncat-c strlen-sse2-pminub
+	* sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S: New file.
+	* sysdeps/x86_64/multiarch/strcat.S: New file.
+	* sysdeps/x86_64/multiarch/strncat.S: New file.
+	* sysdeps/x86_64/multiarch/strncat-c.c: New file.
+	* sysdeps/x86_64/multiarch/strcat-ssse3.S: New file.
+	* sysdeps/x86_64/multiarch/strncat-sse2-unaligned.S: New file.
+	* sysdeps/x86_64/multiarch/strncat-ssse3.S: New file.
+	* sysdeps/x86_64/multiarch/strcpy-ssse3.S
+	(USE_AS_STRCAT): Define.
+	Add strcat and strncat support.
+	* sysdeps/x86_64/multiarch/strlen-no-bsf.S: Likewise.
+	* sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: Likewise.
+	* sysdeps/x86_64/multiarch/strlen-sse2-pminub.S: New file.
+	* string/strncat.c: Update.
+	(USE_AS_STRNCAT): Define.
+	* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
+	Turn on bit_Prefer_PMINUB_for_stringop for Intel Core i3, i5
+	and i7.
+	* sysdeps/x86_64/multiarch/init-arch.h
+	(bit_Prefer_PMINUB_for_stringop): New.
+	(index_Prefer_PMINUB_for_stringop): Likewise.
+	* sysdeps/x86_64/multiarch/strlen.S (strlen): Check
+	bit_Prefer_PMINUB_for_stringop.
+
+2011-07-19  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* crypt/sha512.h (struct sha512_ctx): Move buffer into union and add
+	buffer64.
+	* crypt/sha512.c (__sha512_finish_ctx): Use buffer64 for writes instead
+	of casting of buffer.
+	* crypt/sha256.h (struct sha256_ctx): Move buffer into union and add
+	buffer32 and buffer64.
+	* crypt/sha256.c (__sha256_finish_ctx): Use buffer32 or buffer64 for
+	writes instead of casting of buffer.
+	* crypt/md5.h (struct md5_ctx): Move buffer into union and add
+	buffer32.
+	* crypt/md5.c (md5_finish_ctx): Use buffer32 for writes instead of
+	casting of buffer.
+
+2011-07-19  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* string/strxfrm_l.c (STRXFRM): Fix alloca accounting.
+
+2011-07-19  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* nscd/nscd.c (termination_handler): Don't do anything for a database
+	if it has not yet been initialized.
+
+2011-07-18  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/bits/sched.h (__CPU_EQUAL_S): Fix a typo.
+
+2011-07-15  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	* bits/sched.h (__CPU_EQUAL_S): Fix a typo.
+
+2011-07-18  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* po/nl.po: Update from translation team.
+	* po/sv.po: Likewise.
+
+2011-07-16  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* sysdeps/i386/Makefile: Never use -mpreferred-stack-boundary=2,
+	now disallowed by GCC.
+
+	* configure.in (use-default-link): Default to yes if a test -shared
+	link meets our qualifications.
+	* configure: Regenerated.
+
+	* config.make.in (output-format): New variable.
+	* configure.in: Check for ld --print-output-format support.
+	* configure: Regenerated.
+	* Makerules ($(common-objpfx)format.lds)
+	[$(output-format) != unknown]: Just use $(output-format),
+	instead of the linker-script munging.
+
+2011-07-14  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* Makefile ($(common-objpfx)linkobj/libc.so): Use $(shlib-lds) instead
+	of $(common-objpfx)shlib.lds.
+	* elf/Makefile ($(objpfx)sotruss-lib.so): Likewise.
+
+	* sysdeps/i386/i686/multiarch/strstr-c.c (libc_hidden_builtin_def):
+	Conditionalize redefinition on [SHARED && DO_VERSIONING && !NO_HIDDEN].
+
+	* configure.in (-z relro check): Adjust test code to add a large
+	writable data section after it.
+	* configure: Regenerated.
+
+2011-07-11  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* configure.in (-z relro check): Fix test code to make the variable
+	truly const.
+	* configure: Regenerated.
+
+2011-07-11  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* nscd/nscd.h (struct traced_file): Define.
+	(struct database_dyn): Remove inotify_descr, reset_res, and filename
+	elements.  Add traced_files.
+	(inotify_fd): Declare.
+	(register_traced_file): Declare.
+	* nscd/connections.c (dbs): Remove reset_res and filename initializers.
+	(inotify_fd): Export.
+	(resolv_conf_descr): Remove.
+	(nscd_init): Move inotify descriptor creation to main.
+	Don't register files for notification here.
+	(register_traced_file): New function.
+	(invalidate_cache): Don't use reset_res to determine whether to call
+	res_init, go through the list of registered files.
+	(main_loop_poll): The inotify descriptors are now stored in the
+	structures for the traced files.
+	(main_loop_epoll): Likewise
+	* nscd/nscd.c (main): Create inotify socket here.  Pass extra argument
+	to __nss_disable_nscd.
+	* nscd/cache.c (prune_cache): There is no single inotify descriptor
+	for a database anymore.  Check the records for all the registered
+	files instead.
+	* nss/Makefile (libnss_files-routines): Add files-init.
+	(libnss_db-routines): Add db-init.
+	* nss/Versions [libnss_files] (GLIBC_PRIVATE): Add _nss_files_init.
+	[libnss_db] (GLIBC_PRIVATE): Add _nss_db_init.
+	* nss/nss_db/db-init.c: New file.
+	* nss/nss_files/files-init.c: New file.
+	* nss/nsswitch.c (nss_load_library): New function.  Broken out of
+	__nss_lookup_function.
+	(__nss_lookup_function): Call nss_load_library.
+	(nss_load_all_libraries): New function.
+	(__nss_disable_nscd): Take parameter with callback function for files
+	to register.  Set is_nscd.  Load all the DSOs for the NSS modules
+	used for the cached services.
+	* nss/nsswitch.h (__nss_disable_nscd): Adjust prototype.
+	* sysdeps/unix/sysv/linux/Makefile [subdir=nscd]: Pass the various -D
+	options for features to all the files in nscd.
+
+	* nss/nsswitch.c (nss_parse_file): Add missing fclose.
+
+2011-07-10  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* csu/elf-init.c (__libc_csu_init): Comment typo.
+
+2011-07-09  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* po/pl.po: Update from translation team.
+	* po/ja.po: Likewise.
+	* po/ru.po: Likewise.
+	* po/ko.po: Likewise.
+	* po/fr.po: Likewise.
+
+2011-07-09  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* configure.in (.ctors/.dtors header and trailer check):
+	Use an empirical test on a built program.
+	* configure: Regenerated.
+
+	* configure.in (-z relro check): Use an empirical test on a built DSO.
+	Detect, but do not require, on ia64.
+	* configure: Regenerated.
+
+	* configure.in (READELF): Find it with AC_CHECK_TOOL.
+	Update tests that use readelf to use $READELF instead.
+	* configure: Regenerated.
+
+2011-07-08  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* malloc/hooks.c (memalign_check): Avoid using checked_request2size
+	if the result is not used.
+
+2011-07-05  Andreas Jaeger  <aj@xxxxxxx>
+
+	[BZ#9696]
+	* stdlib/tst-strtod.c: Add testcase.
+
+2011-07-07  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/pathconf.c (distinguish_extX): New function.
+	(__statfs_link_max): Use it to distinguish between ext2/3 and ext4.
+	The latter has a higher limit.  Take additional parameter to pass to
+	the new function.
+	(__pathconf): Pass file to __statfs_link_max.
+	* sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Pass fd to
+	__statfs_link_max.
+	* sysdeps/unix/sysv/linux/pathconf.h: Adjust prototype of
+	__statfs_link_max.
+
+	[BZ #12868]
+	* sysdeps/unix/sysv/linux/linux_fsinfo.h: Define Lustre constants.
+	* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
+	Handle Lustre.
+	* sysdeps/unix/sysv/linux/pathconf.c (__statfs_link_max): Likewise.
+	(__statfs_filesize_max): Likewise.
+	Patch mostly by Andreas Dilger <adilger@xxxxxxxxxxxxx>.
+
+2011-07-05  Andreas Jaeger  <aj@xxxxxxx>
+
+	* resolv/res_comp.c (dn_skipname): Remove unused variable.
+
+2011-07-06  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	* nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_setspent): Honour the
+	`status' variable.
+	* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_setetherent):
+	Likewise.
+
+2011-07-04  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* Makefile (strop-tests): Add strncat.
+	* string/test-strncat.c: New file.
+
+2011-06-30  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	* iconvdata/johab.c: Don't inline `johab_sym_hanja_to_ucs' function.
+
+2011-06-21  Andreas Jaeger  <aj@xxxxxxx>
+
+	* sysdeps/s390/s390-64/Makefile ($(inst_gconvdir)/gconv-modules):
+	Copy rule from iconvdata/Makefile.
+
+2011-07-06  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12922]
+	* posix/getopt.c (_getopt_internal_r): When "W;" is in short options
+	but no long options are defined, just return 'W'.
+
+2011-06-22  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	[BZ #9696]
+	* stdlib/strtod_l.c (round_and_return): Set ERANGE instead of EDOM.
+
+2011-07-06  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* inet/getnetgrent_r.c (internal_getnetgrent_r): Fix check for known
+	netgroups to read.
+	(innetgr): Likewise.
+
+2011-07-05  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* config.make.in (install_root): Default to $(DESTDIR).
+
+2011-07-05  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* nscd/nscd_getserv_r.c (nscd_getserv_r): Add cast to avoid warning.
+
+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.
+	* nscd/initgrcache.c (addinitgroupsX): Likewise.
+	* nscd/hstcache.c (cache_addhst): Likewise.
+	* nscd/grpcache.c (cache_addgr): Likewise.
+	* nscd/aicache.c (addhstaiX): Likewise
+	* nscd/servicescache.c (cache_addserv): Handle zero negtimeout.
+
+2011-07-01  Thorsten Kukuk  <kukuk@xxxxxxx>
+
+	* nscd/pwdcache.c (cache_addpw): Handle zero negtimeout.
+	* nscd/initgrcache.c (addinitgroupsX): Likewise.
+	* nscd/hstcache.c (cache_addhst): Likewise.
+	* nscd/grpcache.c (cache_addgr): Likewise.
+	* nscd/aicache.c (addhstaiX): Likewise
+
+2011-07-01  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* nis/nss_compat/compat-pwd.c (getpwent_next_nss_netgr): Query NIS
+	domain only when needed.
+
+2011-06-30  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Make sure RES_USE_INET6
+	is always restored.
+
+2011-06-29  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* nscd/grpcache.c (cache_addgr): Don't write notfound reply if we
+	are re-adding the entry.
+	* nscd/servicescache.c (cache_addserv): Likewise.
+
+2011-06-30  Aurelien Jarno  <aurelien@xxxxxxxxxxx>
+
+	* sysdeps/generic/dl-irel.h: fix protection against multiple
+	inclusions.
+	* sysdeps/generic/dl-irel.h (elf_ifunc_invoke): New.
+
+2011-06-28  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12935]
+	* malloc/memusage.sh: Fix quoting in message.
+	* debug/xtrace.sh: Likewise.
+
+	* configure.in: Remove support for --experimental-malloc option, make
+	it the default.
+	* config.make.in: Likewise.
+	* malloc/Makefile: Likewise.
+
+2011-06-27  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* iconvdata/gb18030.c (BODY for TO_LOOP): Fix encoding of non-BMP
+	two-byte characters.
+
+2011-06-27  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* configure.in (NO_CTORS_DTORS_SECTIONS): Give this check its own
+	AC_CACHE_CHECK invocation.
+	* configure: Regenerated.
+
+	* elf/soinit.c (__CTOR_LIST__, __DTOR_LIST__): Add used attribute.
+
+2011-06-27  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12350]
+	* nscd/aicache.c (addhstaiX):  Restore only RES_USE_INET6
+	bit from old_res_options.
+
+	* sysdeps/unix/sysv/linux/Makefile (CFLAGS-servicescache.c): Define.
+
+	* inet/getnetgrent_r.c (innetgr): Minimal cleanup, use correct return
+	value type for setfct.
+
+2011-06-23  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Use
+	__gettimeofday instead of gettimeofday.
+
+2011-06-26  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* elf/Makefile (all-built-dso): No need to check linkobj/libc.so.
+
+2011-06-24  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* sysdeps/i386/i686/multiarch/strcpy-sse2.S (RETURN): Fix a typo.
+
+	* sysdeps/i386/i686/multiarch/strcpy-ssse3.S: Correct unwind
+	info.
+
+2011-06-22  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
+	strcpy-ssse3 strncpy-ssse3 stpcpy-ssse3 stpncpy-ssse3
+	strcpy-sse2-unaligned strncpy-sse2-unaligned
+	stpcpy-sse2-unaligned stpncpy-sse2-unaligned.
+	* sysdeps/x86_64/multiarch/stpcpy-sse2-unaligned.S: New file.
+	* sysdeps/x86_64/multiarch/stpcpy-ssse3.S: New file.
+	* sysdeps/x86_64/multiarch/stpncpy-sse2-unaligned.S: New file.
+	* sysdeps/x86_64/multiarch/stpncpy-ssse3.S: New file.
+	* sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: New file.
+	* sysdeps/x86_64/multiarch/strcpy-ssse3.S: New file.
+	* sysdeps/x86_64/multiarch/strncpy-sse2-unaligned.S: New file.
+	* sysdeps/x86_64/multiarch/strncpy-ssse3.S: New file.
+	* sysdeps/x86_64/multiarch/strcpy.S: Remove strcpy with SSSE3.
+	(STRCPY): Support SSE2 and SSSE3 versions.
+
+2011-06-24  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12874]
+	* sysdeps/unix/sysv/linux/Makefile (CFLAGS-tst-writev.c): Define.
+	* sysdeps/wordsize-64/tst-writev.c: Work around problem with 2.6.38+
+	kernels which artificially limit size of requests.
+
+2011-06-22  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
+	strncpy-c strcpy-ssse3 strncpy-ssse3 stpcpy-ssse3 stpncpy-ssse3
+	strcpy-sse2 strncpy-sse2 stpcpy-sse2 stpncpy-sse2.
+	* sysdeps/i386/i686/multiarch/stpcpy-sse2.S: New file.
+	* sysdeps/i386/i686/multiarch/stpcpy-ssse3.S: New file.
+	* sysdeps/i386/i686/multiarch/stpncpy-sse2.S: New file.
+	* sysdeps/i386/i686/multiarch/stpncpy-ssse3.S: New file.
+	* sysdeps/i386/i686/multiarch/stpncpy.S : New file.
+	* sysdeps/i386/i686/multiarch/strcpy-sse2.S : New file.
+	* sysdeps/i386/i686/multiarch/strcpy-ssse3.S: New file.
+	* sysdeps/i386/i686/multiarch/strcpy.S: New file.
+	* sysdeps/i386/i686/multiarch/strncpy-c.c: New file.
+	* sysdeps/i386/i686/multiarch/strncpy-sse2.S: New file.
+	* sysdeps/i386/i686/multiarch/strncpy-ssse3.S: New file.
+	* sysdeps/i386/i686/multiarch/strncpy.S: New file.
+	* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
+	Enable unaligned load optimization for Intel Core i3, i5 and i7
+	processors.
+	* sysdeps/x86_64/multiarch/init-arch.h (bit_Fast_Unaligned_Load):
+	Define.
+	(index_Fast_Unaligned_Load): Define.
+	(HAS_FAST_UNALIGNED_LOAD): Define.
+
+2011-06-23  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	* nss/nss_db/db-open.c: Include <unistd.h> for read declaration.
+
+2011-06-22  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12907]
+	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Avoid calling __check_pf
+	until it is clear that the information is realy needed.
+	Patch mostly by David Hanisch <david.hanisch@xxxxxxx>.
+
+2011-06-22  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Fix last change.
+
+2011-06-22  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Use
+	/sys/devices/system/cpu/online if it is usable.
+
+	* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Rate limit
+	reading the information from the /proc filesystem to once a second.
+
+2011-06-21  Andreas Jaeger  <aj@xxxxxxx>
+
+	* sysdeps/unix/sysv/linux/bits/sigcontext.h: Fix definition of
+	NULL after inclusion of kernel headers.
+
+2011-06-21  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* nss/nss_db/db-XXX.c (nss_db_setENT): Only set entidx for successful
+	calls to internal_setent.
+
+	[BZ #12885]
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): When looking up only IPv6
+	addresses using gethostbyname4_r ignore IPv4 addresses.
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): After the last change the
+	branch using gethostbyname2 is only for AF_INET.  Optimize accordingly.
+
+	* inet/getnetgrent_r.c: Use DL_CALL_FCT in several places.
+
 2011-06-20  David S. Miller  <davem@xxxxxxxxxxxxx>
 
 	* sysdeps/sparc/sparc32/dl-plt.h: Protect against multiple

Modified: trunk/libc/Makefile
==============================================================================
--- trunk/libc/Makefile (original)
+++ trunk/libc/Makefile Fri Jul 22 06:43:39 2011
@@ -152,7 +152,7 @@
 				 $(elfobjdir)/sofini.os \
 				 $(elfobjdir)/interp.os \
 				 $(elfobjdir)/ld.so \
-				 $(common-objpfx)shlib.lds
+				 $(shlib-lds)
 	$(build-shlib)
 
 $(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a \
@@ -172,8 +172,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 $@
@@ -304,7 +306,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: trunk/libc/Makerules
==============================================================================
--- trunk/libc/Makerules (original)
+++ trunk/libc/Makerules Fri Jul 22 06:43:39 2011
@@ -502,6 +502,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
@@ -537,8 +542,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
@@ -580,11 +589,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
@@ -635,7 +644,24 @@
 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
+
 ifneq ($(versioning),yes)
 # When EGLIBC is built without symbol versioning, local copy of
 # unwind-dw2-fde-glibc.c is not compiled, so we need to link against
@@ -644,10 +670,10 @@
 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) $(libc_gcclibs)
 # eglibc: ifeq ($(versioning),yes)
 $(common-objpfx)libc.so: $(common-objpfx)libc.map
@@ -721,7 +747,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
@@ -1013,10 +1039,15 @@
 $(common-objpfx)format.lds: $(..)scripts/output-format.sed \
 			    $(common-objpfx)config.make \
 			    $(common-objpfx)config.h $(..)Makerules
+ifneq (unknown,$(output-format))
+	echo > $@.new 'OUTPUT_FORMAT($(output-format))'
+else
 	$(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
+endif
 	mv -f $@.new $@
 common-generated += format.lds
 

Modified: trunk/libc/NEWS
==============================================================================
--- trunk/libc/NEWS (original)
+++ trunk/libc/NEWS Fri Jul 22 06:43:39 2011
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-6-15
+GNU C Library NEWS -- history of user-visible changes.  2011-7-20
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -7,12 +7,25 @@
 
 Version 2.15
 
+* The following bugs are resolved with this release:
+
+  9696, 12868, 12852, 12874, 12885, 12907, 12922, 12935, 13007
+
 * New program pldd to list loaded object of a process
   Implemented by Ulrich Drepper.
 
 * Add nss_db support back to glibc.  No more dependency on Berkeley db
   and support for initgroups lookups.
   Implemented by Ulrich Drepper.
+
+* Optimized strcpy, strncpy, stpcpy, stpncpy for SSE2 and SSSE3 on x86-32.
+  Contributed by HJ Lu.
+
+* Improved strcpy, strncpy, stpcpy, stpncpy for SSE2 and SSSE3 on x86-64.
+  Contributed by HJ Lu.
+
+* Optimized strcat and strncat on x86-64.
+  Contributed by Liubov Dmitrieva.
 
 Version 2.14
 

Modified: trunk/libc/aclocal.m4
==============================================================================
--- trunk/libc/aclocal.m4 (original)
+++ trunk/libc/aclocal.m4 Fri Jul 22 06:43:39 2011
@@ -103,6 +103,8 @@
 AC_SUBST(NM)
 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: trunk/libc/bits/sched.h
==============================================================================
--- trunk/libc/bits/sched.h (original)
+++ trunk/libc/bits/sched.h Fri Jul 22 06:43:39 2011
@@ -1,6 +1,6 @@
 /* Definitions of constants and data structure for POSIX 1003.1b-1993
    scheduling interface.
-   Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009
+   Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -120,7 +120,7 @@
       size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
       size_t __i;							      \
       for (__i = 0; __i < __imax; ++__i)				      \
-	if (__bits[__i] != __bits[__i])					      \
+	if (__arr1[__i] != __arr2[__i])					      \
 	  break;							      \
       __i == __imax; }))
 # endif

Modified: trunk/libc/config.make.in
==============================================================================
--- trunk/libc/config.make.in (original)
+++ trunk/libc/config.make.in Fri Jul 22 06:43:39 2011
@@ -5,7 +5,7 @@
 release = @RELEASE@
 
 # Installation prefixes.
-install_root =
+install_root = $(DESTDIR)
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 datadir = @datadir@
@@ -69,6 +69,8 @@
 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@
+output-format = @libc_cv_output_format@
 
 static-libgcc = @libc_cv_gcc_static_libgcc@
 
@@ -84,8 +86,6 @@
 have-ksh = @libc_cv_have_ksh@
 
 sizeof-long-double = @sizeof_long_double@
-
-experimental-malloc = @experimental_malloc@
 
 nss-crypt = @libc_cv_nss_crypt@
 
@@ -118,6 +118,7 @@
 BISON = @BISON@
 AUTOCONF = @AUTOCONF@
 OBJDUMP = @OBJDUMP@
+OBJCOPY = @OBJCOPY@
 
 # Installation tools.
 INSTALL = @INSTALL@

Modified: trunk/libc/configure
==============================================================================
--- trunk/libc/configure (original)
+++ trunk/libc/configure Fri Jul 22 06:43:39 2011
@@ -683,6 +683,7 @@
 gnu89_inline
 libc_cv_ssp
 fno_unit_at_a_time
+libc_cv_output_format
 libc_cv_hashstyle
 libc_cv_fpie
 libc_cv_z_execstack
@@ -705,6 +706,7 @@
 CXX_SYSINCLUDES
 SYSINCLUDES
 AUTOCONF
+READELF
 SED
 MAKEINFO
 MSGFMT
@@ -713,6 +715,7 @@
 LD
 AS
 MIG
+OBJCOPY
 OBJDUMP
 NM
 AR
@@ -728,7 +731,6 @@
 add_on_subdirs
 add_ons
 libc_cv_nss_crypt
-experimental_malloc
 REPORT_BUGS_TEXI
 REPORT_BUGS_TO
 PKGVERSION
@@ -737,6 +739,7 @@
 bindnow
 oldest_abi
 enable_check_abi
+use_default_link
 with_cvs
 with_fp
 ac_ct_CXX
@@ -810,6 +813,7 @@
 with_xcoff
 with_cvs
 with_headers
+with_default_link
 enable_sanity_checks
 enable_check_abi
 enable_shared
@@ -831,7 +835,6 @@
 with_pkgversion
 with_bugurl
 enable_multi_arch
-enable_experimental_malloc
 enable_nss_crypt
 with_cpu
 '
@@ -1501,8 +1504,6 @@
   --enable-all-warnings   enable all useful warnings gcc can issue
   --enable-multi-arch     enable single DSO with optimizations for multiple
                           architectures
-  --enable-experimental-malloc
-                          enable experimental malloc features
   --enable-nss-crypt      enable libcrypt to use nss
 
 Optional Packages:
@@ -1519,6 +1520,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
   --with-tls              enable support for TLS
   --without-__thread      do not use TLS features even when supporting them
   --with-pkgversion=PKG   Use PKG in the version string in place of "EGLIBC"
@@ -3624,6 +3626,16 @@
 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=default
+fi
+
+
 # Check whether --enable-sanity-checks was given.
 if test "${enable_sanity_checks+set}" = set; then
   enableval=$enable_sanity_checks; enable_sanity=$enableval
@@ -3869,13 +3881,6 @@
 else
   multi_arch=default
 fi
-
-
-# Check whether --enable-experimental-malloc was given.
-if test "${enable_experimental_malloc+set}" = set; then
-  enableval=$enable_experimental_malloc; experimental_malloc=$enableval
-fi
-
 
 
 # Check whether --enable-nss-crypt was given.
@@ -4920,6 +4925,8 @@
 
 OBJDUMP=`$CC -print-prog-name=objdump`
 
+OBJCOPY=`$CC -print-prog-name=objcopy`
+
 
 # Determine whether we are using GNU binutils.
 { $as_echo "$as_me:$LINENO: checking whether $AS is GNU as" >&5
@@ -5457,6 +5464,99 @@
 fi
 if test $ac_verc_fail = yes; then
   SED=: aux_missing="$aux_missing sed"
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_READELF+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$READELF"; then
+  ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+  { $as_echo "$as_me:$LINENO: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+  ac_ct_READELF=$READELF
+  # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_READELF+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_READELF"; then
+  ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_READELF="readelf"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_READELF" = x; then
+    READELF="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    READELF=$ac_ct_READELF
+  fi
+else
+  READELF="$ac_cv_prog_READELF"
 fi
 
 
@@ -6396,7 +6496,7 @@
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }
   then
-    if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
+    if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then
       libc_cv_initfini_array=yes
     else
       libc_cv_initfini_array=no
@@ -6412,12 +6512,89 @@
     { { $as_echo "$as_me:$LINENO: error: Need linker with .init_array/.fini_array support." >&5
 $as_echo "$as_me: error: Need linker with .init_array/.fini_array support." >&2;}
    { (exit 1); exit 1; }; }
-  elif { ac_try='${CC-cc} -Wl,--verbose 2>&1|grep SORT_BY_INIT_PRIORITY 1>&5'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  fi
+
+  { $as_echo "$as_me:$LINENO: checking whether to use .ctors/.dtors header and trailer" >&5
+$as_echo_n "checking whether to use .ctors/.dtors header and trailer... " >&6; }
+if test "${libc_cv_ctors_header+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+      libc_cv_ctors_header=yes
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+__attribute__ ((constructor)) void ctor (void) { puts("ctor"); }
+__attribute__ ((destructor))  void dtor (void) { puts("dtor"); }
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+        if $READELF -WS conftest$ac_exeext | $AWK '
+        { gsub(/\[ */, "[") }
+	$2 == ".ctors" || $2 == ".dtors" {
+	  size = strtonum("0x" $6)
+	  align = strtonum("0x" $NF)
+	  seen[$2] = 1
+	  stub[$2] = size == align * 2
+        }
+	END {
+	  ctors_ok = !seen[".ctors"] || stub[".ctors"]
+	  dtors_ok = !seen[".dtors"] || stub[".dtors"]
+	  exit ((ctors_ok && dtors_ok) ? 0 : 1)
+	}
+      '; then
+  libc_cv_ctors_header=no
+fi
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	      { { $as_echo "$as_me:$LINENO: error: missing __attribute__ ((constructor)) support??" >&5
+$as_echo "$as_me: error: missing __attribute__ ((constructor)) support??" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_ctors_header" >&5
+$as_echo "$libc_cv_ctors_header" >&6; }
+  if test $libc_cv_ctors_header = no; then
     cat >>confdefs.h <<\_ACEOF
 #define NO_CTORS_DTORS_SECTIONS 1
 _ACEOF
@@ -6538,42 +6715,110 @@
 { $as_echo "$as_me:$LINENO: result: $libc_cv_z_initfirst" >&5
 $as_echo "$libc_cv_z_initfirst" >&6; }
 
+  # Add-on fragments can set these for other machines.
+  libc_commonpagesize=${libc_commonpagesize:-no}
+  libc_relro_required=${libc_relro_required:-no}
   case "$base_machine" in
-    i[34567]86 | x86_64 | powerpc* | s390* | sparc* | alpha*)
-      { $as_echo "$as_me:$LINENO: checking for -z relro option" >&5
+    i[34567]86 | x86_64 | powerpc* | s390*)
+      libc_commonpagesize=0x1000
+      libc_relro_required=yes
+      ;;
+    sparc*)
+      libc_commonpagesize=0x2000
+      libc_relro_required=yes
+      ;;
+    ia64*)
+      libc_commonpagesize=0x4000
+      ;;
+    alpha*)
+      libc_commonpagesize=0x10000
+      libc_relro_required=yes
+      ;;
+  esac
+
+  if test $libc_commonpagesize != no; then
+    { $as_echo "$as_me:$LINENO: checking for -z relro option" >&5
 $as_echo_n "checking for -z relro option... " >&6; }
 if test "${libc_cv_z_relro+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-    libc_cv_z_relro=no
-  if { ac_try='${CC-cc} -v --help 2>&1|grep "z relro" 1>&5'
+      libc_cv_z_relro=no
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int _start (void) { return 42; }
+extern void _exit (int);
+/* Since these pointers are const, they should go in rodata.
+   Since they refer to functions that have to be resolved by
+   dynamic linking, they should instead go in RELRO data.  */
+const void *const relro[] = { &_start, &_exit, 0 };
+/* GNU ld fails to produce RELRO data when it's very small and there is no
+   normal writable data following it, or if only uninitialized (.bss) data
+   follows it, or only very small writable data.  */
+int data[0x10000] = { 1, };
+
+_ACEOF
+    cat > conftest.awk <<\EOF
+BEGIN {
+  result = "no"
+  commonpagesize = strtonum(commonpagesize)
+}
+{ print "LINE:", $0 > "/dev/stderr" }
+$1 == "GNU_RELRO" {
+  vaddr = strtonum($3)
+  memsz = strtonum($6)
+  end = vaddr + memsz
+  printf "vaddr %#x memsz %#x end %#x commonpagesize %#x\n", \
+    vaddr, memsz, end, commonpagesize > "/dev/stderr"
+  result = (end % commonpagesize == 0) ? "yes" : "broken"
+}
+END { print result }
+EOF
+    { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+		    -fPIC -shared -o conftest.so conftest.c
+		    -nostartfiles -nostdlib
+		    -Wl,-z,relro 1>&5'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }
-  then
-    if { ac_try='${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&5'
+  (exit $ac_status); }; } &&
+    { ac_try='$READELF -Wl conftest.so > conftest.ph'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }
-    then
-      libc_cv_z_relro=yes
-    fi
-  fi
+  (exit $ac_status); }; } &&
+    { ac_try='
+      $AWK -v commonpagesize=$libc_commonpagesize -f conftest.awk
+	   conftest.ph > conftest.cps
+    '
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+    libc_cv_z_relro=`cat conftest.cps 2>&5`
+    rm -f conftest*
 fi
 { $as_echo "$as_me:$LINENO: result: $libc_cv_z_relro" >&5
 $as_echo "$libc_cv_z_relro" >&6; }
-      if test "$libc_cv_z_relro" = no; then
-	{ { $as_echo "$as_me:$LINENO: error: linker with -z relro support required" >&5
+    if { test "x$libc_relro_required" = xyes &&
+	 test "x$libc_cv_z_relro" != xyes
+       }
+    then
+      { { $as_echo "$as_me:$LINENO: error: linker with -z relro support required" >&5
 $as_echo "$as_me: error: linker with -z relro support required" >&2;}
    { (exit 1); exit 1; }; }
-      fi
-      ;;
-    *) ;;
-   esac
+    fi
+  else
+    { $as_echo "$as_me:$LINENO: WARNING: missing architecture parameter to check for working -z relro" >&5
+$as_echo "$as_me: WARNING: missing architecture parameter to check for working -z relro" >&2;}
+  fi
 
   { $as_echo "$as_me:$LINENO: checking for -Bgroup option" >&5
 $as_echo_n "checking for -Bgroup option... " >&6; }
@@ -6706,7 +6951,7 @@
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }
   then
-    if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
+    if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
       libc_cv_z_combreloc=yes
     else
       libc_cv_z_combreloc=no
@@ -6783,7 +7028,88 @@
 { $as_echo "$as_me:$LINENO: result: $libc_cv_hashstyle" >&5
 $as_echo "$libc_cv_hashstyle" >&6; }
 
-fi
+
+  # The linker's default -shared behavior is good enough if it
+  # does these things that our custom linker scripts ensure that
+  # all allocated NOTE sections come first.
+  if test "$use_default_link" = default; then
+    { $as_echo "$as_me:$LINENO: checking for sufficient default -shared layout" >&5
+$as_echo_n "checking for sufficient default -shared layout... " >&6; }
+if test "${libc_cv_use_default_link+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+      libc_cv_use_default_link=no
+    cat > conftest.s <<\EOF
+	  .section .note.a,"a",%note
+	  .balign 4
+	  .long 4,4,9
+	  .string "GNU"
+	  .string "foo"
+	  .section .note.b,"a",%note
+	  .balign 4
+	  .long 4,4,9
+	  .string "GNU"
+	  .string "bar"
+EOF
+    if { ac_try='  ${CC-cc} $ASFLAGS -shared -o conftest.so conftest.s 1>&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+       ac_try=`$READELF -S conftest.so | sed -n \
+	 '${x;p;}
+	  s/^ *\[ *[1-9][0-9]*\]  *\([^ ][^ ]*\)  *\([^ ][^ ]*\) .*$/\2 \1/
+	  t a
+	  b
+	  : a
+	  H'`
+    then
+      libc_seen_a=no libc_seen_b=no
+      set -- $ac_try
+      while test $# -ge 2 -a "$1" = NOTE; do
+	case "$2" in
+	.note.a) libc_seen_a=yes ;;
+	.note.b) libc_seen_b=yes ;;
+	esac
+	shift 2
+      done
+      case "$libc_seen_a$libc_seen_b" in
+      yesyes)
+	libc_cv_use_default_link=yes
+	;;
+      *)
+	echo >&5 "\
+$libc_seen_a$libc_seen_b from:
+$ac_try"
+	;;
+      esac
+    fi
+    rm -f conftest*
+fi
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_use_default_link" >&5
+$as_echo "$libc_cv_use_default_link" >&6; }
+    use_default_link=$libc_cv_use_default_link
+  fi
+fi
+
+{ $as_echo "$as_me:$LINENO: checking linker output format" >&5
+$as_echo_n "checking linker output format... " >&6; }
+if test "${libc_cv_output_format+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if libc_cv_output_format=`
+${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&5`
+then
+  :
+else
+  libc_cv_output_format=
+fi
+test -n "$libc_cv_output_format" || libc_cv_output_format=unknown
+fi
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_output_format" >&5
+$as_echo "$libc_cv_output_format" >&6; }
+
 
 { $as_echo "$as_me:$LINENO: checking for -fno-toplevel-reorder -fno-section-anchors" >&5
 $as_echo_n "checking for -fno-toplevel-reorder -fno-section-anchors... " >&6; }

Modified: trunk/libc/configure.in
==============================================================================
--- trunk/libc/configure.in (original)
+++ trunk/libc/configure.in Fri Jul 22 06:43:39 2011
@@ -114,6 +114,13 @@
 	    [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]),
+	    [use_default_link=$withval],
+	    [use_default_link=default])
+
 AC_ARG_ENABLE([sanity-checks],
 	      AC_HELP_STRING([--disable-sanity-checks],
 			     [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]),
@@ -278,13 +285,6 @@
 			     [enable single DSO with optimizations for multiple architectures]),
 	      [multi_arch=$enableval],
 	      [multi_arch=default])
-
-AC_ARG_ENABLE([experimental-malloc],
-	      AC_HELP_STRING([--enable-experimental-malloc],
-			     [enable experimental malloc features]),
-	      [experimental_malloc=$enableval],
-	      [])
-AC_SUBST(experimental_malloc)
 
 AC_ARG_ENABLE([nss-crypt],
 	      AC_HELP_STRING([--enable-nss-crypt],
@@ -1078,6 +1078,8 @@
   [3.0[2-9]*|3.[1-9]*|[4-9]*],
   SED=: aux_missing="$aux_missing sed")
 
+AC_CHECK_TOOL(READELF, readelf, false)
+
 AC_CHECK_PROGS(AUTOCONF, autoconf, no)
 case "x$AUTOCONF" in
 xno|x|x:) AUTOCONF=no ;;
@@ -1506,7 +1508,7 @@
   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
 		     -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
   then
-    if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
+    if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then
       libc_cv_initfini_array=yes
     else
       libc_cv_initfini_array=no
@@ -1517,7 +1519,35 @@
   rm -f conftest*])
   if test $libc_cv_initfini_array != yes; then
     AC_MSG_ERROR([Need linker with .init_array/.fini_array support.])
-  elif AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep SORT_BY_INIT_PRIORITY 1>&AS_MESSAGE_LOG_FD]); then
+  fi
+
+  AC_CACHE_CHECK(whether to use .ctors/.dtors header and trailer,
+		 libc_cv_ctors_header, [dnl
+    libc_cv_ctors_header=yes
+    AC_TRY_LINK([], [
+__attribute__ ((constructor)) void ctor (void) { puts("ctor"); }
+__attribute__ ((destructor))  void dtor (void) { puts("dtor"); }
+],
+		[dnl
+      AS_IF([$READELF -WS conftest$ac_exeext | $AWK '
+        { gsub(/\@<:@ */, "@<:@") }
+	$2 == ".ctors" || $2 == ".dtors" {
+	  size = strtonum("0x" $6)
+	  align = strtonum("0x" $NF)
+	  seen@<:@$2@:>@ = 1
+	  stub@<:@$2@:>@ = size == align * 2
+        }
+	END {
+	  ctors_ok = !seen@<:@".ctors"@:>@ || stub@<:@".ctors"@:>@
+	  dtors_ok = !seen@<:@".dtors"@:>@ || stub@<:@".dtors"@:>@
+	  exit ((ctors_ok && dtors_ok) ? 0 : 1)
+	}
+      '], [libc_cv_ctors_header=no])
+    ], [dnl
+      AC_MSG_ERROR([missing __attribute__ ((constructor)) support??])
+    ])
+  ])
+  if test $libc_cv_ctors_header = no; then
     AC_DEFINE(NO_CTORS_DTORS_SECTIONS)
   fi
 
@@ -1586,26 +1616,79 @@
   fi
   rm -f conftest*])
 
+  # Add-on fragments can set these for other machines.
+  libc_commonpagesize=${libc_commonpagesize:-no}
+  libc_relro_required=${libc_relro_required:-no}
   case "$base_machine" in
-changequote(,)dnl
-    i[34567]86 | x86_64 | powerpc* | s390* | sparc* | alpha*)
-changequote([,])dnl
-      AC_CACHE_CHECK(for -z relro option,
-		     libc_cv_z_relro, [dnl
-  libc_cv_z_relro=no
-  if AC_TRY_COMMAND([${CC-cc} -v --help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD])
-  then
-    if AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&AS_MESSAGE_LOG_FD])
+    i[[34567]]86 | x86_64 | powerpc* | s390*)
+      libc_commonpagesize=0x1000
+      libc_relro_required=yes
+      ;;
+    sparc*)
+      libc_commonpagesize=0x2000
+      libc_relro_required=yes
+      ;;
+    ia64*)
+      libc_commonpagesize=0x4000
+      ;;
+    alpha*)
+      libc_commonpagesize=0x10000
+      libc_relro_required=yes
+      ;;
+  esac
+
+  if test $libc_commonpagesize != no; then
+    AC_CACHE_CHECK(for -z relro option,
+		   libc_cv_z_relro, [dnl
+    libc_cv_z_relro=no
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+int _start (void) { return 42; }
+extern void _exit (int);
+/* Since these pointers are const, they should go in rodata.
+   Since they refer to functions that have to be resolved by
+   dynamic linking, they should instead go in RELRO data.  */
+const void *const relro[] = { &_start, &_exit, 0 };
+/* GNU ld fails to produce RELRO data when it's very small and there is no
+   normal writable data following it, or if only uninitialized (.bss) data
+   follows it, or only very small writable data.  */
+int data[0x10000] = { 1, };
+]])])
+    cat > conftest.awk <<\EOF
+BEGIN {
+  result = "no"
+  commonpagesize = strtonum(commonpagesize)
+}
+{ print "LINE:", $0 > "/dev/stderr" }
+$1 == "GNU_RELRO" {
+  vaddr = strtonum($3)
+  memsz = strtonum($6)
+  end = vaddr + memsz
+  printf "vaddr %#x memsz %#x end %#x commonpagesize %#x\n", \
+    vaddr, memsz, end, commonpagesize > "/dev/stderr"
+  result = (end % commonpagesize == 0) ? "yes" : "broken"
+}
+END { print result }
+EOF
+    AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+		    -fPIC -shared -o conftest.so conftest.c
+		    -nostartfiles -nostdlib
+		    -Wl,-z,relro 1>&AS_MESSAGE_LOG_FD]) &&
+    AC_TRY_COMMAND([$READELF -Wl conftest.so > conftest.ph]) &&
+    AC_TRY_COMMAND([
+      $AWK -v commonpagesize=$libc_commonpagesize -f conftest.awk
+	   conftest.ph > conftest.cps
+    ]) &&
+    libc_cv_z_relro=`cat conftest.cps 2>&AS_MESSAGE_LOG_FD`
+    rm -f conftest*])
+    if { test "x$libc_relro_required" = xyes &&
+	 test "x$libc_cv_z_relro" != xyes
+       }
     then
-      libc_cv_z_relro=yes
+      AC_MSG_ERROR(linker with -z relro support required)
     fi
-  fi])
-      if test "$libc_cv_z_relro" = no; then
-	AC_MSG_ERROR(linker with -z relro support required)
-      fi
-      ;;
-    *) ;;
-   esac
+  else
+    AC_MSG_WARN([missing architecture parameter to check for working -z relro])
+  fi
 
   AC_CACHE_CHECK(for -Bgroup option,
 		 libc_cv_Bgroup, [dnl
@@ -1693,7 +1776,7 @@
 dnl introducing new options this is not easily doable.  Instead use a tool
 dnl which always is cross-platform: readelf.  To detect whether -z combreloc
 dnl look for a section named .rel.dyn.
-    if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
+    if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
       libc_cv_z_combreloc=yes
     else
       libc_cv_z_combreloc=no
@@ -1746,7 +1829,71 @@
   fi
   rm -f conftest*])
   AC_SUBST(libc_cv_hashstyle)
-fi
+
+  # The linker's default -shared behavior is good enough if it
+  # does these things that our custom linker scripts ensure that
+  # all allocated NOTE sections come first.
+  if test "$use_default_link" = default; then
+    AC_CACHE_CHECK([for sufficient default -shared layout],
+		   libc_cv_use_default_link, [dnl
+    libc_cv_use_default_link=no
+    cat > conftest.s <<\EOF
+	  .section .note.a,"a",%note
+	  .balign 4
+	  .long 4,4,9
+	  .string "GNU"
+	  .string "foo"
+	  .section .note.b,"a",%note
+	  .balign 4
+	  .long 4,4,9
+	  .string "GNU"
+	  .string "bar"
+EOF
+    if AC_TRY_COMMAND([dnl
+  ${CC-cc} $ASFLAGS -shared -o conftest.so conftest.s 1>&AS_MESSAGE_LOG_FD]) &&
+       ac_try=`$READELF -S conftest.so | sed -n \
+	 ['${x;p;}
+	  s/^ *\[ *[1-9][0-9]*\]  *\([^ ][^ ]*\)  *\([^ ][^ ]*\) .*$/\2 \1/
+	  t a
+	  b
+	  : a
+	  H']`
+    then
+      libc_seen_a=no libc_seen_b=no
+      set -- $ac_try
+      while test $# -ge 2 -a "$1" = NOTE; do
+	case "$2" in
+	.note.a) libc_seen_a=yes ;;
+	.note.b) libc_seen_b=yes ;;
+	esac
+	shift 2
+      done
+      case "$libc_seen_a$libc_seen_b" in
+      yesyes)
+	libc_cv_use_default_link=yes
+	;;
+      *)
+	echo >&AS_MESSAGE_LOG_FD "\
+$libc_seen_a$libc_seen_b from:
+$ac_try"
+	;;
+      esac
+    fi
+    rm -f conftest*])
+    use_default_link=$libc_cv_use_default_link
+  fi
+fi
+
+AC_CACHE_CHECK(linker output format, libc_cv_output_format, [dnl
+if libc_cv_output_format=`
+${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&AS_MESSAGE_LOG_FD`
+then
+  :
+else
+  libc_cv_output_format=
+fi
+test -n "$libc_cv_output_format" || libc_cv_output_format=unknown])
+AC_SUBST(libc_cv_output_format)
 
 AC_CACHE_CHECK(for -fno-toplevel-reorder -fno-section-anchors, libc_cv_fno_toplevel_reorder, [dnl
 cat > conftest.c <<EOF

Modified: trunk/libc/crypt/md5.c
==============================================================================
--- trunk/libc/crypt/md5.c (original)
+++ trunk/libc/crypt/md5.c Fri Jul 22 06:43:39 2011
@@ -1,6 +1,6 @@
 /* Functions to compute MD5 message digest of files or memory blocks.
    according to the definition of MD5 in RFC 1321 from April 1992.
-   Copyright (C) 1995,1996,1997,1999,2000,2001,2005
+   Copyright (C) 1995,1996,1997,1999,2000,2001,2005,2011
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -123,9 +123,9 @@
   memcpy (&ctx->buffer[bytes], fillbuf, pad);
 
   /* Put the 64-bit file length in *bits* at the end of the buffer.  */
-  *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
-  *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
-							(ctx->total[0] >> 29));
+  ctx->buffer32[(bytes + pad) / 4] = SWAP (ctx->total[0] << 3);
+  ctx->buffer32[(bytes + pad + 4) / 4] = SWAP ((ctx->total[1] << 3) |
+					       (ctx->total[0] >> 29));
 
   /* Process last bytes.  */
   md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
@@ -168,7 +168,7 @@
 	}
       while (sum < BLOCKSIZE && n != 0);
       if (n == 0 && ferror (stream))
-        return 1;
+	return 1;
 
       /* If end of file is reached, end the loop.  */
       if (n == 0)
@@ -340,12 +340,12 @@
 
 #define OP(a, b, c, d, s, T)						\
       do								\
-        {								\
+	{								\
 	  a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T;		\
 	  ++words;							\
 	  CYCLIC (a, s);						\
 	  a += b;							\
-        }								\
+	}								\
       while (0)
 
       /* It is unfortunate that C does not provide an operator for

Modified: trunk/libc/crypt/md5.h
==============================================================================
--- trunk/libc/crypt/md5.h (original)
+++ trunk/libc/crypt/md5.h Fri Jul 22 06:43:39 2011
@@ -1,6 +1,6 @@
 /* Declaration of functions and data types used for MD5 sum computing
    library functions.
-   Copyright (C) 1995-1997,1999,2000,2001,2004,2005
+   Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2011
       Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -68,7 +68,7 @@
      typedef unsigned long md5_uint32;
 #   else
      /* The following line is intended to evoke an error.
-        Using #error is not portable enough.  */
+	Using #error is not portable enough.  */
      "Cannot determine unsigned 32-bit data type."
 #   endif
 #  endif
@@ -88,7 +88,11 @@
 
   md5_uint32 total[2];
   md5_uint32 buflen;
-  char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32))));
+  union
+  {
+    char buffer[128];
+    md5_uint32 buffer32[32];
+  };
 };
 
 /*

Modified: trunk/libc/crypt/sha256.c
==============================================================================
--- trunk/libc/crypt/sha256.c (original)
+++ trunk/libc/crypt/sha256.c Fri Jul 22 06:43:39 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,19 @@
   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
+  ctx->buffer64[(bytes + pad) / 8] = SWAP64 (ctx->total64 << 3);
+#else
+  ctx->buffer32[(bytes + pad + 4) / 4] = SWAP (ctx->total[TOTAL64_low] << 3);
+  ctx->buffer32[(bytes + pad) / 4] = 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: trunk/libc/crypt/sha256.h
==============================================================================
--- trunk/libc/crypt/sha256.h (original)
+++ trunk/libc/crypt/sha256.h Fri Jul 22 06:43:39 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,9 +32,20 @@
 {
   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))));
+  union
+  {
+    char buffer[128];
+    uint32_t buffer32[32];
+    uint64_t buffer64[16];
+  };
 };
 
 /* Initialize structure containing state of computation.

Modified: trunk/libc/crypt/sha512.c
==============================================================================
--- trunk/libc/crypt/sha512.c (original)
+++ trunk/libc/crypt/sha512.c Fri Jul 22 06:43:39 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,21 @@
   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));
+  ctx->buffer64[(bytes + pad + 8) / 8] = SWAP (ctx->total[TOTAL128_low] << 3);
+  ctx->buffer64[(bytes + pad) / 8] = SWAP ((ctx->total[TOTAL128_high] << 3) |
+					   (ctx->total[TOTAL128_low] >> 61));
 
   /* Process last bytes.  */
   sha512_process_block (ctx->buffer, bytes + pad + 16, ctx);

Modified: trunk/libc/crypt/sha512.h
==============================================================================
--- trunk/libc/crypt/sha512.h (original)
+++ trunk/libc/crypt/sha512.h Fri Jul 22 06:43:39 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,9 +33,22 @@
 {
   uint64_t H[8];
 
-  uint64_t total[2];
+  union
+  {
+#if defined __GNUC__ && __WORDSIZE == 64
+# define USE_TOTAL128
+    unsigned int total128 __attribute__ ((__mode__ (TI)));
+#endif
+#define TOTAL128_low (1 - (BYTE_ORDER == LITTLE_ENDIAN))
+#define TOTAL128_high (BYTE_ORDER == LITTLE_ENDIAN)
+    uint64_t total[2];
+  };
   uint64_t buflen;
-  char buffer[256] __attribute__ ((__aligned__ (__alignof__ (uint64_t))));
+  union
+  {
+    char buffer[256];
+    uint64_t buffer64[32];
+  };
 };
 
 /* Initialize structure containing state of computation.

Modified: trunk/libc/csu/elf-init.c
==============================================================================
--- trunk/libc/csu/elf-init.c (original)
+++ trunk/libc/csu/elf-init.c Fri Jul 22 06:43:39 2011
@@ -1,5 +1,6 @@
 /* Startup support for ELF initializers/finalizers in the main executable.
-   Copyright (C) 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2002,2003,2004,2005,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
@@ -105,7 +106,7 @@
 __libc_csu_init (int argc, char **argv, char **envp)
 {
   /* For dynamically linked executables the preinit array is executed by
-     the dynamic linker (before initializing any shared object.  */
+     the dynamic linker (before initializing any shared object).  */
 
 #ifndef LIBC_NONSHARED
   /* For static executables, preinit happens right before init.  */

Modified: trunk/libc/debug/xtrace.sh
==============================================================================
--- trunk/libc/debug/xtrace.sh (original)
+++ trunk/libc/debug/xtrace.sh Fri Jul 22 06:43:39 2011
@@ -30,7 +30,7 @@
 
 # Refer to --help option.
 help_info() {
-  printf >&2 $"Try \`%s --help' or `%s --usage' for more information.\n" xtrace xtrace
+  printf >&2 $"Try \`%s --help' or \`%s --usage' for more information.\n" xtrace xtrace
   exit 1
 }
 

Modified: trunk/libc/elf/Makefile
==============================================================================
--- trunk/libc/elf/Makefile (original)
+++ trunk/libc/elf/Makefile Fri Jul 22 06:43:39 2011
@@ -178,7 +178,7 @@
 install-bin-script += sotruss
 generated += sotruss
 CPPFLAGS-sotruss-lib = -DNOT_IN_libc
-$(objpfx)sotruss-lib.so: $(objpfx)sotruss-lib.os $(common-objpfx)shlib.lds
+$(objpfx)sotruss-lib.so: $(objpfx)sotruss-lib.os
 	$(build-module-asneeded)
 $(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \
 	$(common-objpfx)libc_nonshared.a
@@ -359,6 +359,8 @@
 # Command to link into a larger single relocatable object.
 reloc-link = $(LINK.o) -nostdlib -nostartfiles -r
 
+$(objpfx)sotruss-lib.so: $(shlib-lds)
+
 $(objpfx)dl-allobjs.os: $(all-rtld-routines:%=$(objpfx)%.os)
 	$(reloc-link) -o $@ $^
 
@@ -410,19 +412,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 }'
 
@@ -983,8 +977,9 @@
 tests: $(objpfx)check-textrel.out $(objpfx)check-execstack.out
 
 all-built-dso = $(common-objpfx)libc.so \
-		$(sort $(wildcard $(common-objpfx)*/lib*.so \
-				  $(common-objpfx)iconvdata/*.so))
+		$(filter-out $(common-objpfx)linkobj/libc.so, \
+			     $(sort $(wildcard $(common-objpfx)*/lib*.so \
+					       $(common-objpfx)iconvdata/*.so)))
 
 $(objpfx)check-textrel.out: $(objpfx)check-textrel $(all-built-dso)
 	$(dir $<)$(notdir $<) $(filter-out $<, $^) > $@

Modified: trunk/libc/elf/cache.c
==============================================================================
--- trunk/libc/elf/cache.c (original)
+++ trunk/libc/elf/cache.c Fri Jul 22 06:43:39 2011
@@ -675,7 +675,6 @@
   if (aux_cache == MAP_FAILED
       || aux_cache_size < sizeof (struct aux_cache_file)
       || memcmp (aux_cache->magic, AUX_CACHEMAGIC, sizeof AUX_CACHEMAGIC - 1)
-      || aux_cache->nlibs < 0
       || aux_cache->nlibs >= aux_cache_size)
     {
       close (fd);

Modified: trunk/libc/elf/dl-close.c
==============================================================================
--- trunk/libc/elf/dl-close.c (original)
+++ trunk/libc/elf/dl-close.c Fri Jul 22 06:43:39 2011
@@ -231,7 +231,7 @@
     }
 
   /* Sort the entries.  */
-  _dl_sort_fini (ns->_ns_loaded, maps, nloaded, used, nsid);
+  _dl_sort_fini (maps, nloaded, used, nsid);
 
   /* Call all termination functions at once.  */
 #ifdef SHARED

Modified: trunk/libc/elf/dl-fini.c
==============================================================================
--- trunk/libc/elf/dl-fini.c (original)
+++ trunk/libc/elf/dl-fini.c Fri Jul 22 06:43:39 2011
@@ -30,8 +30,7 @@
 
 void
 internal_function
-_dl_sort_fini (struct link_map *l, struct link_map **maps, size_t nmaps,
-	       char *used, Lmid_t ns)
+_dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
 {
   /* A list of one element need not be sorted.  */
   if (nmaps == 1)
@@ -199,7 +198,7 @@
       nmaps = i;
 
       /* Now we have to do the sorting.  */
-      _dl_sort_fini (GL(dl_ns)[ns]._ns_loaded, maps, nmaps, NULL, ns);
+      _dl_sort_fini (maps, nmaps, NULL, ns);
 
       /* We do not rely on the linked list of loaded object anymore from
 	 this point on.  We have our own list here (maps).  The various

Modified: trunk/libc/elf/dynamic-link.h
==============================================================================
--- trunk/libc/elf/dynamic-link.h (original)
+++ trunk/libc/elf/dynamic-link.h Fri Jul 22 06:43:39 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: trunk/libc/elf/soinit.c
==============================================================================
--- trunk/libc/elf/soinit.c (original)
+++ trunk/libc/elf/soinit.c Fri Jul 22 06:43:39 2011
@@ -8,11 +8,11 @@
 # include <stdlib.h>
 
 static void (*const __CTOR_LIST__[1]) (void)
-     __attribute__ ((section (".ctors")))
-     = { (void (*) (void)) -1 };
+  __attribute__ ((used, section (".ctors")))
+  = { (void (*) (void)) -1 };
 static void (*const __DTOR_LIST__[1]) (void)
-     __attribute__ ((section (".dtors")))
-     = { (void (*) (void)) -1 };
+  __attribute__ ((used, section (".dtors")))
+  = { (void (*) (void)) -1 };
 
 static inline void
 run_hooks (void (*const list[]) (void))

Modified: trunk/libc/elf/tst-audit4.c
==============================================================================
--- trunk/libc/elf/tst-audit4.c (original)
+++ trunk/libc/elf/tst-audit4.c Fri Jul 22 06:43:39 2011
@@ -6,16 +6,30 @@
 #include <cpuid.h>
 #include <immintrin.h>
 
+
+static int
+avx_enabled (void)
+{
+  unsigned int eax, ebx, ecx, edx;
+
+  if (__get_cpuid (1, &eax, &ebx, &ecx, &edx) == 0
+      || (ecx & (bit_AVX | bit_OSXSAVE)) != (bit_AVX | bit_OSXSAVE))
+    return 0;
+
+  /* Check the OS has AVX and SSE saving enabled.  */
+  asm ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0));
+
+  return (eax & 6) == 6;
+}
+
+
 extern __m256i audit_test (__m256i, __m256i, __m256i, __m256i,
 			   __m256i, __m256i, __m256i, __m256i);
 int
 main (void)
 {
-  unsigned int eax, ebx, ecx, edx;
-
   /* Run AVX test only if AVX is supported.  */
-  if (__get_cpuid (1, &eax, &ebx, &ecx, &edx)
-      && (ecx & bit_AVX))
+  if (avx_enabled ())
     {
       __m256i ymm = _mm256_setzero_si256 ();
       __m256i ret = audit_test (ymm, ymm, ymm, ymm, ymm, ymm, ymm, ymm);

Modified: trunk/libc/elf/tst-audit6.c
==============================================================================
--- trunk/libc/elf/tst-audit6.c (original)
+++ trunk/libc/elf/tst-audit6.c Fri Jul 22 06:43:39 2011
@@ -8,14 +8,28 @@
 extern __m128i audit_test (__m128i, __m128i, __m128i, __m128i,
 			   __m128i, __m128i, __m128i, __m128i);
 
+
+static int
+avx_enabled (void)
+{
+  unsigned int eax, ebx, ecx, edx;
+
+  if (__get_cpuid (1, &eax, &ebx, &ecx, &edx) == 0
+      || (ecx & (bit_AVX | bit_OSXSAVE)) != (bit_AVX | bit_OSXSAVE))
+    return 0;
+
+  /* Check the OS has AVX and SSE saving enabled.  */
+  asm ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0));
+
+  return (eax & 6) == 6;
+}
+
+
 int
 main (void)
 {
-  unsigned int eax, ebx, ecx, edx;
-
   /* Run AVX test only if AVX is supported.  */
-  if (__get_cpuid (1, &eax, &ebx, &ecx, &edx)
-      && (ecx & bit_AVX))
+  if (avx_enabled ())
     {
       __m128i xmm = _mm_setzero_si128 ();
       __m128i ret = audit_test (xmm, xmm, xmm, xmm, xmm, xmm, xmm, xmm);

Modified: trunk/libc/iconvdata/extra-module.mk
==============================================================================
--- trunk/libc/iconvdata/extra-module.mk (original)
+++ trunk/libc/iconvdata/extra-module.mk Fri Jul 22 06:43:39 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: trunk/libc/iconvdata/gb18030.c
==============================================================================
--- trunk/libc/iconvdata/gb18030.c (original)
+++ trunk/libc/iconvdata/gb18030.c Fri Jul 22 06:43:39 2011
@@ -18233,17 +18233,17 @@
 	      len = 0;							      \
 	  }								      \
 	else if (ch == 0x20087)						      \
-	  idx = 0xfe51;							      \
+	  cp = (const unsigned char *) "\xfe\x51";			      \
 	else if (ch == 0x20089)						      \
-	  idx = 0xfe52;							      \
+	  cp = (const unsigned char *) "\xfe\x52";			      \
 	else if (ch == 0x200CC)						      \
-	  idx = 0xfe53;							      \
+	  cp = (const unsigned char *) "\xfe\x53";			      \
 	else if (ch == 0x215d7)						      \
-	  idx = 0xfe6c;							      \
+	  cp = (const unsigned char *) "\xfe\x6c";			      \
 	else if (ch == 0x2298F)						      \
-	  idx = 0xfe76;							      \
+	  cp = (const unsigned char *) "\xfe\x76";			      \
 	else if (ch == 0x241FE)						      \
-	  idx = 0xfe91;							      \
+	  cp = (const unsigned char *) "\xfe\x91";			      \
 	else								      \
 	  len = 0;							      \
 									      \

Modified: trunk/libc/iconvdata/johab.c
==============================================================================
--- trunk/libc/iconvdata/johab.c (original)
+++ trunk/libc/iconvdata/johab.c Fri Jul 22 06:43:39 2011
@@ -1,5 +1,5 @@
 /* Mapping tables for JOHAB handling.
-   Copyright (C) 1998, 1999, 2000-2002, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1998-2002, 2007, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jungshik Shin <jshin@xxxxxxxxxxxxxxxxx>
    and Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -93,7 +93,7 @@
 
 static const int mid_to_bit[21] =
 {
-          0x0060, 0x0080, 0x00a0, 0x00c0, 0x00e0,
+	  0x0060, 0x0080, 0x00a0, 0x00c0, 0x00e0,
   0x0140, 0x0160, 0x0180, 0x01a0, 0x01c0, 0x1e0,
   0x0240, 0x0260, 0x0280, 0x02a0, 0x02c0, 0x02e0,
   0x0340, 0x0360, 0x0380, 0x03a0
@@ -132,7 +132,7 @@
 };
 
 
-static inline uint32_t
+static uint32_t
 johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2)
 {
   if (idx <= 0xdefe)
@@ -255,7 +255,7 @@
 						   + ch2 - (ch2 > 0x90	      \
 							    ? 0x43 : 0x31)];  \
 		       else						      \
-		         ch = __ksc5601_hanja_to_ucs[(ch - 0xe0) *192	      \
+			 ch = __ksc5601_hanja_to_ucs[(ch - 0xe0) *192	      \
 						     + ch2 -  (ch2 > 0x90     \
 							       ?0x43 : 0x31)];\
 		    */							      \

Modified: trunk/libc/inet/getnetgrent_r.c
==============================================================================
--- trunk/libc/inet/getnetgrent_r.c (original)
+++ trunk/libc/inet/getnetgrent_r.c Fri Jul 22 06:43:39 2011
@@ -133,7 +133,7 @@
       assert (datap->data == NULL);
 
       /* Ignore status, we force check in `__nss_next2'.  */
-      status = (*fct.f) (group, datap);
+      status = DL_CALL_FCT (*fct.f, (group, datap));
 
       service_user *old_nip = datap->nip;
       no_more = __nss_next2 (&datap->nip, "setnetgrent", NULL, &fct.ptr,
@@ -145,7 +145,7 @@
 
 	  endfct = __nss_lookup_function (old_nip, "endnetgrent");
 	  if (endfct != NULL)
-	    (void) (*endfct) (datap);
+	    (void) DL_CALL_FCT (*endfct, (datap));
 	}
     }
 
@@ -244,7 +244,7 @@
 		    == NULL);
   while (! no_more)
     {
-      status = (*fct) (datap, buffer, buflen, &errno);
+      status = DL_CALL_FCT (*fct, (datap, buffer, buflen, &errno));
 
       if (status == NSS_STATUS_RETURN)
 	{
@@ -279,6 +279,11 @@
 	       namep = namep->next)
 	    if (strcmp (datap->val.group, namep->name) == 0)
 	      break;
+	  if (namep == NULL)
+	    for (namep = datap->needed_groups; namep != NULL;
+		 namep = namep->next)
+	      if (strcmp (datap->val.group, namep->name) == 0)
+		break;
 	  if (namep != NULL)
 	    /* Really ignore.  */
 	    continue;
@@ -339,7 +344,7 @@
 {
   union
   {
-    int (*f) (const char *, struct __netgrent *);
+    enum nss_status (*f) (const char *, struct __netgrent *);
     void *ptr;
   } setfct;
   void (*endfct) (struct __netgrent *);
@@ -362,7 +367,8 @@
 	  assert (entry.data == NULL);
 
 	  /* Open netgroup.  */
-	  enum nss_status status = (*setfct.f) (current_group, &entry);
+	  enum nss_status status = DL_CALL_FCT (*setfct.f,
+						(current_group, &entry));
 
 	  if (status == NSS_STATUS_SUCCESS
 	      && (getfct = __nss_lookup_function (entry.nip, "getnetgrent_r"))
@@ -370,7 +376,8 @@
 	    {
 	      char buffer[1024];
 
-	      while ((*getfct) (&entry, buffer, sizeof buffer, &errno)
+	      while (DL_CALL_FCT (*getfct,
+				  (&entry, buffer, sizeof buffer, &errno))
 		     == NSS_STATUS_SUCCESS)
 		{
 		  if (entry.type == group_val)
@@ -382,6 +389,11 @@
 			   namep = namep->next)
 			if (strcmp (entry.val.group, namep->name) == 0)
 			  break;
+		      if (namep == NULL)
+			for (namep = entry.needed_groups; namep != NULL;
+			     namep = namep->next)
+			  if (strcmp (entry.val.group, namep->name) == 0)
+			    break;
 		      if (namep == NULL
 			  && strcmp (netgroup, entry.val.group) != 0)
 			{
@@ -425,7 +437,7 @@
 	  /* Free all resources of the service.  */
 	  endfct = __nss_lookup_function (entry.nip, "endnetgrent");
 	  if (endfct != NULL)
-	    (*endfct) (&entry);
+	    DL_CALL_FCT (*endfct, (&entry));
 
 	  if (result != 0)
 	    break;

Modified: trunk/libc/intl/dcigettext.c
==============================================================================
--- trunk/libc/intl/dcigettext.c (original)
+++ trunk/libc/intl/dcigettext.c Fri Jul 22 06:43:39 2011
@@ -1,5 +1,5 @@
 /* Implementation of the internal dcigettext function.
-   Copyright (C) 1995-2005, 2006, 2007, 2008, 2009
+   Copyright (C) 1995-2005, 2006, 2007, 2008, 2009, 2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -1422,7 +1422,7 @@
 	  return _NL_CURRENT (LC_CTYPE, CODESET);
 # else
 #  if HAVE_ICONV
-	  extern const char *locale_charset PARAMS ((void);
+	  extern const char *locale_charset PARAMS ((void));
 	  return locale_charset ();
 #  endif
 # endif

Modified: trunk/libc/localedata/ChangeLog
==============================================================================
--- trunk/libc/localedata/ChangeLog (original)
+++ trunk/libc/localedata/ChangeLog Fri Jul 22 06:43:39 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: trunk/libc/localedata/tests-mbwc/tst_funcs.h
==============================================================================
--- trunk/libc/localedata/tests-mbwc/tst_funcs.h (original)
+++ trunk/libc/localedata/tests-mbwc/tst_funcs.h Fri Jul 22 06:43:39 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: trunk/libc/malloc/Makefile
==============================================================================
--- trunk/libc/malloc/Makefile (original)
+++ trunk/libc/malloc/Makefile Fri Jul 22 06:43:39 2011
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009
+# Copyright (C) 1991-1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009, 2011
 # Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
@@ -133,9 +133,7 @@
 
 tst-mcheck-ENV = MALLOC_CHECK_=3
 
-ifeq ($(experimental-malloc),yes)
 CPPFLAGS-malloc.c += -DPER_THREAD -DATOMIC_FASTBINS
-endif
 # Uncomment this for test releases.  For public releases it is too expensive.
 #CPPFLAGS-malloc.o += -DMALLOC_DEBUG=1
 

Modified: trunk/libc/malloc/hooks.c
==============================================================================
--- trunk/libc/malloc/hooks.c (original)
+++ trunk/libc/malloc/hooks.c Fri Jul 22 06:43:39 2011
@@ -1,5 +1,5 @@
 /* Malloc implementation for multiple threads without lock contention.
-   Copyright (C) 2001-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2001-2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Wolfram Gloger <wg@xxxxxxxxx>, 2001.
 
@@ -398,7 +398,6 @@
      size_t alignment; size_t bytes; const Void_t *caller;
 #endif
 {
-  INTERNAL_SIZE_T nb;
   Void_t* mem;
 
   if (alignment <= MALLOC_ALIGNMENT) return malloc_check(bytes, NULL);
@@ -408,7 +407,6 @@
     MALLOC_FAILURE_ACTION;
     return NULL;
   }
-  checked_request2size(bytes+1, nb);
   (void)mutex_lock(&main_arena.mutex);
   mem = (top_check() >= 0) ? _int_memalign(&main_arena, alignment, bytes+1) :
     NULL;

Modified: trunk/libc/malloc/memusage.sh
==============================================================================
--- trunk/libc/malloc/memusage.sh (original)
+++ trunk/libc/malloc/memusage.sh Fri Jul 22 06:43:39 2011
@@ -24,7 +24,7 @@
 
 # Print usage message.
 do_usage() {
-  printf >&2 $"Try \`%s --help' or `%s --usage' for more information.\n" memusage memusage
+  printf >&2 $"Try \`%s --help' or \`%s --usage' for more information.\n" memusage memusage
   exit 1
 }
 

Modified: trunk/libc/manual/intro.texi
==============================================================================
--- trunk/libc/manual/intro.texi (original)
+++ trunk/libc/manual/intro.texi Fri Jul 22 06:43:39 2011
@@ -714,9 +714,12 @@
 and says what standard or system each is derived from.
 
 @item
-@ref{Maintenance}, explains how to build and install the GNU C library on
-your system, how to report any bugs you might find, and how to add new
-functions or port the library to a new system.
+@ref{Installation}, explains how to build and install the GNU C library on
+your system, and how to report any bugs you might find.
+
+@item
+@ref{Maintenance}, explains how to add new functions or port the
+library to a new system.
 @end itemize
 
 If you already know the name of the facility you are interested in, you

Modified: trunk/libc/misc/sys/cdefs.h
==============================================================================
--- trunk/libc/misc/sys/cdefs.h (original)
+++ trunk/libc/misc/sys/cdefs.h Fri Jul 22 06:43:39 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2001, 2002, 2004, 2005, 2006, 2007, 2009
+/* Copyright (C) 1992-2001, 2002, 2004, 2005, 2006, 2007, 2009, 2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -216,6 +216,13 @@
 # define __attribute_pure__ __attribute__ ((__pure__))
 #else
 # define __attribute_pure__ /* Ignore */
+#endif
+
+/* This declaration tells the compiler that the value is constant.  */
+#if __GNUC_PREREQ (2,5)
+# define __attribute_const__ __attribute__ ((__const__))
+#else
+# define __attribute_const__ /* Ignore */
 #endif
 
 /* At some point during the gcc 3.1 development the `used' attribute

Modified: trunk/libc/nis/nss_compat/compat-pwd.c
==============================================================================
--- trunk/libc/nis/nss_compat/compat-pwd.c (original)
+++ trunk/libc/nis/nss_compat/compat-pwd.c Fri Jul 22 06:43:39 2011
@@ -361,7 +361,7 @@
 			 char *group, char *buffer, size_t buflen,
 			 int *errnop)
 {
-  char *curdomain, *host, *user, *domain, *p2;
+  char *curdomain = NULL, *host, *user, *domain, *p2;
   int status;
   size_t p2len;
 
@@ -370,15 +370,7 @@
   if (!nss_getpwnam_r)
     return NSS_STATUS_UNAVAIL;
 
-  if (yp_get_default_domain (&curdomain) != YPERR_SUCCESS)
-    {
-      ent->netgroup = false;
-      ent->first = false;
-      give_pwd_free (&ent->pwd);
-      return NSS_STATUS_UNAVAIL;
-    }
-
-  if (ent->first == true)
+  if (ent->first)
     {
       memset (&ent->netgrdata, 0, sizeof (struct __netgrent));
       __internal_setnetgrent (group, &ent->netgrdata);
@@ -401,8 +393,19 @@
       if (user == NULL || user[0] == '-')
 	continue;
 
-      if (domain != NULL && strcmp (curdomain, domain) != 0)
-	continue;
+      if (domain != NULL)
+	{
+	  if (curdomain == NULL
+	      && yp_get_default_domain (&curdomain) != YPERR_SUCCESS)
+	    {
+	      __internal_endnetgrent (&ent->netgrdata);
+	      ent->netgroup = false;
+	      give_pwd_free (&ent->pwd);
+	      return NSS_STATUS_UNAVAIL;
+	    }
+	  if (strcmp (curdomain, domain) != 0)
+	    continue;
+	}
 
       /* If name != NULL, we are called from getpwnam.  */
       if (name != NULL)

Modified: trunk/libc/nis/nss_compat/compat-spwd.c
==============================================================================
--- trunk/libc/nis/nss_compat/compat-spwd.c (original)
+++ trunk/libc/nis/nss_compat/compat-spwd.c Fri Jul 22 06:43:39 2011
@@ -318,7 +318,7 @@
 			 char *group, char *buffer, size_t buflen,
 			 int *errnop)
 {
-  char *curdomain, *host, *user, *domain, *p2;
+  char *curdomain = NULL, *host, *user, *domain, *p2;
   size_t p2len;
 
   if (!nss_getspnam_r)
@@ -328,15 +328,7 @@
   if (ent->setent_status != NSS_STATUS_SUCCESS)
     return ent->setent_status;
 
-  if (yp_get_default_domain (&curdomain) != YPERR_SUCCESS)
-    {
-      ent->netgroup = false;
-      ent->first = false;
-      give_spwd_free (&ent->pwd);
-      return NSS_STATUS_UNAVAIL;
-    }
-
-  if (ent->first == true)
+  if (ent->first)
     {
       memset (&ent->netgrdata, 0, sizeof (struct __netgrent));
       __internal_setnetgrent (group, &ent->netgrdata);
@@ -361,8 +353,19 @@
       if (user == NULL || user[0] == '-')
 	continue;
 
-      if (domain != NULL && strcmp (curdomain, domain) != 0)
-	continue;
+      if (domain != NULL)
+	{
+	  if (curdomain == NULL
+	      && yp_get_default_domain (&curdomain) != YPERR_SUCCESS)
+	    {
+	      __internal_endnetgrent (&ent->netgrdata);
+	      ent->netgroup = false;
+	      give_spwd_free (&ent->pwd);
+	      return NSS_STATUS_UNAVAIL;
+	    }
+	  if (strcmp (curdomain, domain) != 0)
+	    continue;
+	}
 
       /* If name != NULL, we are called from getpwnam */
       if (name != NULL)

Modified: trunk/libc/nis/nss_nisplus/nisplus-ethers.c
==============================================================================
--- trunk/libc/nis/nss_nisplus/nisplus-ethers.c (original)
+++ trunk/libc/nis/nss_nisplus/nisplus-ethers.c Fri Jul 22 06:43:39 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,2000-2003,2005,2006,2007
+/* Copyright (C) 1997,1998,2000-2003,2005,2006,2007,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@xxxxxxx>, 1997.
@@ -40,10 +40,10 @@
 
 
 #define NISENTRYVAL(idx, col, res) \
-        (NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
+	(NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
 
 #define NISENTRYLEN(idx, col, res) \
-        (NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
+	(NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
 
 static int
 _nss_nisplus_parse_etherent (nis_result *result, struct etherent *ether,
@@ -136,7 +136,7 @@
 
   __libc_lock_unlock (lock);
 
-  return NSS_STATUS_SUCCESS;
+  return status;
 }
 
 enum nss_status

Modified: trunk/libc/nis/nss_nisplus/nisplus-spwd.c
==============================================================================
--- trunk/libc/nis/nss_nisplus/nisplus-spwd.c (original)
+++ trunk/libc/nis/nss_nisplus/nisplus-spwd.c Fri Jul 22 06:43:39 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2002, 2003, 2005, 2007
+/* Copyright (C) 1997, 2001, 2002, 2003, 2005, 2007, 2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@xxxxxxxxxxxxxxxxxxx>, 1997.
@@ -57,7 +57,7 @@
 
   __libc_lock_unlock (lock);
 
-  return NSS_STATUS_SUCCESS;
+  return status;
 }
 
 enum nss_status
@@ -91,7 +91,7 @@
 	{
 	  saved_res = NULL;
 
-          if (pwd_tablename_val == NULL)
+	  if (pwd_tablename_val == NULL)
 	    {
 	      enum nss_status status = _nss_pwd_create_tablename (errnop);
 

Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Fri Jul 22 06:43:39 2011
@@ -1,3 +1,18 @@
+2011-07-14  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
+	UINTMAX_C.
+
+2011-06-30  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* nptl-init.c (__nptl_set_robust): New function.
+	(pthread_functions): Add reference.
+	* npthreadP.h: Declare __nptl_set_robust.
+	* sysdeps/pthread/pthread-functions.h (pthread_functions): Add
+	ptr_set_robust member.
+	* sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
+	child if threads are used.
+
 2011-06-14  Andreas Jaeger  <aj@xxxxxxx>
 

[... 46419 lines stripped ...]