[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r15224 - in /trunk: libc/ libc/crypt/ libc/dirent/ libc/dlfcn/ libc/elf/ libc/include/ libc/intl/ libc/libio/ libc/locale/ l...
- To: commits@xxxxxxxxxx
- Subject: [commits] r15224 - in /trunk: libc/ libc/crypt/ libc/dirent/ libc/dlfcn/ libc/elf/ libc/include/ libc/intl/ libc/libio/ libc/locale/ l...
- From: joseph@xxxxxxxxxx
- Date: Tue, 06 Sep 2011 15:08:20 -0000
Author: joseph
Date: Tue Sep 6 08:08:18 2011
New Revision: 15224
Log:
Merge changes between r14661 and r15223 from /fsf/trunk.
Added:
trunk/libc/dirent/scandirat.c
- copied unchanged from r15223, fsf/trunk/libc/dirent/scandirat.c
trunk/libc/dirent/scandirat64.c
- copied unchanged from r15223, fsf/trunk/libc/dirent/scandirat64.c
trunk/libc/elf/tst-initorder2.c
- copied unchanged from r15223, fsf/trunk/libc/elf/tst-initorder2.c
trunk/libc/elf/tst-initorder2.exp
- copied unchanged from r15223, fsf/trunk/libc/elf/tst-initorder2.exp
trunk/libc/elf/unload8.c
- copied unchanged from r15223, fsf/trunk/libc/elf/unload8.c
trunk/libc/elf/unload8mod1.c
- copied unchanged from r15223, fsf/trunk/libc/elf/unload8mod1.c
trunk/libc/elf/unload8mod1x.c
- copied unchanged from r15223, fsf/trunk/libc/elf/unload8mod1x.c
trunk/libc/elf/unload8mod2.c
- copied unchanged from r15223, fsf/trunk/libc/elf/unload8mod2.c
trunk/libc/elf/unload8mod3.c
- copied unchanged from r15223, fsf/trunk/libc/elf/unload8mod3.c
trunk/libc/stdio-common/bug24.c
- copied unchanged from r15223, fsf/trunk/libc/stdio-common/bug24.c
trunk/libc/string/test-wcscmp.c
- copied unchanged from r15223, fsf/trunk/libc/string/test-wcscmp.c
trunk/libc/sysdeps/i386/i686/multiarch/strcat-sse2.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcat-sse2.S
trunk/libc/sysdeps/i386/i686/multiarch/strcat-ssse3.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcat-ssse3.S
trunk/libc/sysdeps/i386/i686/multiarch/strcat.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcat.S
trunk/libc/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S
trunk/libc/sysdeps/i386/i686/multiarch/strchr-sse2.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strchr-sse2.S
trunk/libc/sysdeps/i386/i686/multiarch/strchr.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strchr.S
trunk/libc/sysdeps/i386/i686/multiarch/strncat-c.c
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strncat-c.c
trunk/libc/sysdeps/i386/i686/multiarch/strncat-sse2.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strncat-sse2.S
trunk/libc/sysdeps/i386/i686/multiarch/strncat-ssse3.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strncat-ssse3.S
trunk/libc/sysdeps/i386/i686/multiarch/strncat.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strncat.S
trunk/libc/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S
trunk/libc/sysdeps/i386/i686/multiarch/strrchr-sse2.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strrchr-sse2.S
trunk/libc/sysdeps/i386/i686/multiarch/strrchr.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/strrchr.S
trunk/libc/sysdeps/i386/i686/multiarch/wcscmp-c.c
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/wcscmp-c.c
trunk/libc/sysdeps/i386/i686/multiarch/wcscmp-sse2.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/wcscmp-sse2.S
trunk/libc/sysdeps/i386/i686/multiarch/wcscmp.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/i386/i686/multiarch/wcscmp.S
trunk/libc/sysdeps/sparc/sparc32/fpu/s_fabs.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/sparc/sparc32/fpu/s_fabs.S
trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/
- copied from r15223, fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/
trunk/libc/sysdeps/sparc/sysdep.h
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/sparc/sysdep.h
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/scandir64.c
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/scandir64.c
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/fpu/
- copied from r15223, fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/fpu/
trunk/libc/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
trunk/libc/sysdeps/unix/sysv/linux/x86_64/time.c
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/time.c
trunk/libc/sysdeps/wordsize-64/scandirat.c
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/wordsize-64/scandirat.c
trunk/libc/sysdeps/wordsize-64/scandirat64.c
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/wordsize-64/scandirat64.c
trunk/libc/sysdeps/x86_64/l10nflist.c
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/x86_64/l10nflist.c
trunk/libc/sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S
trunk/libc/sysdeps/x86_64/multiarch/strrchr-sse2-no-bsf.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/x86_64/multiarch/strrchr-sse2-no-bsf.S
trunk/libc/sysdeps/x86_64/wcscmp.S
- copied unchanged from r15223, fsf/trunk/libc/sysdeps/x86_64/wcscmp.S
trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
- copied unchanged from r15223, fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
- copied unchanged from r15223, fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
Removed:
trunk/libc/sysdeps/sparc/sparc32/fpu/s_fabs.c
trunk/libc/sysdeps/unix/sysv/linux/powerpc/scandir64.c
trunk/libc/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S
trunk/libc/sysdeps/unix/sysv/linux/x86_64/time.S
Modified:
trunk/libc/ChangeLog
trunk/libc/Makeconfig
trunk/libc/NEWS
trunk/libc/Versions.def
trunk/libc/crypt/crypt_util.c
trunk/libc/dirent/Makefile
trunk/libc/dirent/Versions
trunk/libc/dirent/dirent.h
trunk/libc/dirent/opendir.c
trunk/libc/dirent/scandir.c
trunk/libc/dirent/scandir64.c
trunk/libc/dlfcn/Makefile
trunk/libc/elf/Makefile
trunk/libc/elf/dl-close.c
trunk/libc/elf/dl-deps.c
trunk/libc/elf/dl-fini.c
trunk/libc/elf/dl-libc.c
trunk/libc/elf/dl-load.c
trunk/libc/elf/dl-misc.c
trunk/libc/elf/dl-open.c
trunk/libc/elf/elf.h
trunk/libc/elf/pldd-xx.c
trunk/libc/elf/pldd.c
trunk/libc/elf/rtld.c
trunk/libc/include/dirent.h
trunk/libc/intl/l10nflist.c
trunk/libc/libio/fileops.c
trunk/libc/libio/stdio.h
trunk/libc/locale/Makefile
trunk/libc/nptl/ChangeLog
trunk/libc/nptl/Makefile
trunk/libc/nptl/allocatestack.c
trunk/libc/nptl/sysdeps/i386/pthreaddef.h
trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/sem_wait.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_timedwait.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_wait.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h
trunk/libc/nscd/servicescache.c
trunk/libc/nss/makedb.c
trunk/libc/nss/nss_files/files-alias.c
trunk/libc/nss/nss_files/files-key.c
trunk/libc/po/ja.po
trunk/libc/posix/glob.h
trunk/libc/posix/spawn.c
trunk/libc/posix/spawn_int.h
trunk/libc/posix/spawni.c
trunk/libc/posix/spawnp.c
trunk/libc/posix/unistd.h
trunk/libc/resolv/Makefile
trunk/libc/resolv/res_init.c
trunk/libc/scripts/data/localplt-sparc-linux-gnu.data
trunk/libc/scripts/data/localplt-sparc64-linux-gnu.data
trunk/libc/scripts/test-installation.pl
trunk/libc/stdio-common/Makefile
trunk/libc/string/Makefile
trunk/libc/string/strncat.c
trunk/libc/string/test-strcmp.c
trunk/libc/string/test-string.h
trunk/libc/sysdeps/generic/ldsodefs.h
trunk/libc/sysdeps/i386/dl-trampoline.S
trunk/libc/sysdeps/i386/i486/bits/atomic.h
trunk/libc/sysdeps/i386/i486/bits/string.h
trunk/libc/sysdeps/i386/i686/multiarch/Makefile
trunk/libc/sysdeps/i386/i686/multiarch/strcpy-ssse3.S
trunk/libc/sysdeps/i386/i686/multiarch/strlen-sse2.S
trunk/libc/sysdeps/i386/i686/multiarch/strspn.S
trunk/libc/sysdeps/ieee754/dbl-64/k_rem_pio2.c
trunk/libc/sysdeps/mach/hurd/spawni.c
trunk/libc/sysdeps/posix/getaddrinfo.c
trunk/libc/sysdeps/posix/spawni.c
trunk/libc/sysdeps/powerpc/dl-tls.h
trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
trunk/libc/sysdeps/powerpc/powerpc64/dl-irel.h
trunk/libc/sysdeps/pthread/aio_suspend.c
trunk/libc/sysdeps/sparc/dl-procinfo.c
trunk/libc/sysdeps/sparc/dl-procinfo.h
trunk/libc/sysdeps/sparc/sparc32/bits/atomic.h
trunk/libc/sysdeps/sparc/sparc32/dl-machine.h
trunk/libc/sysdeps/sparc/sparc32/fpu/s_fabsf.S
trunk/libc/sysdeps/sparc/sparc64/dl-machine.h
trunk/libc/sysdeps/sparc/sparc64/jmpbuf-unwind.h
trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S
trunk/libc/sysdeps/sparc/sparc64/strcmp.S
trunk/libc/sysdeps/unix/opendir.c
trunk/libc/sysdeps/unix/sparc/sysdep.h
trunk/libc/sysdeps/unix/sysv/linux/Makefile
trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
trunk/libc/sysdeps/unix/sysv/linux/i386/scandir64.c
trunk/libc/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
trunk/libc/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
trunk/libc/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S
trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/sysdep.h
trunk/libc/sysdeps/unix/sysv/linux/sys/ptrace.h
trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h
trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/sem.h
trunk/libc/sysdeps/unix/sysv/linux/x86_64/init-first.c
trunk/libc/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
trunk/libc/sysdeps/x86_64/dl-trampoline.S
trunk/libc/sysdeps/x86_64/dl-trampoline.h
trunk/libc/sysdeps/x86_64/multiarch/Makefile
trunk/libc/sysdeps/x86_64/multiarch/strchr.S
trunk/libc/sysdeps/x86_64/multiarch/strlen.S
trunk/libc/sysdeps/x86_64/multiarch/strrchr.S
trunk/libc/wcsmbs/wcscmp.c
trunk/ports/ChangeLog.arm
trunk/ports/ChangeLog.mips
trunk/ports/sysdeps/mips/bits/atomic.h
trunk/ports/sysdeps/unix/sysv/linux/arm/clone.S
trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile
trunk/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h
trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Tue Sep 6 08:08:18 2011
@@ -1,3 +1,529 @@
+2011-09-06 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/x86_64/gettimeofday.c [!SHARED]: Include
+ <errno.h>.
+
+2011-09-06 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h: Add entry for getcpu
+ syscall on x86-64.
+ * sysdeps/unix/sysv/linux/x86_64/gettimeofday.c [!SHARED]: Use real
+ syscall.
+ * sysdeps/unix/sysv/linux/x86_64/time.c: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S [!SHARED]: Use real
+ syscall if possible.
+
+2011-09-05 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * elf/pldd.c (get_process_info): Don't read whole ELF header, just
+ e_ident. Don't pass to find_mapsXX.
+ * elf/pldd-xx.c (find_mapsXX): Remove second parameter.
+
+2011-07-20 Liubov Dmitrieva <liubov.dmitrieva@xxxxxxxxx>
+
+ * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
+ strchr-sse2-no-bsf strrchr-sse2-no-bsf
+ * sysdeps/x86_64/multiarch/strchr.S: Update.
+ Check bit_slow_BSF bit.
+ * sysdeps/x86_64/multiarch/strrchr.S: Likewise.
+ * sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S: New file.
+ * sysdeps/x86_64/multiarch/strrchr-sse2-no-bsf.S: New file.
+
+2011-09-05 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #13134]
+ * sysdeps/posix/spawni.c (script_execute): Define only for compatibility
+ before glibc 2.15.
+ (tryshell): Define.
+ (__spawni): Change last parameter to be flag. Test
+ SPAWN_XFLAGS_USE_PATH flag to use path or not.
+ Don't try to use shell unless SPAWN_XFLAGS_TRY_SHELL is set.
+ * sysdeps/mach/hurd/spawni.c: Change last parameter and adjust user.
+ * posix/spawni.c: Likewise.
+ * posix/spawn.c: Add compat version which passed SPAWN_XFLAGS_TRY_SHELL.
+ * posix/spawnp.c: Likewise. Change normal version to use
+ SPAWN_XFLAGS_USE_PATH.
+ * posix/spawn_int.c: Define SPAWN_XFLAGS_USE_PATH and
+ SPAWN_XFLAGS_TRY_SHELL.
+
+ [BZ #13150]
+ * posix/glob.h: Remove gcc 1.x support.
+
+ [BZ #13068]
+ * elf/dl-misc.c (_dl_sysdep_read_whole_file): Use O_CLOEXEC.
+
+2011-07-20 Liubov Dmitrieva <liubov.dmitrieva@xxxxxxxxx>
+
+ * sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
+ strchr-sse2 strrchr-sse2 strchr-sse2-bsf
+ strrchr-sse2-bsf
+ * sysdeps/i386/i686/multiarch/strchr.S: New file.
+ * sysdeps/i386/i686/multiarch/strrchr.S: New file.
+ * sysdeps/i386/i686/multiarch/strchr-sse2.S: New file.
+ * sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S: New file.
+ * sysdeps/i386/i686/multiarch/strrchr-sse2.S: New file.
+ * sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S: New file.
+
+2011-08-29 Liubov Dmitrieva <liubov.dmitrieva@xxxxxxxxx>
+
+ * sysdeps/x86_64/wcscmp.S: New file.
+
+ * sysdeps/i386/i686/multiarch/Makefile: (sysdep_routines): Add
+ wcscmp-c wcscmp-sse2
+ * sysdeps/i386/i686/multiarch/wcscmp-c.c: New file.
+ * sysdeps/i386/i686/multiarch/wcscmp.S: New file.
+ * sysdeps/i386/i686/multiarch/wcscmp-sse2.S: New file.
+ * wcsmbs/wcscmp.c: Allow renaming.
+
+2011-09-05 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc32/fpu/s_fabsf.S: Use first argument
+ stack slot, rather than the struct return pointer slot.
+ * sysdeps/sparc/sparc32/fpu/s_fabs.c: Delete.
+ * sysdeps/sparc/sparc32/fpu/s_fabs.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/fpu/Implies: Likewise.
+
+2011-09-05 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * po/ja.po: Update from translation team.
+
+ [BZ #13144]
+ * sysdeps/unix/sysv/linux/x86_64/bits/sem.h (semdid_ds): Fix to match
+ kernel in 64-bit binaries.
+
+2011-09-01 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * elf/elf.h (HWCAP_SPARC_*): Move to..
+ * sysdeps/sparc/sysdep.h: this new file and add new values.
+ * sysdeps/unix/sparc/sysdep.h: Include sysdeps/sparc/sysdep.h
+ * sysdeps/sparc/dl-procinfo.h: Include sysdep.h and increase
+ _DL_HWCAP_COUNT to 24.
+ * sysdeps/sparc/dl-procinfo.c (_dl_sparc_cap_flags): Add new
+ entries.
+ * sysdeps/sparc/sparc32/bits/atomic.h: Don't use magic local
+ __ATOMIC_HWCAP_SPARC_V9 define, use sysdep.h one instead.
+ * sysdeps/sparc/sparc32/dl-machine.h: Include sysdep.h
+ * sysdeps/sparc/sparc64/multiarch/memcpy.S: Use HWCAP_SPARC_*
+ instead of magic constants.
+ * sysdeps/sparc/sparc64/multiarch/memset.S: Likewise.
+
+2011-08-31 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sparc/sysdep.h (SETUP_PIC_REG): Define.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (PSEUDO):
+ Reimplement to do errno handling inline.
+ (SYSCALL_ERROR_HANDLER): New macro.
+ (__SYSCALL_STRING): Do not do errno handling in asm.
+ (__CLONE_SYSCALL_STRING): Delete.
+ (__INTERNAL_SYSCALL_STRING): Delete.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Include
+ sysdeps/unix/sparc/sysdep.h instead of sysdeps/unix/sysdep.h
+ (PSEUDO): Reimplement to do errno handling inline.
+ (ret, ret_NOERRNO, ret_ERRVAL, r0, r1, MOVE): Don't redefine.
+ (SYSCALL_ERROR_HANDLER): New macro.
+ (__SYSCALL_STRING): Do not do errno handling in asm.
+ (__CLONE_SYSCALL_STRING): Delete.
+ (__INTERNAL_SYSCALL_STRING): Delete.
+ * sysdeps/unix/sysv/linux/sparc/sysdep.h (INLINE_SYSCALL):
+ Implement in terms of INTERNAL_SYSCALL and __set_errno, just like
+ i386.
+ (INTERNAL_SYSCALL_DECL): Declare %g1 var for err state.
+ (inline_syscall*): Add 'err' argument.
+ (INTERNAL_SYSCALL, INTERNAL_SYSCALL_NCS,
+ INTERNAL_SYSCALL_ERROR_P): Likewise and pass it down.
+ (INLINE_CLONE_SYSCALL): Reimplement in terms of __SYSCALL_STRING,
+ INTERNAL_SYSCALL_ERRNO, and INTERNAL_SYSCALL_ERROR_P.
+
+ * scripts/data/localplt-sparc-linux-gnu.data: Remove 'ffs'.
+ * scripts/data/localplt-sparc64-linux-gnu.data: Likewise.
+
+2011-08-30 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * elf/rtld.c (dl_main): Relocate objects in dependency order.
+
+2011-08-29 Jiri Olsa <jolsa@xxxxxxxxxx>
+
+ * sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix cfi
+ directive.
+
+2011-08-24 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc64/strcmp.S: Rewrite.
+
+2011-08-24 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * elf/Makefile: Add rules to build and run unload8 test.
+ * elf/unload8.c: New file.
+ * elf/unload8mod1.c: New file.
+ * elf/unload8mod1x.c: New file.
+ * elf/unload8mod2.c: New file.
+ * elf/unload8mod3.c: New file.
+
+ * elf/dl-close.c (_dl_close_worker): Reset private search list if
+ it wasn't used.
+
+2011-08-23 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc64/dl-machine.h (DL_STACK_END): Do not
+ subtract stack bias.
+ * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS): Use
+ %sp not %fp in calculations.
+ (_JMPBUF_UNWINDS_ADJ): Likewise.
+
+ * sysdeps/pthread/aio_suspend.c (do_aio_misc_wait): New function.
+ (aio_suspend): Call it to force an exception region around the
+ AIO_MISC_WAIT() invocation.
+
+2011-08-23 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/i386/i686/multiarch/strspn.S (ENTRY): Add missing
+ backslash.
+
+2011-07-04 Aurelien Jarno <aurelien@xxxxxxxxxxx>
+
+ * sysdeps/powerpc/dl-tls.h: Add _PPC_DL_TLS_H inclusion
+ protection macro.
+ * sysdeps/powerpc/powerpc64/dl-irel.h: Include <ldsodefs.h>
+ and <dl-machine.h>.
+ (Elf64_FuncDesc): Remove.
+
+2011-08-22 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S: Fix
+ sigaltstack check, add missing cfi directives.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S: Add
+ missing cfi directives, and sigaltstack handling.
+
+2011-08-16 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ [BZ #11724]
+ * elf/dl-deps.c (_dl_map_object_deps): Only assume cycle when
+ object is seen twice.
+ * elf/dl-fini.c (_dl_sort_fini): Likewise.
+
+ * elf/Makefile (distribute): Add tst-initorder2.c.
+ (tests): Add tst-initorder2.
+ (modules-names): Add tst-initorder2a tst-initorder2b
+ tst-initorder2c tst-initorder2d. Add rules to build them.
+ ($(objpfx)tst-initorder2.out): New rule.
+ * elf/tst-initorder2.c: New file.
+ * elf/tst-initorder2.exp: New file.
+
+2011-08-22 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/scandir64.c: Include <string.h>.
+
+ * elf/dl-deps.c (_dl_map_object_deps): Move check for missing
+ dependencies back to end of function.
+
+ * dlfcn/Makefile (LDLIBS-bug-atexit3-lib.so): Readd
+ $(elfobjdir)/ld.so.
+
+2011-08-21 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/x86_64/gettimeofday.S: Removed.
+ * sysdeps/unix/sysv/linux/x86_64/time.S: Removed.
+ * sysdeps/unix/sysv/linux/x86_64/gettimeofday.c: New file.
+ * sysdeps/unix/sysv/linux/x86_64/time.c: New file.
+ * sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h: Remove declaration
+ of __vdso_gettimeofday.
+ * sysdeps/unix/sysv/linux/x86_64/init-first.c: Remove definition of
+ __vdso_gettimeofday and __vdso_time. Define __vdso_getcpu with
+ attribute_hidden.
+ (_libc_vdso_platform_setup): Remove initialization of
+ __vdso_gettimeofday and __vdso_time.
+
+2011-08-20 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * nss/nss_files/files-alias.c (get_next_alias): Use feof_unlocked
+ and fgetc_unlocked.
+ * nss/nss_files/files-key.c (search): Use fgets_unlocked and
+ getc_unlocked.
+
+ * elf/dl-open.c (add_to_global): Report additions to the global scope
+ for LD_DEBUG=scopes.
+ (dl_open_worker): Also print scope of newly loaded dependencies.
+ (_dl_show_scope): Indicate if there is no scope.
+
+ [BZ #13114]
+ * stdio-common/Makefile (tests): Add bug24.
+ * stdio-common/bug24.c: New file.
+
+2011-08-19 Andreas Jaeger <aj@xxxxxxx>
+
+ [BZ #13114]
+ * libio/fileops.c (_IO_new_file_fopen): Fix handling of
+ non-existant file when using close-on-exec mode.
+
+2011-08-20 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_resolve): Fix CFI for
+ the very first instruction.
+
+ * sysdeps/x86_64/dl-trampoline.h: If MORE_CODE is defined, restore
+ the CFI state in the end.
+ * sysdeps/x86_64/dl-trampoline.S: Define MORE_CODE before first
+ inclusion of dl-trampoline.h.
+ Based on a patch by Jiri Olsa <jolsa@xxxxxxxxxx>.
+
+2011-08-19 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/powerpc/fpu/libm-test-ulps: Relax ctan (0.75 + 1.25 i)
+ expectations for long double.
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/scandir64.c: Renamed
+ from sysdeps/unix/sysv/linux/powerpc/scandir64.c.
+
+2011-08-14 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/Makefile (CFLAGS-tst-writev.c): The
+ artificual limit depends upon the system page size.
+
+2011-08-17 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * Makeconfig (override CFLAGS): Add library-specific CFLAGS.
+ * resolv/Makefile: Define CFLAGS-libresolv.
+
+2011-08-17 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * nss/makedb.c (compute_tables): Make variables used in nested
+ function static.
+
+2011-08-17 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * elf/pldd-xx.c (r_debug): Explicitly add padding when needed.
+ * elf/pldd.c (get_process_info): Use pread to re-read auxiliary vector
+ if buffer was too small.
+
+ * elf/pldd.c (main): Attach to all threads in the process.
+ Rewrite /proc handling to use *at functions.
+
+2011-08-16 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * elf/dl-open.c (_dl_show_scope): Take additional parameter which
+ specifies first scope to show.
+ (dl_open_worker): Update callers. Move printing scope of new
+ object to before the relocation.
+ * elf/rtld.c (dl_main): Update _dl_show_scope call.
+ * sysdeps/generic/ldsodefs.h: Update declaration.
+
+ * elf/dl-open.c (_dl_show_scope): Use _dl_debug_printf to generate the
+ string for the scope number.
+
+2011-08-14 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * nscd/servicescache.c (cache_addserv): Make sure written is always
+ initialized.
+
+2011-08-14 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * sysdeps/i386/i486/bits/atomic.h
+ (__arch_compare_and_exchange_val_64_acq): Use RET alone at end of
+ statement expression, so as to suppress "set but not used" warning.
+ (__arch_c_compare_and_exchange_val_64_acq): Likewise.
+
+ * string/strncat.c (STRNCAT): Use prototype definition.
+
+ * locale/Makefile (locale-CPPFLAGS): Renamed CPPFLAGS-locale-programs.
+ (locale-CPPFLAGS): New variable; put LOCALEDIR, LOCALE_ALIAS_PATH and
+ -Iprograms here.
+ (cppflags-iterator.mk sequence): Use locale-programs in place of nonlib.
+ (localedef-modules): Add localedef.
+ (locale-modules): Add locale.
+
+ * sysdeps/generic/ldsodefs.h (struct unique_sym): Add a const.
+ * elf/rtld.c (dl_main): Invert order of assignment in last change,
+ to avoid a warning.
+
+2011-08-14 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sparc/bits/resource.h (RLIM_INFINITY,
+ RLIM64_INFINITY): Fix 64-bit values for 32-bit sparc.
+
+2011-08-13 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * elf/dl-open.c: Rename show_scope to _dl_show_scope and export.
+ (dl_open_worker): Call _dl_show_scope when DL_DEBUG_SCOPES is set.
+ * elf/rtld.c (dl_main): Set l_name of vDSO.
+ Call _dl_show_scope when DL_DEBUG_SCOPES.
+ (process_dl_debug): Recognize scopes flag and also set it for all.
+ * sysdeps/generic/ldsodefs.h: Define DL_DEBUG_SCOPES.
+ Declare _dl_show_scope.
+
+ * elf/dl-libc.c (do_dlopen_args): Add caller_dlopen.
+ (do_dlopen): Pass caller_dlopen to dl_open.
+ (__libc_dlopen_mode): Initialize caller_dlopen.
+
+ * intl/l10nflist.c (_nl_normalize_codeset): Make it compile outside
+ of libc. Make tolower call locale-independent. Optimize a bit by
+ using isdigit instead of isalnum.
+ * locale/Makefile (locale-CPPFLAGS): Add -DNOT_IN_libc.
+
+2011-08-12 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * elf/dl-load.c (_dl_map_object): Show in debug output whether a DSO
+ was a dependency or dynamically loaded.
+
+2011-08-11 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * intl/l10nflist.c: Allow architecture-specific pop function.
+ * sysdeps/x86_64/l10nflist.c: New file.
+
+ * intl/l10nflist.c (_nl_make_l10nflist): Use locale-independent
+ classification.
+
+2011-08-10 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * include/dirent.h: Add libc_hidden_proto for scandirat and
+ scandirat64. Don't declare __scandirat64.
+ * dirent/scandirat.c: Add libc_hidden_def.
+ * dirent/scandirat64.c (SCANDIRAT): Remove underscores.
+ * sysdeps/unix/sysv/linux/i386/scandir64.c (SCANDIRAT): Likewise.
+
+2011-08-10 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Add missing comma in
+ enum.
+ * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/sys/ptrace.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h: Likewise.
+
+2011-08-09 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * Versions.def [libc]: Add GLIBC_2.15.
+ * dirent/Makefile (routines): Add scandirat and scandirat64.
+ * dirent/Versions [libc]: Export scandirat and scandirat64 for
+ GLIBC_2.15.
+ * dirent/dirent.h: Declare scandirat and scandirat64.
+ * dirent/scandirat.c: New file.
+ * dirent/scandirat64.c: New file.
+ * sysdeps/wordsize-64/scandirat.c: New file.
+ * sysdeps/wordsize-64/scandirat64.c: New file.
+ * dirent/opendir.c: Define opendirat.
+ * dirent/scandir.c: Move code to scandirat.c. Implement scandir
+ using scandirat.
+ * dirent/scandir64.c: Adjust for scandir.c change.
+ * include/dirent.h: Define scandir_cancel_struct. Declare __opendirat,
+ __scandirat64, and __scandir_cancel_handler.
+ * sysdeps/unix/opendir.c: Rename __opendir to __opendirat. Take
+ additional parameter and use openat instead of open (outside of ld.so).
+ Add new __opendir as wrapper around __opendirat.
+ * sysdeps/unix/sysv/linux/i386/scandir64.c: Reimplement __old_scandir64
+ here without requiring old scandirat implementation.
+
+2011-08-08 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * dirent/scandir.c (cancel_handler): Renamed to
+ __scandir_cancel_handler. Do not define if SKIP_SCANDIR_CANCEL is
+ defined. Adjust users.
+ * dirent/scandir64.c: Define SKIP_SCANDIR_CANCEL.
+ * sysdeps/unix/sysv/linux/i386/scandir64.c: Likewise.
+
+2011-08-04 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * string/test-string.h (IMPL): Use __STRING to expand name and then
+ stringify it.
+
+ * string/test-strcmp.c: Unify most of the WIDE and !WIDE code. Lots
+ of cleanups.
+
+2011-07-22 Liubov Dmitrieva <liubov.dmitrieva@xxxxxxxxx>
+
+ * string/Makefile: Update.
+ (strop-tests): Append strncat.
+ * string/test-wcscmp.c: New file.
+ New comprehensive test for wcscmp.
+ * string/test-strcmp.c: Update.
+ (WIDE): New define.
+
+2011-07-22 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * resolv/res_init.c (__res_vinit): Properly tokenize nameserver
+ line.
+
+2011-07-26 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't discard result of
+ encoding to ACE if AI_IDN.
+
+2011-08-01 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/ieee754/dbl-64/k_rem_pio2.c (__kernel_rem_pio2): Fix up fq
+ to y conversion for prec 3 and __FLT_EVAL_METHOD__ != 0.
+
+2011-07-22 Liubov Dmitrieva <liubov.dmitrieva@xxxxxxxxx>
+
+ * sysdeps/i386/i686/multiarch/strcat-sse2.S: Update.
+ Fix overflow bug in strncat.
+ * sysdeps/i386/i686/multiarch/strcpy-ssse3.S: Likewise.
+
+ * string/test-strncat.c: Update.
+ Add new tests for checking overflow bugs.
+
+2011-07-15 Liubov Dmitrieva <liubov.dmitrieva@xxxxxxxxx>
+
+ * sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
+ strcat-ssse3 strcat-sse2 strncat-ssse3 strncat-sse2 strncat-c.
+ * sysdeps/i386/i686/multiarch/strcat.S: New file.
+ * sysdeps/i386/i686/multiarch/strcat-c.c: New file.
+ * sysdeps/i386/i686/multiarch/strcat-sse2.S: New file.
+ * sysdeps/i386/i686/multiarch/strcat-ssse3.S: New file.
+ * sysdeps/i386/i686/multiarch/strncat.S: New file.
+ * sysdeps/i386/i686/multiarch/strncat-sse2.S: New file.
+ * sysdeps/i386/i686/multiarch/strncat-ssse3.S: New file.
+
+ * sysdeps/i386/i686/multiarch/strcpy-ssse3.S
+ (USE_AS_STRCAT): Define.
+ Add strcat and strncat support.
+ * sysdeps/i386/i686/multiarch/strlen-sse2.S: Likewise.
+
+2011-07-25 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/i386/i486/bits/string.h (__strncat_g): Correctly handle
+ __n bigger than INT_MAX+1.
+ (__strncmp_g): Likewise.
+
+2011-07-23 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * posix/unistd.h: Define SEEK_DATA and SEEK_HOLE.
+ * libio/stido.h: Likewise.
+
+ * sysdeps/unix/sysv/linux/bits/socket.h (PF_NFC): Define.
+ (AF_NFC): Define.
+ * sysdeps/unix/sysv/linux/sparc/bits/socket.h (PF_NFC): Define.
+ (AF_NFC): Define.
+
+ * sysdeps/unix/sysv/linux/sys/ptrace.h: Add new constants.
+ * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/sys/ptrace.h: Likewise.
+
+ [BZ #13021]
+ * scripts/test-installation.pl: Don't expect libnss_test1 to be
+ installed.
+
+ * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix one more
+ typo.
+ (_dl_x86_64_save_sse): Likewise.
+
+2011-07-22 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix test for
+ OSXSAVE.
+ (_dl_x86_64_save_sse): Likewise.
+
+ * crypt/crypt_util.c (__init_des_r): Optimize memset calls.
+
+ * crypt/crypt_util.c (__init_des_r): Add read barrier as well.
+
+2011-07-21 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix last
+ change.
+ (_dl_x86_64_save_sse): Use correct AVX check.
+
2011-07-21 Liubov Dmitrieva <liubov.dmitrieva@xxxxxxxxx>
* sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: Fix overfow
Modified: trunk/libc/Makeconfig
==============================================================================
--- trunk/libc/Makeconfig (original)
+++ trunk/libc/Makeconfig Tue Sep 6 08:08:18 2011
@@ -716,7 +716,9 @@
override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
$(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
- $(CFLAGS-$(@F))
+ $(CFLAGS-$(@F)) \
+ $(foreach lib,$(libof-$(basename $(@F))) \
+ $(libof-$(<F)) $(libof-$(@F)),$(CFLAGS-$(lib)))
override CXXFLAGS = $(c++-sysincludes) \
$(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
$(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
Modified: trunk/libc/NEWS
==============================================================================
--- trunk/libc/NEWS (original)
+++ trunk/libc/NEWS Tue Sep 6 08:08:18 2011
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes. 2011-7-20
+GNU C Library NEWS -- history of user-visible changes. 2011-9-5
Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
See the end for copying conditions.
@@ -9,7 +9,8 @@
* The following bugs are resolved with this release:
- 9696, 12868, 12852, 12874, 12885, 12907, 12922, 12935, 13007
+ 9696, 12868, 12852, 12874, 12885, 12907, 12922, 12935, 13007, 13021,
+ 13068, 13114, 13134, 13144, 13150
* New program pldd to list loaded object of a process
Implemented by Ulrich Drepper.
@@ -24,8 +25,15 @@
* Improved strcpy, strncpy, stpcpy, stpncpy for SSE2 and SSSE3 on x86-64.
Contributed by HJ Lu.
-* Optimized strcat and strncat on x86-64.
+* Optimized strcat and strncat on x86-64 and optimized wcscmp on x86-32 and
+ x86-64.
Contributed by Liubov Dmitrieva.
+
+* Optimized strchrm strrchr for SSE on x86-32.
+ Contributed by Liubov Dmitrieva.
+
+* New interfaces: scandirat, scandirat64
+ Implemented by Ulrich Drepper.
Version 2.14
Modified: trunk/libc/Versions.def
==============================================================================
--- trunk/libc/Versions.def (original)
+++ trunk/libc/Versions.def Tue Sep 6 08:08:18 2011
@@ -31,6 +31,7 @@
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
+ GLIBC_2.15
%ifdef USE_IN_LIBIO
HURD_CTHREADS_0.3
%endif
Modified: trunk/libc/crypt/crypt_util.c
==============================================================================
--- trunk/libc/crypt/crypt_util.c (original)
+++ trunk/libc/crypt/crypt_util.c Tue Sep 6 08:08:18 2011
@@ -1,7 +1,8 @@
/*
* UFC-crypt: ultra fast crypt(3) implementation
*
- * Copyright (C) 1991-1993,1996-1998,2000,2010 Free Software Foundation, Inc.
+ * Copyright (C) 1991-1993,1996-1998,2000,2010,2011
+ * Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -475,7 +476,8 @@
small_tables_done:
__libc_lock_unlock(_ufc_tables_lock);
#endif
- }
+ } else
+ atomic_read_barrier ();
/*
* Create the sb tables:
@@ -490,10 +492,20 @@
*
*/
- _ufc_clearmem((char*)__data->sb0, (int)sizeof(__data->sb0));
- _ufc_clearmem((char*)__data->sb1, (int)sizeof(__data->sb1));
- _ufc_clearmem((char*)__data->sb2, (int)sizeof(__data->sb2));
- _ufc_clearmem((char*)__data->sb3, (int)sizeof(__data->sb3));
+ if (__data->sb0 + sizeof (__data->sb0) == __data->sb1
+ && __data->sb1 + sizeof (__data->sb1) == __data->sb2
+ && __data->sb2 + sizeof (__data->sb2) == __data->sb3)
+ _ufc_clearmem(__data->sb0,
+ (int)sizeof(__data->sb0)
+ + (int)sizeof(__data->sb1)
+ + (int)sizeof(__data->sb2)
+ + (int)sizeof(__data->sb3));
+ else {
+ _ufc_clearmem(__data->sb0, (int)sizeof(__data->sb0));
+ _ufc_clearmem(__data->sb1, (int)sizeof(__data->sb1));
+ _ufc_clearmem(__data->sb2, (int)sizeof(__data->sb2));
+ _ufc_clearmem(__data->sb3, (int)sizeof(__data->sb3));
+ }
for(sg = 0; sg < 4; sg++) {
int j1, j2;
Modified: trunk/libc/dirent/Makefile
==============================================================================
--- trunk/libc/dirent/Makefile (original)
+++ trunk/libc/dirent/Makefile Tue Sep 6 08:08:18 2011
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2000,2002,2003,2005,2006 Free Software Foundation, Inc.
+# Copyright (C) 1991-2000,2002,2003,2005,2006,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
@@ -25,7 +25,8 @@
routines := opendir closedir readdir readdir_r rewinddir \
seekdir telldir scandir alphasort versionsort \
getdents getdents64 dirfd readdir64 readdir64_r scandir64 \
- alphasort64 versionsort64 fdopendir
+ alphasort64 versionsort64 fdopendir \
+ scandirat scandirat64
distribute := dirstream.h
tests := list tst-seekdir opendir-tst1 bug-readdir1 tst-fdopendir \
Modified: trunk/libc/dirent/Versions
==============================================================================
--- trunk/libc/dirent/Versions (original)
+++ trunk/libc/dirent/Versions Tue Sep 6 08:08:18 2011
@@ -44,4 +44,7 @@
GLIBC_2.4 {
fdopendir;
}
+ GLIBC_2.15 {
+ scandirat; scandirat64;
+ }
}
Modified: trunk/libc/dirent/dirent.h
==============================================================================
--- trunk/libc/dirent/dirent.h (original)
+++ trunk/libc/dirent/dirent.h Tue Sep 6 08:08:18 2011
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-2000,2003-2005,2009,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2000,2003-2005,2009,2010,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -247,7 +248,10 @@
/* Scan the directory DIR, calling SELECTOR on each directory entry.
Entries for which SELECT returns nonzero are individually malloc'd,
sorted using qsort with CMP, and collected in a malloc'd array in
- *NAMELIST. Returns the number of entries selected, or -1 on error. */
+ *NAMELIST. Returns the number of entries selected, or -1 on error.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
# ifndef __USE_FILE_OFFSET64
extern int scandir (__const char *__restrict __dir,
struct dirent ***__restrict __namelist,
@@ -278,6 +282,43 @@
int (*__cmp) (__const struct dirent64 **,
__const struct dirent64 **))
__nonnull ((1, 2));
+# endif
+
+# ifdef __USE_GNU
+/* Similar to `scandir' but a relative DIR name is interpreted relative
+ to the directory for which DFD is a descriptor.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+# ifndef __USE_FILE_OFFSET64
+extern int scandirat (int __dfd, __const char *__restrict __dir,
+ struct dirent ***__restrict __namelist,
+ int (*__selector) (__const struct dirent *),
+ int (*__cmp) (__const struct dirent **,
+ __const struct dirent **))
+ __nonnull ((2, 3));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (scandirat,
+ (int __dfd, __const char *__restrict __dir,
+ struct dirent ***__restrict __namelist,
+ int (*__selector) (__const struct dirent *),
+ int (*__cmp) (__const struct dirent **,
+ __const struct dirent **)),
+ scandirat64) __nonnull ((2, 3));
+# else
+# define scandirat scandirat64
+# endif
+# endif
+
+/* This function is like `scandir' but it uses the 64bit dirent structure.
+ Please note that the CMP function must now work with struct dirent64 **. */
+extern int scandirat64 (int __dfd, __const char *__restrict __dir,
+ struct dirent64 ***__restrict __namelist,
+ int (*__selector) (__const struct dirent64 *),
+ int (*__cmp) (__const struct dirent64 **,
+ __const struct dirent64 **))
+ __nonnull ((2, 3));
# endif
/* Function to compare two `struct dirent's alphabetically. */
Modified: trunk/libc/dirent/opendir.c
==============================================================================
--- trunk/libc/dirent/opendir.c (original)
+++ trunk/libc/dirent/opendir.c Tue Sep 6 08:08:18 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 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
@@ -21,12 +21,19 @@
#include <dirent.h>
+DIR *
+__opendirat (int dfd, const char *name)
+{
+ __set_errno (ENOSYS);
+ return NULL;
+}
+
+
/* Open a directory stream on NAME. */
DIR *
__opendir (const char *name)
{
- __set_errno (ENOSYS);
- return NULL;
+ return __opendirat (AT_FDCWD, name);
}
weak_alias (__opendir, opendir)
Modified: trunk/libc/dirent/scandir.c
==============================================================================
--- trunk/libc/dirent/scandir.c (original)
+++ trunk/libc/dirent/scandir.c Tue Sep 6 08:08:18 2011
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992-1998,2000,2002,2003,2009 Free Software Foundation, Inc.
+/* Copyright (C) 1992-1998,2000,2002,2003,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
@@ -17,38 +18,12 @@
02111-1307 USA. */
#include <dirent.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <bits/libc-lock.h>
+#include <fcntl.h>
#ifndef SCANDIR
-#define SCANDIR scandir
-#define READDIR __readdir
-#define DIRENT_TYPE struct dirent
-#endif
-
-#ifndef SCANDIR_CANCEL
-#define SCANDIR_CANCEL
-struct scandir_cancel_struct
-{
- DIR *dp;
- void *v;
- size_t cnt;
-};
-
-static void
-cancel_handler (void *arg)
-{
- struct scandir_cancel_struct *cp = arg;
- size_t i;
- void **v = cp->v;
-
- for (i = 0; i < cp->cnt; ++i)
- free (v[i]);
- free (v);
- (void) __closedir (cp->dp);
-}
+# define SCANDIR scandir
+# define SCANDIRAT scandirat
+# define DIRENT_TYPE struct dirent
#endif
@@ -59,91 +34,5 @@
int (*select) (const DIRENT_TYPE *);
int (*cmp) (const DIRENT_TYPE **, const DIRENT_TYPE **);
{
- DIR *dp = __opendir (dir);
- DIRENT_TYPE **v = NULL;
- size_t vsize = 0;
- struct scandir_cancel_struct c;
- DIRENT_TYPE *d;
- int save;
-
- if (dp == NULL)
- return -1;
-
- save = errno;
- __set_errno (0);
-
- c.dp = dp;
- c.v = NULL;
- c.cnt = 0;
- __libc_cleanup_push (cancel_handler, &c);
-
- while ((d = READDIR (dp)) != NULL)
- {
- int use_it = select == NULL;
-
- if (! use_it)
- {
- use_it = select (d);
- /* The select function might have changed errno. It was
- zero before and it need to be again to make the latter
- tests work. */
- __set_errno (0);
- }
-
- if (use_it)
- {
- DIRENT_TYPE *vnew;
- size_t dsize;
-
- /* Ignore errors from select or readdir */
- __set_errno (0);
-
- if (__builtin_expect (c.cnt == vsize, 0))
- {
- DIRENT_TYPE **new;
- if (vsize == 0)
- vsize = 10;
- else
- vsize *= 2;
- new = (DIRENT_TYPE **) realloc (v, vsize * sizeof (*v));
- if (new == NULL)
- break;
- v = new;
- c.v = (void *) v;
- }
-
- dsize = &d->d_name[_D_ALLOC_NAMLEN (d)] - (char *) d;
- vnew = (DIRENT_TYPE *) malloc (dsize);
- if (vnew == NULL)
- break;
-
- v[c.cnt++] = (DIRENT_TYPE *) memcpy (vnew, d, dsize);
- }
- }
-
- if (__builtin_expect (errno, 0) != 0)
- {
- save = errno;
-
- while (c.cnt > 0)
- free (v[--c.cnt]);
- free (v);
- c.cnt = -1;
- }
- else
- {
- /* Sort the list if we have a comparison function to sort with. */
- if (cmp != NULL)
- qsort (v, c.cnt, sizeof (*v),
- (int (*) (const void *, const void *)) cmp);
-
- *namelist = v;
- }
-
- __libc_cleanup_pop (0);
-
- (void) __closedir (dp);
- __set_errno (save);
-
- return c.cnt;
+ return SCANDIRAT (AT_FDCWD, dir, namelist, select, cmp);
}
Modified: trunk/libc/dirent/scandir64.c
==============================================================================
--- trunk/libc/dirent/scandir64.c (original)
+++ trunk/libc/dirent/scandir64.c Tue Sep 6 08:08:18 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 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
@@ -19,13 +19,7 @@
#include <dirent.h>
#define SCANDIR scandir64
-#define READDIR __readdir64
+#define SCANDIRAT scandirat64
#define DIRENT_TYPE struct dirent64
-int scandir64 (__const char *__restrict __dir,
- struct dirent64 ***__restrict __namelist,
- int (*__selector) (__const struct dirent64 *),
- int (*__cmp) (__const struct dirent64 **,
- __const struct dirent64 **));
-
#include <dirent/scandir.c>
Modified: trunk/libc/dlfcn/Makefile
==============================================================================
--- trunk/libc/dlfcn/Makefile (original)
+++ trunk/libc/dlfcn/Makefile Tue Sep 6 08:08:18 2011
@@ -130,7 +130,8 @@
$(objpfx)bug-atexit2: $(libdl)
$(objpfx)bug-atexit2.out: $(objpfx)bug-atexit2-lib.so
-LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh $(common-objpfx)libc_nonshared.a
+LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh $(elfobjdir)/ld.so \
+ $(common-objpfx)libc_nonshared.a
$(objpfx)bug-atexit3: $(libdl)
$(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so
Modified: trunk/libc/elf/Makefile
==============================================================================
--- trunk/libc/elf/Makefile (original)
+++ trunk/libc/elf/Makefile Tue Sep 6 08:08:18 2011
@@ -90,6 +90,7 @@
unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \
unload6mod1.c unload6mod2.c unload6mod3.c \
unload7mod1.c unload7mod2.c \
+ unload8mod1.c unload8mod1x.c unload8mod2.c unload8mod3.c \
tst-audit1.c tst-audit2.c tst-audit3.c tst-audit4.c \
tst-auditmod1.c tst-auditmod3a.c tst-auditmod3b.c \
tst-auditmod4a.c tst-auditmod4b.c \
@@ -120,9 +121,10 @@
ifuncmain7pie.c ifuncmain7static.c \
tst-unique1.c tst-unique1mod1.c tst-unique1mod2.c \
tst-unique2.c tst-unique2mod1.c tst-unique2mod2.c \
- tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
- tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
- tst-initorder.c
+ tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
+ tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
+ tst-initorder.c \
+ tst-initorder2.c
CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
@@ -227,11 +229,11 @@
tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
tst-dlmodcount tst-dlopenrpath tst-deep1 \
tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
- unload3 unload4 unload5 unload6 unload7 tst-global1 order2 \
+ unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \
tst-audit1 tst-audit2 \
tst-stackguard1 tst-addr1 tst-thrlock \
tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
- tst-initorder
+ tst-initorder tst-initorder2
# reldep9
test-srcs = tst-pathopt
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
@@ -285,6 +287,7 @@
unload4mod1 unload4mod2 unload4mod3 unload4mod4 \
unload6mod1 unload6mod2 unload6mod3 \
unload7mod1 unload7mod2 \
+ unload8mod1 unload8mod1x unload8mod2 unload8mod3 \
order2mod1 order2mod2 order2mod3 order2mod4 \
tst-unique1mod1 tst-unique1mod2 \
tst-unique2mod1 tst-unique2mod2 \
@@ -292,7 +295,8 @@
tst-unique4lib \
tst-initordera1 tst-initorderb1 \
tst-initordera2 tst-initorderb2 \
- tst-initordera3 tst-initordera4
+ tst-initordera3 tst-initordera4 \
+ tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
ifeq (yes,$(have-initfini-array))
modules-names += tst-array2dep tst-array5dep
endif
@@ -574,6 +578,9 @@
$(objpfx)unload6mod3.so: $(libdl)
$(objpfx)unload7mod1.so: $(libdl)
$(objpfx)unload7mod2.so: $(objpfx)unload7mod1.so
+$(objpfx)unload8mod1.so: $(objpfx)unload8mod2.so
+$(objpfx)unload8mod2.so: $(objpfx)unload8mod3.so
+$(objpfx)unload8mod3.so: $(libdl)
$(objpfx)tst-initordera2.so: $(objpfx)tst-initordera1.so
$(objpfx)tst-initorderb2.so: $(objpfx)tst-initorderb1.so $(objpfx)tst-initordera2.so
$(objpfx)tst-initordera3.so: $(objpfx)tst-initorderb2.so $(objpfx)tst-initorderb1.so
@@ -891,6 +898,9 @@
$(objpfx)unload7.out: $(objpfx)unload7mod1.so $(objpfx)unload7mod2.so
unload7-ENV = MALLOC_PERTURB_=85
+$(objpfx)unload8: $(libdl)
+$(objpfx)unload8.out: $(objpfx)unload8mod1.so $(objpfx)unload8mod1x.so
+
ifdef libdl
$(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a
$(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
@@ -1176,6 +1186,23 @@
$< > $@
cmp $@ tst-initorder.exp > /dev/null
+$(objpfx)tst-initorder2: $(objpfx)tst-initorder2a.so $(objpfx)tst-initorder2d.so $(objpfx)tst-initorder2c.so
+$(objpfx)tst-initorder2a.so: $(objpfx)tst-initorder2b.so
+$(objpfx)tst-initorder2b.so: $(objpfx)tst-initorder2c.so
+$(objpfx)tst-initorder2c.so: $(objpfx)tst-initorder2d.so
+define o-iterator-doit
+$(objpfx)tst-initorder2$o.os: tst-initorder2.c; \
+$$(compile-command.c) -DNAME=\"$o\"
+endef
+object-suffixes-left := a b c d
+include $(o-iterator)
+
+$(objpfx)tst-initorder2.out: $(objpfx)tst-initorder2
+ $(elf-objpfx)${rtld-installed-name} \
+ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
+ $< > $@
+ cmp $@ tst-initorder2.exp > /dev/null
+
ifeq (yes,$(config-cflags-avx))
AVX-CFLAGS=-mavx
ifeq (yes,$(config-cflags-novzeroupper))
Modified: trunk/libc/elf/dl-close.c
==============================================================================
--- trunk/libc/elf/dl-close.c (original)
+++ trunk/libc/elf/dl-close.c Tue Sep 6 08:08:18 2011
@@ -429,6 +429,13 @@
scope_mem_left = true;
imap->l_scope_max = new_size;
+ }
+ else if (new_list != NULL)
+ {
+ /* We didn't change the scope array, so reset the search
+ list. */
+ imap->l_searchlist.r_list = NULL;
+ imap->l_searchlist.r_nlist = 0;
}
/* The loader is gone, so mark the object as not having one.
Modified: trunk/libc/elf/dl-deps.c
==============================================================================
--- trunk/libc/elf/dl-deps.c (original)
+++ trunk/libc/elf/dl-deps.c Tue Sep 6 08:08:18 2011
@@ -491,10 +491,6 @@
if (errno == 0 && errno_saved != 0)
__set_errno (errno_saved);
- if (errno_reason)
- _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
- NULL, errstring);
-
struct link_map **old_l_initfini = NULL;
if (map->l_initfini != NULL && map->l_type == lt_loaded)
{
@@ -626,12 +622,12 @@
/* We can skip looking for the binary itself which is at the front
of the search list. */
i = 1;
- bool seen[nlist];
- memset (seen, false, nlist * sizeof (seen[0]));
+ char seen[nlist];
+ memset (seen, 0, nlist * sizeof (seen[0]));
while (1)
{
/* Keep track of which object we looked at this round. */
- seen[i] = true;
+ seen[i] += seen[i] < 2;
struct link_map *thisp = l_initfini[i];
/* Find the last object in the list for which the current one is
@@ -652,15 +648,16 @@
(k - i) * sizeof (l_initfini[0]));
l_initfini[k] = thisp;
- if (seen[i + 1])
+ if (seen[i + 1] > 1)
{
++i;
goto next_clear;
}
+ char this_seen = seen[i];
memmove (&seen[i], &seen[i + 1],
(k - i) * sizeof (seen[0]));
- seen[k] = true;
+ seen[k] = this_seen;
goto next;
}
@@ -671,7 +668,7 @@
if (++i == nlist)
break;
next_clear:
- memset (&seen[i], false, (nlist - i) * sizeof (seen[0]));
+ memset (&seen[i], 0, (nlist - i) * sizeof (seen[0]));
next:;
}
@@ -690,4 +687,8 @@
}
if (old_l_initfini != NULL)
map->l_orig_initfini = old_l_initfini;
+
+ if (errno_reason)
+ _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
+ NULL, errstring);
}
Modified: trunk/libc/elf/dl-fini.c
==============================================================================
--- trunk/libc/elf/dl-fini.c (original)
+++ trunk/libc/elf/dl-fini.c Tue Sep 6 08:08:18 2011
@@ -39,12 +39,12 @@
/* We can skip looking for the binary itself which is at the front
of the search list for the main namespace. */
unsigned int i = ns == LM_ID_BASE;
- bool seen[nmaps];
- memset (seen, false, nmaps * sizeof (seen[0]));
+ char seen[nmaps];
+ memset (seen, 0, nmaps * sizeof (seen[0]));
while (1)
{
/* Keep track of which object we looked at this round. */
- seen[i] = true;
+ seen[i] += seen[i] < 2;
struct link_map *thisp = maps[i];
/* Do not handle ld.so in secondary namespaces and object which
@@ -79,14 +79,15 @@
used[k] = here_used;
}
- if (seen[i + 1])
+ if (seen[i + 1] > 1)
{
++i;
goto next_clear;
}
+ char this_seen = seen[i];
memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
- seen[k] = true;
+ seen[k] = this_seen;
goto next;
}
@@ -96,7 +97,7 @@
unsigned int m = maps[k]->l_reldeps->act;
struct link_map **relmaps = &maps[k]->l_reldeps->list[0];
- /* Look through the relocation dependencies of the object. */
+ /* Look through the relocation dependencies of the object. */
while (m-- > 0)
if (__builtin_expect (relmaps[m] == thisp, 0))
goto move;
@@ -109,7 +110,7 @@
if (++i == nmaps)
break;
next_clear:
- memset (&seen[i], false, (nmaps - i) * sizeof (seen[0]));
+ memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
next:;
}
Modified: trunk/libc/elf/dl-libc.c
==============================================================================
--- trunk/libc/elf/dl-libc.c (original)
+++ trunk/libc/elf/dl-libc.c Tue Sep 6 08:08:18 2011
@@ -1,5 +1,6 @@
/* Handle loading and unloading shared objects for internal libc purposes.
- Copyright (C) 1999-2002,2004-2006,2009,2010 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002,2004-2006,2009,2010,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Zack Weinberg <zack@xxxxxxxxxxxxxxxxx>, 1999.
@@ -62,6 +63,8 @@
const char *name;
/* Opening mode. */
int mode;
+ /* This is the caller of the dlopen() function. */
+ const void *caller_dlopen;
/* Return from do_dlopen. */
struct link_map *map;
@@ -83,8 +86,9 @@
{
struct do_dlopen_args *args = (struct do_dlopen_args *) ptr;
/* Open and relocate the shared object. */
- args->map = GLRO(dl_open) (args->name, args->mode, NULL, __LM_ID_CALLER,
- __libc_argc, __libc_argv, __environ);
+ args->map = GLRO(dl_open) (args->name, args->mode, args->caller_dlopen,
+ __LM_ID_CALLER, __libc_argc, __libc_argv,
+ __environ);
}
static void
@@ -153,6 +157,7 @@
struct do_dlopen_args args;
args.name = name;
args.mode = mode;
+ args.caller_dlopen = RETURN_ADDRESS (0);
#ifdef SHARED
if (__builtin_expect (_dl_open_hook != NULL, 0))
Modified: trunk/libc/elf/dl-load.c
==============================================================================
--- trunk/libc/elf/dl-load.c (original)
+++ trunk/libc/elf/dl-load.c Tue Sep 6 08:08:18 2011
@@ -2098,9 +2098,11 @@
/* Display information if we are debugging. */
if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)
&& loader != NULL)
- _dl_debug_printf ("\nfile=%s [%lu]; needed by %s [%lu]\n", name, nsid,
- loader->l_name[0]
- ? loader->l_name : rtld_progname, loader->l_ns);
+ _dl_debug_printf ((mode & __RTLD_CALLMAP) == 0
+ ? "\nfile=%s [%lu]; needed by %s [%lu]\n"
+ : "\nfile=%s [%lu]; dynamically loaded by %s [%lu]\n",
+ name, nsid, loader->l_name[0]
+ ? loader->l_name : rtld_progname, loader->l_ns);
#ifdef SHARED
/* Give the auditing libraries a chance to change the name before we
Modified: trunk/libc/elf/dl-misc.c
==============================================================================
--- trunk/libc/elf/dl-misc.c (original)
+++ trunk/libc/elf/dl-misc.c Tue Sep 6 08:08:18 2011
@@ -1,5 +1,5 @@
/* Miscellaneous support functions for dynamic linker
- Copyright (C) 1997-2004, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-2004, 2006, 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
@@ -44,7 +44,11 @@
{
void *result = MAP_FAILED;
struct stat64 st;
- int fd = __open (file, O_RDONLY);
+ int flags = O_RDONLY;
+#ifdef O_CLOEXEC
+ flags |= O_CLOEXEC;
+#endif
+ int fd = __open (file, flags);
if (fd >= 0)
{
if (__fxstat64 (_STAT_VER, fd, &st) >= 0)
@@ -350,7 +354,7 @@
UINT32_C (536870909),
UINT32_C (1073741789),
UINT32_C (2147483647),
- /* 4294967291L */
+ /* 4294967291L */
UINT32_C (2147483647) + UINT32_C (2147483644)
};
Modified: trunk/libc/elf/dl-open.c
==============================================================================
--- trunk/libc/elf/dl-open.c (original)
+++ trunk/libc/elf/dl-open.c Tue Sep 6 08:08:18 2011
@@ -46,12 +46,6 @@
extern int __libc_multiple_libcs; /* Defined in init-first.c. */
-/* Undefine the following for debugging. */
-/* #define SCOPE_DEBUG 1 */
-#ifdef SCOPE_DEBUG
-static void show_scope (struct link_map *new);
-#endif
-
/* We must be carefull not to leave us in an inconsistent state. Thus we
catch any error and re-raise it after cleaning up. */
@@ -158,6 +152,11 @@
{
map->l_global = 1;
ns->_ns_main_searchlist->r_list[new_nlist++] = map;
+
+ /* We modify the global scope. Report this. */
+ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
+ _dl_debug_printf ("\nadd %s [%lu] to global scope\n",
+ map->l_name, map->l_ns);
}
}
atomic_write_barrier ();
@@ -269,10 +268,6 @@
(void) _dl_check_map_versions (new->l_searchlist.r_list[i]->l_real,
0, 0);
-#ifdef SCOPE_DEBUG
- show_scope (new);
-#endif
-
#ifdef SHARED
/* Auditing checkpoint: we have added all objects. */
if (__builtin_expect (GLRO(dl_naudit) > 0, 0))
@@ -297,6 +292,10 @@
struct r_debug *r = _dl_debug_initialize (0, args->nsid);
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+
+ /* Print scope information. */
+ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
+ _dl_show_scope (new, 0);
/* Only do lazy relocation if `LD_BIND_NOW' is not set. */
int reloc_mode = mode & __RTLD_AUDIT;
@@ -351,6 +350,7 @@
for (unsigned int i = 0; i < new->l_searchlist.r_nlist; ++i)
{
struct link_map *imap = new->l_searchlist.r_list[i];
+ int from_scope = 0;
/* If the initializer has been called already, the object has
not been loaded here and now. */
@@ -414,6 +414,9 @@
imap->l_scope[cnt + 1] = NULL;
atomic_write_barrier ();
imap->l_scope[cnt] = &new->l_searchlist;
+
+ /* Print only new scope information. */
+ from_scope = cnt;
}
/* Only add TLS memory if this object is loaded now and
therefore is not yet initialized. */
@@ -433,6 +436,10 @@
/* We have to bump the generation counter. */
any_tls = true;
}
+
+ /* Print scope information. */
+ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
+ _dl_show_scope (imap, from_scope);
}
/* Bump the generation number if necessary. */
@@ -635,33 +642,29 @@
}
-#ifdef SCOPE_DEBUG
-#include <unistd.h>
-
-static void
-show_scope (struct link_map *new)
+void
+_dl_show_scope (struct link_map *l, int from)
{
- int scope_cnt;
-
- for (scope_cnt = 0; new->l_scope[scope_cnt] != NULL; ++scope_cnt)
- {
- char numbuf[2];
- unsigned int cnt;
-
- numbuf[0] = '0' + scope_cnt;
- numbuf[1] = '\0';
- _dl_printf ("scope %s:", numbuf);
-
- for (cnt = 0; cnt < new->l_scope[scope_cnt]->r_nlist; ++cnt)
- if (*new->l_scope[scope_cnt]->r_list[cnt]->l_name)
- _dl_printf (" %s", new->l_scope[scope_cnt]->r_list[cnt]->l_name);
- else
- _dl_printf (" <main>");
-
- _dl_printf ("\n");
- }
+ _dl_debug_printf ("object=%s [%lu]\n",
+ *l->l_name ? l->l_name : rtld_progname, l->l_ns);
+ if (l->l_scope != NULL)
+ for (int scope_cnt = from; l->l_scope[scope_cnt] != NULL; ++scope_cnt)
+ {
+ _dl_debug_printf (" scope %u:", scope_cnt);
+
+ for (unsigned int cnt = 0; cnt < l->l_scope[scope_cnt]->r_nlist; ++cnt)
+ if (*l->l_scope[scope_cnt]->r_list[cnt]->l_name)
+ _dl_debug_printf_c (" %s",
+ l->l_scope[scope_cnt]->r_list[cnt]->l_name);
+ else
+ _dl_debug_printf_c (" %s", rtld_progname);
+
+ _dl_debug_printf_c ("\n");
+ }
+ else
+ _dl_debug_printf (" no scope\n");
+ _dl_debug_printf ("\n");
}
-#endif
#ifdef IS_IN_rtld
/* Return non-zero if ADDR lies within one of L's segments. */
Modified: trunk/libc/elf/elf.h
==============================================================================
--- trunk/libc/elf/elf.h (original)
+++ trunk/libc/elf/elf.h Tue Sep 6 08:08:18 2011
@@ -1338,17 +1338,6 @@
#define DT_SPARC_REGISTER 0x70000001
#define DT_SPARC_NUM 2
-
-/* Bits present in AT_HWCAP on SPARC. */
-
-#define HWCAP_SPARC_FLUSH 1 /* The CPU supports flush insn. */
-#define HWCAP_SPARC_STBAR 2
-#define HWCAP_SPARC_SWAP 4
-#define HWCAP_SPARC_MULDIV 8
-#define HWCAP_SPARC_V9 16 /* The CPU is v9, so v8plus is ok. */
-#define HWCAP_SPARC_ULTRA3 32
-#define HWCAP_SPARC_BLKINIT 64 /* Sun4v with block-init/load-twin. */
-#define HWCAP_SPARC_N2 128
/* MIPS R3000 specific definitions. */
Modified: trunk/libc/elf/pldd-xx.c
==============================================================================
--- trunk/libc/elf/pldd-xx.c (original)
+++ trunk/libc/elf/pldd-xx.c Tue Sep 6 08:08:18 2011
@@ -64,6 +64,9 @@
struct E(r_debug)
{
int r_version;
+#if CLASS == 64
+ int pad;
+#endif
EW(Addr) r_map;
};
#if CLASS == __ELF_NATIVE_CLASS
@@ -75,7 +78,8 @@
static int
-E(find_maps) (pid_t pid, EW(Ehdr) *ehdr, void *auxv, size_t auxv_size)
+
+E(find_maps) (pid_t pid, void *auxv, size_t auxv_size)
{
EW(Addr) phdr = 0;
unsigned int phnum = 0;
@@ -97,6 +101,7 @@
default:
break;
}
+ printf("progam header at offset %lu\n", (unsigned long)phdr);
if (phdr == 0 || phnum == 0 || phent == 0)
error (EXIT_FAILURE, 0, gettext ("cannot find program header of process"));
Modified: trunk/libc/elf/pldd.c
==============================================================================
--- trunk/libc/elf/pldd.c (original)
+++ trunk/libc/elf/pldd.c Tue Sep 6 08:08:18 2011
@@ -20,6 +20,8 @@
#include <alloca.h>
#include <argp.h>
+#include <assert.h>
+#include <dirent.h>
#include <elf.h>
#include <errno.h>
#include <error.h>
@@ -83,7 +85,7 @@
static char *exe;
/* Local functions. */
-static int get_process_info (pid_t pid);
+static int get_process_info (int dfd, long int pid);
int
@@ -101,33 +103,96 @@
return 1;
}
+ assert (sizeof (pid_t) == sizeof (int)
+ || sizeof (pid_t) == sizeof (long int));
char *endp;
errno = 0;
- pid_t pid = strtoul (argv[remaining], &endp, 10);
- if ((pid == ULONG_MAX && errno == ERANGE) || *endp != '\0')
+ long int pid = strtol (argv[remaining], &endp, 10);
+ if (pid < 0 || (pid == ULONG_MAX && errno == ERANGE) || *endp != '\0'
+ || (sizeof (pid_t) < sizeof (pid) && pid > INT_MAX))
error (EXIT_FAILURE, 0, gettext ("invalid process ID '%s'"),
argv[remaining]);
/* Determine the program name. */
- char buf[11 + 3 * sizeof (pid)];
- snprintf (buf, sizeof (buf), "/proc/%lu/exe", (unsigned long int) pid);
+ char buf[7 + 3 * sizeof (pid)];
+ snprintf (buf, sizeof (buf), "/proc/%lu", pid);
+ int dfd = open (buf, O_RDONLY | O_DIRECTORY);
+ if (dfd == -1)
+ error (EXIT_FAILURE, errno, gettext ("cannot open %s"), buf);
+
size_t exesize = 1024;
+#ifdef PATH_MAX
+ exesize = PATH_MAX;
+#endif
exe = alloca (exesize);
ssize_t nexe;
- while ((nexe = readlink (buf, exe, exesize)) == exesize)
+ while ((nexe = readlinkat (dfd, "exe", exe, exesize)) == exesize)
extend_alloca (exe, exesize, 2 * exesize);
if (nexe == -1)
exe = (char *) "<program name undetermined>";
else
exe[nexe] = '\0';
- if (ptrace (PTRACE_ATTACH, pid, NULL, NULL) != 0)
- error (EXIT_FAILURE, errno, gettext ("cannot attach to process %lu"),
- (unsigned long int) pid);
-
- int status = get_process_info (pid);
-
- ptrace (PTRACE_DETACH, pid, NULL, NULL);
+ /* Stop all threads since otherwise the list of loaded modules might
+ change while we are reading it. */
+ struct thread_list
+ {
+ pid_t tid;
+ struct thread_list *next;
+ } *thread_list = NULL;
+
+ int taskfd = openat (dfd, "task", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
+ if (taskfd == 1)
+ error (EXIT_FAILURE, errno, gettext ("cannot open %s/task"), buf);
+ DIR *dir = fdopendir (taskfd);
+ if (dir == NULL)
+ error (EXIT_FAILURE, errno, gettext ("cannot prepare reading %s/task"),
+ buf);
+
+ struct dirent64 *d;
+ while ((d = readdir64 (dir)) != NULL)
+ {
+ if (! isdigit (d->d_name[0]))
+ continue;
+
+ errno = 0;
+ long int tid = strtol (d->d_name, &endp, 10);
+ if (tid < 0 || (tid == ULONG_MAX && errno == ERANGE) || *endp != '\0'
+ || (sizeof (pid_t) < sizeof (pid) && tid > INT_MAX))
+ error (EXIT_FAILURE, 0, gettext ("invalid thread ID '%s'"),
+ d->d_name);
+
+ if (ptrace (PTRACE_ATTACH, tid, NULL, NULL) != 0)
+ {
+ /* There might be a race between reading the directory and
+ threads terminating. Ignore errors attaching to unknown
+ threads unless this is the main thread. */
+ if (errno == ESRCH && tid != pid)
+ continue;
+
+ error (EXIT_FAILURE, errno, gettext ("cannot attach to process %lu"),
+ tid);
+ }
+
+ struct thread_list *newp = alloca (sizeof (*newp));
+ newp->tid = tid;
+ newp->next = thread_list;
+ thread_list = newp;
+ }
+
+ closedir (dir);
+
+ int status = get_process_info (dfd, pid);
+
+ assert (thread_list != NULL);
+ do
+ {
+ ptrace (PTRACE_DETACH, thread_list->tid, NULL, NULL);
+ thread_list = thread_list->next;
+ }
+ while (thread_list != NULL);
+
+ close (dfd);
return status;
}
@@ -167,44 +232,34 @@
static int
-get_process_info (pid_t pid)
-{
- char buf[12 + 3 * sizeof (pid)];
-
- snprintf (buf, sizeof (buf), "/proc/%lu/mem", (unsigned long int) pid);
- memfd = open (buf, O_RDONLY);
+get_process_info (int dfd, long int pid)
+{
+ memfd = openat (dfd, "mem", O_RDONLY);
if (memfd == -1)
goto no_info;
- snprintf (buf, sizeof (buf), "/proc/%lu/exe", (unsigned long int) pid);
- int fd = open (buf, O_RDONLY);
+ int fd = openat (dfd, "exe", O_RDONLY);
if (fd == -1)
{
no_info:
error (0, errno, gettext ("cannot get information about process %lu"),
- (unsigned long int) pid);
+ pid);
return EXIT_FAILURE;
}
- union
- {
- Elf32_Ehdr ehdr32;
- Elf64_Ehdr ehdr64;
- } uehdr;
- if (read (fd, &uehdr, sizeof (uehdr)) != sizeof (uehdr))
+ char e_ident[EI_NIDENT];
+ if (read (fd, e_ident, EI_NIDENT) != EI_NIDENT)
goto no_info;
close (fd);
- if (memcmp (uehdr.ehdr32.e_ident, ELFMAG, SELFMAG) != 0)
- {
- error (0, 0, gettext ("process %lu is no ELF program"),
- (unsigned long int) pid);
+ if (memcmp (e_ident, ELFMAG, SELFMAG) != 0)
+ {
+ error (0, 0, gettext ("process %lu is no ELF program"), pid);
return EXIT_FAILURE;
}
- snprintf (buf, sizeof (buf), "/proc/%lu/auxv", (unsigned long int) pid);
- fd = open (buf, O_RDONLY);
+ fd = openat (dfd, "auxv", O_RDONLY);
if (fd == -1)
goto no_info;
@@ -215,7 +270,7 @@
auxv_size += 512;
auxv = xrealloc (auxv, auxv_size);
- ssize_t n = read (fd, auxv, auxv_size);
+ ssize_t n = pread (fd, auxv, auxv_size, 0);
if (n < 0)
goto no_info;
if (n < auxv_size)
@@ -227,8 +282,14 @@
close (fd);
- if (uehdr.ehdr32.e_ident[EI_CLASS] == ELFCLASS32)
- return find_maps32 (pid, &uehdr.ehdr32, auxv, auxv_size);
+ int retval;
+ if (e_ident[EI_CLASS] == ELFCLASS32)
+ retval = find_maps32 (pid, auxv, auxv_size);
else
- return find_maps64 (pid, &uehdr.ehdr64, auxv, auxv_size);
-}
+ retval = find_maps64 (pid, auxv, auxv_size);
+
+ free (auxv);
+ close (memfd);
+
+ return retval;
+}
Modified: trunk/libc/elf/rtld.c
==============================================================================
--- trunk/libc/elf/rtld.c (original)
+++ trunk/libc/elf/rtld.c Tue Sep 6 08:08:18 2011
@@ -1392,7 +1392,7 @@
char *copy = malloc (len);
if (copy == NULL)
_dl_fatal_printf ("out of memory\n");
- l->l_libname->name = memcpy (copy, dsoname, len);
+ l->l_libname->name = l->l_name = memcpy (copy, dsoname, len);
}
/* Add the vDSO to the object list. */
@@ -2192,6 +2192,15 @@
malloc will no longer be the one from dl-minimal.c. */
GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
+ /* Print scope information. */
+ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
+ {
+ _dl_debug_printf ("\nInitial object scopes\n");
+
+ for (struct link_map *l = main_map; l != NULL; l = l->l_next)
+ _dl_show_scope (l, 0);
+ }
+
if (prelinked)
{
if (main_map->l_info [ADDRIDX (DT_GNU_CONFLICT)] != NULL)
@@ -2247,13 +2256,12 @@
/* If we are profiling we also must do lazy reloaction. */
GLRO(dl_lazy) |= consider_profiling;
- struct link_map *l = main_map;
- while (l->l_next)
- l = l->l_next;
-
HP_TIMING_NOW (start);
- do
+ unsigned i = main_map->l_searchlist.r_nlist;
+ while (i-- > 0)
{
+ struct link_map *l = main_map->l_initfini[i];
+
/* While we are at it, help the memory handling a bit. We have to
mark some data structures as allocated with the fake malloc()
implementation in ld.so. */
@@ -2272,10 +2280,7 @@
/* Add object to slot information data if necessasy. */
if (l->l_tls_blocksize != 0 && tls_init_tp_called)
_dl_add_to_slotinfo (l);
-
- l = l->l_prev;
}
- while (l);
HP_TIMING_NOW (stop);
HP_TIMING_DIFF (relocate_time, start, stop);
@@ -2433,9 +2438,12 @@
DL_DEBUG_BINDINGS | DL_DEBUG_IMPCALLS },
{ LEN_AND_STR ("versions"), "display version dependencies",
DL_DEBUG_VERSIONS | DL_DEBUG_IMPCALLS },
+ { LEN_AND_STR ("scopes"), "display scope information",
+ DL_DEBUG_SCOPES },
{ LEN_AND_STR ("all"), "all previous options combined",
DL_DEBUG_LIBS | DL_DEBUG_RELOC | DL_DEBUG_FILES | DL_DEBUG_SYMBOLS
- | DL_DEBUG_BINDINGS | DL_DEBUG_VERSIONS | DL_DEBUG_IMPCALLS },
+ | DL_DEBUG_BINDINGS | DL_DEBUG_VERSIONS | DL_DEBUG_IMPCALLS
+ | DL_DEBUG_SCOPES },
{ LEN_AND_STR ("statistics"), "display relocation statistics",
DL_DEBUG_STATISTICS },
{ LEN_AND_STR ("unused"), "determined unused DSOs",
Modified: trunk/libc/include/dirent.h
==============================================================================
--- trunk/libc/include/dirent.h (original)
+++ trunk/libc/include/dirent.h Tue Sep 6 08:08:18 2011
@@ -4,8 +4,16 @@
# include <sys/stat.h>
# include <stdbool.h>
+struct scandir_cancel_struct
+{
+ DIR *dp;
+ void *v;
+ size_t cnt;
+};
+
/* Now define the internal interfaces. */
extern DIR *__opendir (__const char *__name);
+extern DIR *__opendirat (int dfd, __const char *__name) internal_function;
extern DIR *__fdopendir (int __fd);
extern int __closedir (DIR *__dirp);
extern struct dirent *__readdir (DIR *__dirp);
@@ -31,7 +39,10 @@
extern DIR *__alloc_dir (int fd, bool close_fd, int flags,
const struct stat64 *statp)
internal_function;
+extern void __scandir_cancel_handler (void *arg);
libc_hidden_proto (rewinddir)
+libc_hidden_proto (scandirat)
+libc_hidden_proto (scandirat64)
#endif
Modified: trunk/libc/intl/l10nflist.c
==============================================================================
--- trunk/libc/intl/l10nflist.c (original)
+++ trunk/libc/intl/l10nflist.c Tue Sep 6 08:08:18 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2002, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2004, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxxxxxx>, 1995.
@@ -134,7 +134,7 @@
if (entry)
{
if (entry < argz + argz_len)
- entry = strchr (entry, '\0') + 1;
+ entry = strchr (entry, '\0') + 1;
return entry >= argz + argz_len ? NULL : (char *) entry;
}
@@ -150,6 +150,7 @@
/* Return number of bits set in X. */
+#ifndef ARCH_POP
static int pop PARAMS ((int x));
static inline int
@@ -164,6 +165,7 @@
return x;
}
+#endif
struct loaded_l10nfile *
@@ -332,13 +334,18 @@
char *retval;
char *wp;
size_t cnt;
+#ifdef NOT_IN_libc
+ locale_t locale = newlocale (0, "C", NULL);
+#else
+# define locale _nl_C_locobj_ptr
+#endif
for (cnt = 0; cnt < name_len; ++cnt)
- if (isalnum ((unsigned char) codeset[cnt]))
+ if (__isalnum_l ((unsigned char) codeset[cnt], locale))
{
++len;
- if (isalpha ((unsigned char) codeset[cnt]))
+ if (! __isdigit_l ((unsigned char) codeset[cnt], locale))
only_digit = 0;
}
@@ -346,15 +353,14 @@
if (retval != NULL)
{
+ wp = retval;
if (only_digit)
- wp = stpcpy (retval, "iso");
- else
- wp = retval;
+ wp = stpcpy (wp, "iso");
for (cnt = 0; cnt < name_len; ++cnt)
- if (isalpha ((unsigned char) codeset[cnt]))
- *wp++ = tolower ((unsigned char) codeset[cnt]);
- else if (isdigit ((unsigned char) codeset[cnt]))
+ if (__isalpha_l ((unsigned char) codeset[cnt], locale))
+ *wp++ = __tolower_l ((unsigned char) codeset[cnt], locale);
+ else if (__isdigit_l ((unsigned char) codeset[cnt], locale))
*wp++ = codeset[cnt];
*wp = '\0';
Modified: trunk/libc/libio/fileops.c
==============================================================================
--- trunk/libc/libio/fileops.c (original)
+++ trunk/libc/libio/fileops.c Tue Sep 6 08:08:18 2011
@@ -346,23 +346,22 @@
result = _IO_file_open (fp, filename, omode|oflags, oprot, read_write,
is32not64);
+ if (result != NULL)
+ {
#ifndef __ASSUME_O_CLOEXEC
- if ((fp->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 && __have_o_cloexec <= 0)
- {
- int fd = _IO_fileno (fp);
- if (__have_o_cloexec == 0)
- {
- int flags = __fcntl (fd, F_GETFD);
- __have_o_cloexec = (flags & FD_CLOEXEC) == 0 ? -1 : 1;
- }
- if (__have_o_cloexec < 0)
- __fcntl (fd, F_SETFD, FD_CLOEXEC);
- }
-#endif
-
-#ifdef _LIBC
- if (result != NULL)
- {
+ if ((fp->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 && __have_o_cloexec <= 0)
+ {
+ int fd = _IO_fileno (fp);
+ if (__have_o_cloexec == 0)
+ {
+ int flags = __fcntl (fd, F_GETFD);
+ __have_o_cloexec = (flags & FD_CLOEXEC) == 0 ? -1 : 1;
+ }
+ if (__have_o_cloexec < 0)
+ __fcntl (fd, F_SETFD, FD_CLOEXEC);
+ }
+#endif
+
/* Test whether the mode string specifies the conversion. */
cs = strstr (last_recognized + 1, ",ccs=");
if (cs != NULL)
@@ -440,7 +439,6 @@
#endif
}
}
-#endif /* GNU libc */
return result;
}
Modified: trunk/libc/libio/stdio.h
==============================================================================
--- trunk/libc/libio/stdio.h (original)
+++ trunk/libc/libio/stdio.h Tue Sep 6 08:08:18 2011
@@ -118,7 +118,7 @@
#endif
/* The possibilities for the third argument to `setvbuf'. */
-#define _IOFBF 0 /* Fully buffered. */
+#define _IOFBF 0 /* Fully buffered. */
#define _IOLBF 1 /* Line buffered. */
#define _IONBF 2 /* No buffering. */
@@ -141,6 +141,10 @@
#define SEEK_SET 0 /* Seek from beginning of file. */
#define SEEK_CUR 1 /* Seek from current position. */
#define SEEK_END 2 /* Seek from end of file. */
+#ifdef __USE_GNU
+# define SEEK_DATA 3 /* Seek to next data. */
+# define SEEK_HOLE 4 /* Seek to next hole. */
+#endif
#if defined __USE_SVID || defined __USE_XOPEN
@@ -152,7 +156,7 @@
/* Get the values:
L_tmpnam How long an array of chars must be to be passed to `tmpnam'.
TMP_MAX The minimum number of unique filenames generated by tmpnam
- (and tempnam when it uses tmpnam's name space),
+ (and tempnam when it uses tmpnam's name space),
or tempnam (the two are separate).
L_ctermid How long an array to pass to `ctermid'.
L_cuserid How long an array to pass to `cuserid'.
Modified: trunk/libc/locale/Makefile
==============================================================================
--- trunk/libc/locale/Makefile (original)
+++ trunk/libc/locale/Makefile Tue Sep 6 08:08:18 2011
@@ -1,4 +1,5 @@
-# Copyright (C) 1991,1992,1995-2003,2005,2009 Free Software Foundation, Inc.
+# Copyright (C) 1991,1992,1995-2003,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
@@ -75,10 +76,11 @@
vpath %.h programs
vpath %.gperf programs
-localedef-modules := $(categories:%=ld-%) charmap linereader locfile \
+localedef-modules := localedef $(categories:%=ld-%) \
+ charmap linereader locfile \
repertoire locarchive
localedef-aux := md5
-locale-modules := locale-spec
+locale-modules := locale locale-spec
lib-modules := charmap-dir simple-hash xmalloc xstrdup
@@ -106,13 +108,18 @@
localepath = "$(localedir):$(i18ndir)"
-locale-CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
- -DLOCALEDIR='"$(localedir)"' \
- -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
- -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
- -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
- -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
- -Iprograms
+# -Iprograms doesn't really belong here, but this gets it at the head
+# of the list instead of the tail, where CPPFLAGS-$(lib) gets added.
+# We need it before the standard -I's to see programs/config.h first.
+locale-CPPFLAGS = -DLOCALEDIR='"$(localedir)"' \
+ -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
+ -Iprograms
+
+CPPFLAGS-locale-programs = -DLOCALE_PATH='$(localepath)' \
+ -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
+ -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
+ -DLOCSRCDIR='"$(i18ndir)/locales"' \
+ -DHAVE_CONFIG_H -DNOT_IN_libc
CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
@@ -121,10 +128,10 @@
CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS
endif
-# This makes sure -DNOT_IN_libc is passed for all these modules.
+# This makes sure -DNOT_IN_libc et al are passed for all these modules.
cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
$(locale-modules) $(lib-modules))
-lib := nonlib
+lib := locale-programs
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Tue Sep 6 08:08:18 2011
@@ -1,3 +1,46 @@
+2011-09-05 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
+ New function.
+ (sem_timedwait): Call it to force an exception region around
+ the async cancel enable and the futex operation.
+ * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
+ * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
+ (__new_sem_wait): Call it to force an exception region around
+ the async cancel enable and the futex operation.
+ * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
+
+2011-08-31 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * allocatestack.c (setxid_mark_thread): Ensure that the exiting
+ thread is woken up.
+
+2011-08-20 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * Makefile (tst-cleanup0.out): Fix typo in output redirection.
+
+2011-08-14 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
+ * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
+
+2011-08-08 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
+ stack.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
+
+2011-07-22 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
+ barrier.
+ (__gcc_personality_v0): Likewise.
+ (_Unwind_ForcedUnwind): Likewise.
+ (_Unwind_GetCFA): Likewise.
+
2011-07-14 Roland McGrath <roland@xxxxxxxxxxxxx>
* allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
Modified: trunk/libc/nptl/Makefile
==============================================================================
--- trunk/libc/nptl/Makefile (original)
+++ trunk/libc/nptl/Makefile Tue Sep 6 08:08:18 2011
@@ -570,7 +570,7 @@
$(patsubst -f%,-fno-%,$(exceptions)) -o $@
$(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0
- $(make-test-out) 2>&1 | cmp - tst-cleanup0.expect > $@ 2>&1
+ $(make-test-out) 2>&1 | cmp - tst-cleanup0.expect > $@
# We only have one kind of startup code files. Static binaries and
# shared libraries are build using the PIC version.
Modified: trunk/libc/nptl/allocatestack.c
==============================================================================
--- trunk/libc/nptl/allocatestack.c (original)
+++ trunk/libc/nptl/allocatestack.c Tue Sep 6 08:08:18 2011
@@ -999,7 +999,16 @@
/* If the thread is exiting right now, ignore it. */
if ((ch & EXITING_BITMASK) != 0)
- return;
+ {
+ /* Release the futex if there is no other setxid in
+ progress. */
+ if ((ch & SETXID_BITMASK) == 0)
+ {
+ t->setxid_futex = 1;
+ lll_futex_wake (&t->setxid_futex, 1, LLL_PRIVATE);
+ }
+ return;
+ }
}
while (atomic_compare_and_exchange_bool_acq (&t->cancelhandling,
ch | SETXID_BITMASK, ch));
Modified: trunk/libc/nptl/sysdeps/i386/pthreaddef.h
==============================================================================
--- trunk/libc/nptl/sysdeps/i386/pthreaddef.h (original)
+++ trunk/libc/nptl/sysdeps/i386/pthreaddef.h Tue Sep 6 08:08:18 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -27,8 +27,14 @@
/* Minimal stack size after allocating thread descriptor and guard size. */
#define MINIMAL_REST_STACK 2048
-/* Alignment requirement for TCB. */
-#define TCB_ALIGNMENT 16
+/* Alignment requirement for TCB.
+
+ Some processors such as Intel Atom pay a big penalty on every
+ access using a segment override if that segment's base is not
+ aligned to the size of a cache line. (See Intel 64 and IA-32
+ Architectures Optimization Reference Manual, section 13.3.3.3,
+ "Segment Base".) On such machines, a cache line is 64 bytes. */
+#define TCB_ALIGNMENT 64
/* Location of current stack frame. */
Modified: trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c
==============================================================================
--- trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c (original)
+++ trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c Tue Sep 6 08:08:18 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2005, 2006, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>.
@@ -96,6 +96,8 @@
{
if (__builtin_expect (libgcc_s_handle == NULL, 0))
pthread_cancel_init ();
+ else
+ atomic_read_barrier ();
void (*resume) (struct _Unwind_Exception *exc) = libgcc_s_resume;
PTR_DEMANGLE (resume);
@@ -105,11 +107,13 @@
_Unwind_Reason_Code
__gcc_personality_v0 (int version, _Unwind_Action actions,
_Unwind_Exception_Class exception_class,
- struct _Unwind_Exception *ue_header,
- struct _Unwind_Context *context)
+ struct _Unwind_Exception *ue_header,
+ struct _Unwind_Context *context)
{
if (__builtin_expect (libgcc_s_handle == NULL, 0))
pthread_cancel_init ();
+ else
+ atomic_read_barrier ();
_Unwind_Reason_Code (*personality)
(int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
@@ -124,6 +128,8 @@
{
if (__builtin_expect (libgcc_s_handle == NULL, 0))
pthread_cancel_init ();
+ else
+ atomic_read_barrier ();
_Unwind_Reason_Code (*forcedunwind)
(struct _Unwind_Exception *, _Unwind_Stop_Fn, void *)
@@ -137,6 +143,8 @@
{
if (__builtin_expect (libgcc_s_handle == NULL, 0))
pthread_cancel_init ();
+ else
+ atomic_read_barrier ();
_Unwind_Word (*getcfa) (struct _Unwind_Context *) = libgcc_s_getcfa;
PTR_DEMANGLE (getcfa);
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c Tue Sep 6 08:08:18 2011
@@ -30,6 +30,21 @@
extern void __sem_wait_cleanup (void *arg) attribute_hidden;
+/* This is in a seperate function in order to make sure gcc
+ puts the call site into an exception region, and thus the
+ cleanups get properly run. */
+static int
+__attribute__ ((noinline))
+do_futex_timed_wait (struct new_sem *isem, struct timespec *rt)
+{
+ int err, oldtype = __pthread_enable_asynccancel ();
+
+ err = lll_futex_timed_wait (&isem->value, 0, rt,
+ isem->private ^ FUTEX_PRIVATE_FLAG);
+
+ __pthread_disable_asynccancel (oldtype);
+ return err;
+}
int
sem_timedwait (sem_t *sem, const struct timespec *abstime)
@@ -80,16 +95,7 @@
/* Do wait. */
rt.tv_sec = sec;
rt.tv_nsec = nsec;
-
- /* Enable asynchronous cancellation. Required by the standard. */
- int oldtype = __pthread_enable_asynccancel ();
-
- err = lll_futex_timed_wait (&isem->value, 0, &rt,
- isem->private ^ FUTEX_PRIVATE_FLAG);
-
- /* Disable asynchronous cancellation. */
- __pthread_disable_asynccancel (oldtype);
-
+ err = do_futex_timed_wait(isem, &rt);
if (err != 0 && err != -EWOULDBLOCK)
{
__set_errno (-err);
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/sem_wait.c
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/sem_wait.c (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/sem_wait.c Tue Sep 6 08:08:18 2011
@@ -37,6 +37,20 @@
atomic_decrement (&isem->nwaiters);
}
+/* This is in a seperate function in order to make sure gcc
+ puts the call site into an exception region, and thus the
+ cleanups get properly run. */
+static int
+__attribute__ ((noinline))
+do_futex_wait (struct new_sem *isem)
+{
+ int err, oldtype = __pthread_enable_asynccancel ();
+
+ err = lll_futex_wait (&isem->value, 0, isem->private ^ FUTEX_PRIVATE_FLAG);
+
+ __pthread_disable_asynccancel (oldtype);
+ return err;
+}
int
__new_sem_wait (sem_t *sem)
@@ -53,15 +67,7 @@
while (1)
{
- /* Enable asynchronous cancellation. Required by the standard. */
- int oldtype = __pthread_enable_asynccancel ();
-
- err = lll_futex_wait (&isem->value, 0,
- isem->private ^ FUTEX_PRIVATE_FLAG);
-
- /* Disable asynchronous cancellation. */
- __pthread_disable_asynccancel (oldtype);
-
+ err = do_futex_wait(isem);
if (err != 0 && err != -EWOULDBLOCK)
{
__set_errno (-err);
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_timedwait.c
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_timedwait.c Tue Sep 6 08:08:18 2011
@@ -30,6 +30,21 @@
extern void __sem_wait_cleanup (void *arg) attribute_hidden;
+/* This is in a seperate function in order to make sure gcc
+ puts the call site into an exception region, and thus the
+ cleanups get properly run. */
+static int
+__attribute__ ((noinline))
+do_futex_timed_wait (struct sparc_new_sem *isem, struct timespec *rt)
+{
+ int err, oldtype = __pthread_enable_asynccancel ();
+
+ err = lll_futex_timed_wait (&isem->value, 0, rt,
+ isem->private ^ FUTEX_PRIVATE_FLAG);
+
+ __pthread_disable_asynccancel (oldtype);
+ return err;
+}
int
sem_timedwait (sem_t *sem, const struct timespec *abstime)
@@ -80,16 +95,7 @@
/* Do wait. */
rt.tv_sec = sec;
rt.tv_nsec = nsec;
-
- /* Enable asynchronous cancellation. Required by the standard. */
- int oldtype = __pthread_enable_asynccancel ();
-
- err = lll_futex_timed_wait (&isem->value, 0, &rt,
- isem->private ^ FUTEX_PRIVATE_FLAG);
-
- /* Disable asynchronous cancellation. */
- __pthread_disable_asynccancel (oldtype);
-
+ err = do_futex_timed_wait(isem, &rt);
if (err != 0 && err != -EWOULDBLOCK)
{
__set_errno (-err);
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_wait.c
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_wait.c (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_wait.c Tue Sep 6 08:08:18 2011
@@ -37,6 +37,20 @@
atomic_decrement (&isem->nwaiters);
}
+/* This is in a seperate function in order to make sure gcc
+ puts the call site into an exception region, and thus the
+ cleanups get properly run. */
+static int
+__attribute__ ((noinline))
+do_futex_wait (struct sparc_new_sem *isem)
+{
+ int err, oldtype = __pthread_enable_asynccancel ();
+
+ err = lll_futex_wait (&isem->value, 0, isem->private ^ FUTEX_PRIVATE_FLAG);
+
+ __pthread_disable_asynccancel (oldtype);
+ return err;
+}
int
__new_sem_wait (sem_t *sem)
@@ -53,15 +67,7 @@
while (1)
{
- /* Enable asynchronous cancellation. Required by the standard. */
- int oldtype = __pthread_enable_asynccancel ();
-
- err = lll_futex_wait (&isem->value, 0,
- isem->private ^ FUTEX_PRIVATE_FLAG);
-
- /* Disable asynchronous cancellation. */
- __pthread_disable_asynccancel (oldtype);
-
+ err = do_futex_wait(isem);
if (err != 0 && err != -EWOULDBLOCK)
{
__set_errno (-err);
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c Tue Sep 6 08:08:18 2011
@@ -30,6 +30,21 @@
extern void __sem_wait_cleanup (void *arg) attribute_hidden;
+/* This is in a seperate function in order to make sure gcc
+ puts the call site into an exception region, and thus the
+ cleanups get properly run. */
+static int
+__attribute__ ((noinline))
+do_futex_timed_wait (struct sparc_new_sem *isem, struct timespec *rt)
+{
+ int err, oldtype = __pthread_enable_asynccancel ();
+
+ err = lll_futex_timed_wait (&isem->value, 0, rt,
+ isem->private ^ FUTEX_PRIVATE_FLAG);
+
+ __pthread_disable_asynccancel (oldtype);
+ return err;
+}
int
sem_timedwait (sem_t *sem, const struct timespec *abstime)
@@ -99,16 +114,7 @@
/* Do wait. */
rt.tv_sec = sec;
rt.tv_nsec = nsec;
-
- /* Enable asynchronous cancellation. Required by the standard. */
- int oldtype = __pthread_enable_asynccancel ();
-
- err = lll_futex_timed_wait (&isem->value, 0, &rt,
- isem->private ^ FUTEX_PRIVATE_FLAG);
-
- /* Disable asynchronous cancellation. */
- __pthread_disable_asynccancel (oldtype);
-
+ err = do_futex_timed_wait(isem, &rt);
if (err != 0 && err != -EWOULDBLOCK)
{
__set_errno (-err);
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c Tue Sep 6 08:08:18 2011
@@ -44,6 +44,20 @@
}
}
+/* This is in a seperate function in order to make sure gcc
+ puts the call site into an exception region, and thus the
+ cleanups get properly run. */
+static int
+__attribute__ ((noinline))
+do_futex_wait (struct sparc_new_sem *isem)
+{
+ int err, oldtype = __pthread_enable_asynccancel ();
+
+ err = lll_futex_wait (&isem->value, 0, isem->private ^ FUTEX_PRIVATE_FLAG);
+
+ __pthread_disable_asynccancel (oldtype);
+ return err;
+}
int
__new_sem_wait (sem_t *sem)
@@ -77,15 +91,7 @@
while (1)
{
- /* Enable asynchronous cancellation. Required by the standard. */
- int oldtype = __pthread_enable_asynccancel ();
-
- err = lll_futex_wait (&isem->value, 0,
- isem->private ^ FUTEX_PRIVATE_FLAG);
-
- /* Disable asynchronous cancellation. */
- __pthread_disable_asynccancel (oldtype);
-
+ err = do_futex_wait(isem);
if (err != 0 && err != -EWOULDBLOCK)
{
__set_errno (-err);
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S Tue Sep 6 08:08:18 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2009.
@@ -71,7 +71,9 @@
1: ret
-3: movq $TCB_PTHREAD_CANCELED, %fs:RESULT
+3: subq $8, %rsp
+ cfi_adjust_cfa_offset(8)
+ movq $TCB_PTHREAD_CANCELED, %fs:RESULT
lock
orl $TCB_EXITING_BITMASK, %fs:CANCELHANDLING
movq %fs:CLEANUP_JMP_BUF, %rdi
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S Tue Sep 6 08:08:18 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -63,9 +63,9 @@
cfi_adjust_cfa_offset(8)
cfi_rel_offset(%r15, 0)
#ifdef __ASSUME_FUTEX_CLOCK_REALTIME
-# define FRAME_SIZE 32
-#else
-# define FRAME_SIZE 48
+# define FRAME_SIZE (32+8)
+#else
+# define FRAME_SIZE (48+8)
#endif
subq $FRAME_SIZE, %rsp
cfi_adjust_cfa_offset(FRAME_SIZE)
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S Tue Sep 6 08:08:18 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -45,7 +45,7 @@
cfi_lsda(DW_EH_PE_udata4, .LexceptSTART)
#endif
-#define FRAME_SIZE 32
+#define FRAME_SIZE (32+8)
leaq -FRAME_SIZE(%rsp), %rsp
cfi_adjust_cfa_offset(FRAME_SIZE)
Modified: trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h
==============================================================================
--- trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h (original)
+++ trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h Tue Sep 6 08:08:18 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2007,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -27,9 +27,17 @@
/* Minimal stack size after allocating thread descriptor and guard size. */
#define MINIMAL_REST_STACK 2048
-/* Alignment requirement for TCB. Need to store post-AVX vector registers
- in the TCB and we want the storage to be aligned at 32-byte. */
-#define TCB_ALIGNMENT 32
+/* Alignment requirement for TCB.
+
+ We need to store post-AVX vector registers in the TCB and we want the
+ storage to be aligned to at least 32 bytes.
+
+ Some processors such as Intel Atom pay a big penalty on every
+ access using a segment override if that segment's base is not
+ aligned to the size of a cache line. (See Intel 64 and IA-32
+ Architectures Optimization Reference Manual, section 13.3.3.3,
+ "Segment Base".) On such machines, a cache line is 64 bytes. */
+#define TCB_ALIGNMENT 64
/* Location of current stack frame. The frame pointer is not usable. */
Modified: trunk/libc/nscd/servicescache.c
==============================================================================
--- trunk/libc/nscd/servicescache.c (original)
+++ trunk/libc/nscd/servicescache.c Tue Sep 6 08:08:18 2011
@@ -102,7 +102,7 @@
{
/* We have no data. This means we send the standard reply for this
case. */
- total = sizeof (notfound);
+ written = total = sizeof (notfound);
if (fd != -1)
written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
Modified: trunk/libc/nss/makedb.c
==============================================================================
--- trunk/libc/nss/makedb.c (original)
+++ trunk/libc/nss/makedb.c Tue Sep 6 08:08:18 2011
@@ -622,7 +622,8 @@
valstrtab[valstrlen++] = '\0';
twalk (valstrtree, copy_valstr);
- for (struct database *db = databases; db != NULL; db = db->next)
+ static struct database *db;
+ for (db = databases; db != NULL; db = db->next)
if (db->nentries != 0)
{
++ndatabases;
@@ -643,10 +644,10 @@
db->keyidxtab = db->hashtable + nhashentries_max;
db->keystrtab = (char *) (db->keyidxtab + nhashentries_max);
- size_t max_chainlength;
- char *wp;
- size_t nhashentries;
- bool copy_string = false;
+ static size_t max_chainlength;
+ static char *wp;
+ static size_t nhashentries;
+ static bool copy_string;
void add_key(const void *nodep, const VISIT which, const int depth)
{
@@ -682,6 +683,7 @@
max_chainlength = MAX (max_chainlength, chainlength);
}
+ copy_string = false;
nhashentries = nhashentries_min;
for (size_t cnt = 0; cnt < TEST_RANGE; ++cnt)
{
Modified: trunk/libc/nss/nss_files/files-alias.c
==============================================================================
--- trunk/libc/nss/nss_files/files-alias.c (original)
+++ trunk/libc/nss/nss_files/files-alias.c Tue Sep 6 08:08:18 2011
@@ -1,5 +1,5 @@
/* Mail alias file parser in nss_files module.
- Copyright (C) 1996,97,98,99,2002,2006,2007 Free Software Foundation, Inc.
+ Copyright (C) 1996-1999,2002,2006,2007,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1996.
@@ -166,7 +166,7 @@
char *line;
/* Check whether the buffer is large enough for even trying to
[... 5469 lines stripped ...]