about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
* * sysdeps/mips/strcmp.S: New.Steve Ellcey2014-10-011-0/+249
|
* Move some *at definitions to syscalls.list (bug 14138).Joseph Myers2014-09-308-272/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the move of syscall definitions to syscalls.list, where the removal of support for old kernel versions has made this possible, this patch moves definitions of various *at functions in sysdeps/unix/sysv/linux/. These particular moves are straightforward: there are no #includes of these source files, no special architecture-specific versions, no special symbol version handling and no aliases. Each source file can be replaced by a single line in sysdeps/unix/sysv/linux/syscalls.list. Tested for x86_64. [BZ #14138] * sysdeps/unix/sysv/linux/syscalls.list (fchownat): New syscall. (linkat): Likewise. (mkdirat): Likewise. (readlinkat): Likewise. (renameat): Likewise. (symlinkat): Likewise. (unlinkat): Likewise. * sysdeps/unix/sysv/linux/fchownat.c: Remove file. * sysdeps/unix/sysv/linux/linkat.c: Likewise. * sysdeps/unix/sysv/linux/mkdirat.c: Likewise. * sysdeps/unix/sysv/linux/readlinkat.c: Likewise. * sysdeps/unix/sysv/linux/renameat.c: Likewise. * sysdeps/unix/sysv/linux/symlinkat.c: Likewise. * sysdeps/unix/sysv/linux/unlinkat.c: Likewise.
* Run tst-ld-sse-use.sh with bash.Joseph Myers2014-09-291-1/+1
| | | | | | | | | | | | | | tst-ld-sse-use.sh is a bash script, not a POSIX shell script, and so needs to be run with $(BASH) not $(SHELL) to avoid errors of the form: ../sysdeps/x86/tst-ld-sse-use.sh: 41: ../sysdeps/x86/tst-ld-sse-use.sh: declare: not found (when /bin/sh is dash). This patch makes that change. Tested for x86_64. * sysdeps/x86/Makefile ($(objpfx)tst-ld-sse-use.out): Run script with $(BASH) not $(SHELL).
* Require autoconf 2.69H.J. Lu2014-09-2912-17/+23
| | | | | | | | | | | | | | | | | | | * aclocal.m4: Require autoconf 2.69. * configure: Regenerated. * sysdeps/aarch64/configure: Likewise. * sysdeps/alpha/configure: Likewise. * sysdeps/arm/armv7/configure: Likewise. * sysdeps/arm/configure: Likewise. * sysdeps/ia64/configure: Likewise. * sysdeps/mach/configure: Likewise. * sysdeps/mips/configure: Likewise. * sysdeps/s390/configure: Likewise. * sysdeps/unix/sysv/linux/mips/configure: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/configure: Likewise. * sysdeps/alpha/configure.ac: Avoid empty lines at the end of file. * sysdeps/ia64/configure.ac: Likewise.
* Remove shlib-versions entries redundant with DEFAULT entries.Joseph Myers2014-09-264-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a shlib-versions file has a DEFAULT line, it's not necessary to specify the same default minimum symbol version on the lines for individual libraries. If those lines otherwise duplicate the default SONAME for the library in question, they can be removed completely. This patch makes such cleanups: version entries for ld.so are removed (leaving just the definition of the architecture-specific dynamic linker name) and entries for libpthread are removed completely (since the default is libpthread.so.0). Tested for x86_64 that the installed shared libraries are unchanged by this patch. There are various architectures (hppa, ia64, mips, sh, sparc64) that define minimum symbol versions (or in the case of mips, omission of symbol versions) only for particular libraries without a DEFAULT line. None of these are equivalent to something simpler with a DEFAULT line because all have some other libraries, not explicitly mentioned, with symbol versions that would be omitted were such a line used. In the mips case I'm pretty sure it was a mistake not to omit the 2.1 symbols for libthread_db; for the others I don't know if it was a mistake or deliberate that some symbols in various libraries have 2.0 or 2.1 versions despite other libraries having a 2.2 minimum. This concludes the shlib-versions cleanups I'm aware of. * sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: Do not specify symbol version for ld.so. Do not include entry for libpthread. * sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Likewise.
* Clean up gnu/lib-names.h generation (bug 14171).Joseph Myers2014-09-2611-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch eliminates the mixture of SONAME information in shlib-versions files and SONAME information used to generate gnu/lib-names.h in makefiles, with the information in the makefiles being removed so all this information comes from the shlib-versions files. So that gnu/lib-names.h supports multiple ABIs, it is changed to be generated on the same basis as gnu/stubs.h: when there are multiple ABIs, gnu/lib-names.h is a wrapper header (the same header installed whatever ABI is being built) and separate headers such as gnu/lib-names-64.h contain the substantive contents (only one such header being installed by any glibc build). The rules for building gnu/lib-names.h were moved from Makeconfig to Makerules because they need to come after sysdeps makefiles are included (now that "ifndef abi-variants" is a toplevel conditional on the rules rather than $(abi-variants) being evaluated later inside the commands for a rule). Tested for x86_64 and x86 that the installed shared libraries are unchanged by this patch, and examined the installed gnu/lib-names*.h headers by hand. Also tested the case of a single ABI (where there is just a single header installed, again like stubs.h) by hacking abi-variants to empty for x86_64. [BZ #14171] * Makeconfig [$(build-shared) = yes] ($(common-objpfx)soversions.mk): Don't handle SONAMEs specified in makefiles. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)gnu/lib-names.h): Remove rule. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)gnu/lib-names.stmp): Likewise. Split and moved to Makerules. [$(build-shared) = yes && $(soversions.mk-done) = t] (before-compile): Don't append $(common-objpfx)gnu/lib-names.h here. [$(build-shared) = yes && $(soversions.mk-done) = t] (common-generated): Don't append gnu/lib-names.h and gnu/lib-names.stmp here. * Makerules [$(build-shared) = yes && $(soversions.mk-done) = t] (lib-names-h-abi): New variable. [$(build-shared) = yes && $(soversions.mk-done) = t] (lib-names-stmp-abi): Likewise. [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] (before-compile): Append $(common-objpfx)$(lib-names-h-abi). [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] (common-generated): Append gnu/lib-names.h. [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] (install-others-nosubdir): Depend on $(inst_includedir)/$(lib-names-h-abi). [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] ($(common-objpfx)gnu/lib-names.h): New rule. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)$(lib-names-h-abi)): New rule. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)$(lib-names-stmp-abi)): Likewise. [$(build-shared) = yes && $(soversions.mk-done) = t] (common-generated): Append $(lib-names-h-abi) and $(lib-names-stmp-abi). * scripts/lib-names.awk: Do not handle multi being set. * sysdeps/unix/sysv/linux/aarch64/Makefile (abi-lp64-ld-soname): Remove variable. (abi-lp64_be-ld-soname): Likewise. * sysdeps/unix/sysv/linux/arm/Makefile (abi-soft-ld-soname): Likewise. (abi-hard-ld-soname): Likewise. * sysdeps/unix/sysv/linux/i386/shlib-versions: New file. * sysdeps/unix/sysv/linux/mips/Makefile (abi-o32_soft-ld-soname): Remove variable. (abi-o32_hard-ld-soname): Likewise. (abi-o32_soft_2008-ld-soname): Likewise. (abi-o32_hard_2008-ld-soname): Likewise. (abi-n32_soft-ld-soname): Likewise. (abi-n32_hard-ld-soname): Likewise. (abi-n32_soft_2008-ld-soname): Likewise. (abi-n32_hard_2008-ld-soname): Likewise. (abi-n64_soft-ld-soname): Likewise. (abi-n64_hard-ld-soname): Likewise. (abi-n64_soft_2008-ld-soname): Likewise. (abi-n64_hard_2008-ld-soname): Likewise. * sysdeps/unix/sysv/linux/powerpc/Makefile (abi-64-v1-ld-soname): Likewise. (abi-64-v2-ld-soname): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: Add ld.so entries. * sysdeps/unix/sysv/linux/s390/Makefile (abi-64-ld-soname): Remove variable. * sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Add ld.so entry. * sysdeps/unix/sysv/linux/x86/Makefile (abi-32-ld-soname): Remove variable. (abi-64-ld-soname): Likewise. (abi-x32-ld-soname): Likewise. * sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Add ld.so entry. * sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Likewise.
* Move some setrlimit definitions to syscalls.list (bug 14138).Joseph Myers2014-09-2310-43/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 14138 is followup cleanup after removal of support for old Linux kernel versions: moving syscalls to syscalls.list where the only reason for using C definitions was kernel version conditionals that are no longer present. This patch deals with the case of setrlimit (sysdeps/unix/sysv/linux/i386/setrlimit.c, included by various other architectures). Where needed (where there is also a compat symbol for setrlimit@GLIBC_2.0), new syscalls.list entries are added. Where not needed (where there is no such compat symbol and the minimum symbol version for libc is 2.2 or later), no such entries are added as that in sysdeps/unix/syscalls.list will suffice. Thus arm and sh need no such entries, while m68k and powerpc need entries only in a subdirectory syscalls.list file rather than for all configurations that previously used setrlimit.c. (setrlimit@@GLIBC_2.2 and setrlimit@GLIBC_2.0 are now semantically identical - the new symbol version was about a change of types from signed to unsigned and the former compatibility code for dealing with large unsigned arguments on old kernels is no longer needed or present, having been removed with support for pre-2.4 kernels. However, making the two versions into aliases doesn't work at present: the case of having both default and non-default symbol versions on the same syscalls.list line results in a compat_symbol call in code built for static libc, which doesn't compile. I don't suppose it would be hard to generate SHARED conditionals from make-syscalls.sh to fix this, but in any case this patch doesn't make things any worse, as the functions weren't aliases before the patch either.) Tested for x86, and ran ABI tests for ARM as an example of an architecture where the setrlimit.c file was just removed without adding syscalls.list entries. [BZ #14138] * sysdeps/unix/sysv/linux/arm/setrlimit.c: Remove file. * sysdeps/unix/sysv/linux/i386/setrlimit.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setrlimit.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/setrlimit.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setrlimit.c: Likewise. * sysdeps/unix/sysv/linux/sh/setrlimit.c: Likewise. * sysdeps/unix/sysv/linux/i386/syscalls.list (setrlimit): Add syscall entry for GLIBC_2.2 symbol version. * sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list (setrlimit): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (setrlimit): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (setrlimit): Likewise.
* ARM: Don't define _SYS_AUXV_H in sysdep.hWill Newton2014-09-232-2/+1
| | | | | | | | | | | | | | | | sysdep.h was defining _SYS_AUXV_H in order to avoid an include guard check in hwcap.h. Unfortunately it didn't undefine it so it could leak out into code and caused a build failure with -Wimplicit-function-declaration building tst-auxv on ARM. ChangeLog: 2014-09-23 Will Newton <will.newton@linaro.org> * sysdeps/unix/sysv/linux/arm/bits/hwcap.h: Check for _LINUX_ARM_SYSDEP_H include guard too. * sysdeps/unix/sysv/linux/arm/sysdep.h (_SYS_AUXV_H): Remove define.
* Fix prototype of eventfd.Rasmus Villemoes2014-09-203-3/+3
|
* Sync recvmmsg prototype with kernel usage.Ondřej Bílka2014-09-201-3/+3
|
* Remove bitrotten --enable-oldest-abi (bug 6652).Joseph Myers2014-09-164-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the --enable-oldest-abi configure option, which has long been bitrotten (as reported in bug 6652). The principle of removing this option was agreed in the thread starting at <https://sourceware.org/ml/libc-alpha/2013-07/msg00174.html>. Tested for x86_64 and x86 that the installed shared libraries other than libc.so are unchanged by this patch and that libc.so disassembly and symbol versions are unchanged (debug info changes because of changed line numbers in csu/version.c). [BZ #6652] * Makeconfig (soversions-default-setname): Remove variable. ($(common-objpfx)soversions.i): Don't pass default_setname to soversions.awk. * Makerules ($(common-objpfx)abi-versions.h): Don't pass oldest_abi to abi-versions.awk. * config.h.in (GLIBC_OLDEST_ABI): Remove macro undefine. * config.make.in (oldest-abi): Remove variable. * configure.ac (--enable-oldest-abi): Remove configure option. * configure: Regenerated. * csu/version.c (banner) [GLIBC_OLDEST_ABI]: Remove conditional text. * scripts/abi-versions.awk: Do not handle oldest_abi variable. * scripts/soversions.awk: Do not handle default_setname variable. * sysdeps/mach/hurd/configure.ac: Do not handle oldest_abi variable. * sysdeps/mach/hurd/configure: Regenerated. * sysdeps/unix/sysv/linux/configure.ac: Do not handle oldest_abi variable. * sysdeps/unix/sysv/linux/configure: Regenerated.
* Handle zero prefix length in getifaddrs (BZ #17371)Andreas Schwab2014-09-151-7/+4
|
* Remove _POSIX_REGEX_VERSIONSiddhesh Poyarekar2014-09-151-4/+2
| | | | | | | | | | | | There is no _POSIX_REGEX_VERSION, so don't check for it. _REGEX_VERSION has been removed as well[1], so only keep the -1 return for backward compatibility. I found this when trying to make the getconf environment variables typo-proof. * sysdeps/posix/sysconf.c (__sysconf): Return -1 for _SC_REGEX_VERSION. [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html
* Remove configuration name patterns from shlib-versions.Joseph Myers2014-09-1220-78/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the first column (patterns matching configuration names) from shlib-versions, leaving shlib-versions entry selection based purely on sysdeps directories. An implication of this removal is that the default for any non-Linux ports using NPTL will be the same SONAMEs for NPTL libraries as for Linux (as those defaults, previously limited to .*-.*-linux.*, are left in nptl/shlib-versions and nptl_db/shlib-versions). Special host_os handling in configure.ac that was purely for shlib-versions is removed. (The host_os setting is still used for libc-abis - see <https://sourceware.org/ml/libc-alpha/2014-01/msg00375.html> regarding that - but no entries there are affected by this change.) Tested on x86_64 and x86 that the installed shared libraries are unchanged by this patch. * scripts/soversions.awk: Do not handle configuration names. * Makeconfig ($(common-objpfx)soversions.i): Do not pass cpu, vendor and os variables to soversions.awk. * configure.ac: Do not modify gnu-* host_os. * configure: Regenerated * shlib-versions: Remove first column with configuration names. * nptl/shlib-versions: Likewise. * nptl_db/shlib-versions: Likewise. * sysdeps/hppa/shlib-versions: Likewise. * sysdeps/m68k/shlib-versions: Likewise. * sysdeps/mach/hurd/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/aarch64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/alpha/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/arm/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/hppa/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/ia64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/microblaze/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/mips/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/sh/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/tile/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Likewise. libidn/ChangeLog: * shlib-versions: Remove first column with configuration names.
* Use %ifdef in sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions.Joseph Myers2014-09-123-2/+10
| | | | | | | | | | | | | | | | | | | | | | | This patch makes sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions use %ifdef conditionals around the different symbol version definitions for big and little endian. (It doesn't actually change the host patterns used for those definitions; the point is to make it possible to remove the first column from shlib-versions by eliminating the last case where it would be harmful for it to be treated as .*-.*-.*.) The conditional is based on the ELFv1/ELFv2 distinction rather than BE/LE, since that's what's already tested in configure and used for the ld.so soname in the Makefiles. (Of course if BE ELFv2 were supported in future, it would get new symbol versions and so need new conditionals.) * sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac (HAVE_ELFV2_ABI): AC_DEFINE in ELFv2 case. * sysdeps/unix/sysv/linux/powerpc/powerpc64/configure: Regenerated. * config.h.in (HAVE_ELFV2_ABI): New macro undefine. * sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: Condition symbol version definitions on [HAVE_ELFV2_ABI].
* Move OS-specific shlib-versions entries to sysdeps files.Joseph Myers2014-09-122-0/+14
| | | | | | | | | | | | | | | | | | | | | | | This patch moves OS-specific entries in the top-level shlib-versions file to appropriate sysdeps directories. I left the entries in nptl/shlib-versions and nptl_db/shlib-versions unchanged; I think it can be for those doing non-Linux NPTL-using ports to figure out whether those entries should actually be OS-independent or should move to sysdeps. Given these two patches, I think the only further change needed before the first column of shlib-versions can be eliminated will be changing sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions to use %ifdef to distinguish BE and LE configurations, instead of relying on the powerpc64-.*-linux.* and powerpc.*le-.*-linux.* patterns. Tested on x86_64 that the installed shared libraries are unchanged by this patch. * shlib-versions: Remove OS-specific entries. Moved to files in sysdeps. * sysdeps/mach/hurd/shlib-versions: New file. * sysdeps/unix/sysv/linux/shlib-versions: Likewise.
* Move architecture-specific shlib-versions entries to sysdeps files.Joseph Myers2014-09-125-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch eliminates another way in which ex-ports and non-ex-ports architectures differ, by moving architecture-specific entries from the top-level shlib-versions file and that in nptl/ to appropriate sysdeps directories. As with my previous patch <https://sourceware.org/ml/libc-alpha/2014-06/msg00949.html>, I do not change the regular expressions used; even where the present expressions seem more general, I believe they are in fact specific to the chosen sysdeps directory, because any port that matches the expression but not the sysdeps directory does not currently exist, and so would use different symbol versions if added in future (and an intended goal of these changes is to eliminate the first column in shlib-versions completely rather than having two different mechanisms in use for system-specific configuration). Tested on x86_64 that this does not change the installed shared libraries. (x86_64 of course does not provide much test coverage for this patch - what should be architecture-specific contents in shlib-versions for x86_64 is currently abi-*-ld-soname Makefile settings, until gnu/lib-names.h is generated more like gnu/stubs.h so those can move back to shlib-versions.) * nptl/shlib-versions: Remove architecture-specific entries. Moved to files in sysdeps. * shlib-versions: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: New file. * sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/sh/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/shlib-versions: Likewise.
* Add new Linux 3.16 constants to netinet/udp.h.Joseph Myers2014-09-121-0/+4
| | | | | | | | | | | | | This patch adds the new constants UDP_NO_CHECK6_TX and UDP_NO_CHECK6_RX from Linux 3.16 to sysdeps/gnu/netinet/udp.h. (I believe the existing constants there are already Linux-specific, possibly with the intention that other OSes should adopt the same values if possible if adopting the features in question.) Tested on x86_64. * sysdeps/gnu/netinet/udp.h (UDP_NO_CHECK6_TX): New macro. (UDP_NO_CHECK6_RX): Likewise.
* Fix typo in macro names in sysconf.cSiddhesh Poyarekar2014-09-121-2/+2
| | | | | | | | | Spell _POSIX_DEVICE_SPECIFIC and _POSIX_DEVICE_SPECIFIC_R correctly. Found when trying to make the getconf environment variables typo-proof. * sysdeps/posix/sysconf.c (__sysconf): Spell _POSIX_DEVICE_SPECIFIC and _POSIX_DEVICE_SPECIFIC_R correctly.
* Enhance tst-xmmymm.sh to detect zmm register usage in ld.so (BZ #16194)Siddhesh Poyarekar2014-09-122-6/+6
| | | | | | | | | | | | | | | | 2d63a517e4084ec80403cd9f278690fa8b676cc4 added support to save and restore zmm register in the dynamic linker, but did not enhance test-xmmymm.sh to detect accidental usage of these registers. The patch below adds that check. The script has also been renamed to tst-ld-sse-use.sh. To see the minimal changes, run `git show -M`. [BZ #16194] * sysdeps/x86/tst-xmmymm.sh: Rename file to... * sysdeps/x86/tst-ld-sse-use.sh: ... this. Check for zmm register usage. * sysdeps/x86/Makefile: Adjust.
* tile: remove linux lowlevellock.hChris Metcalf2014-09-101-304/+0
|
* PowerPC: memset optimization for POWER8/PPC64Adhemerval Zanella2014-09-106-9/+513
| | | | | | | | | | | | | | | | | | | This patch adds an optimized memset implementation for POWER8. For sizes from 0 to 255 bytes, a word/doubleword algorithm similar to POWER7 optimized one is used. For size higher than 255 two strategies are used: 1. If the constant is different than 0, the memory is written with altivec vector instruction; 2. If constant is 0, dbcz instructions are used. The loop is unrolled to clear 512 byte at time. Using vector instructions increases throughput considerable, with a double performance for sizes larger than 1024. The dcbz loops unrolls also shows performance improvement, by doubling throughput for sizes larger than 8192 bytes.
* PowerPC: multiarch bzero cleanup for PPC64Adhemerval Zanella2014-09-1010-91/+15
| | | | | | | | This patch cleanups the multiarch bzero for powerpc64 by remove the multiarch objects and use instead the the memset embedded implementation presented in each multiarch optimization. The code generate is essentially the same, but the TB_TOCLESS (which is not essential).
* Put mips preconfigure code inside mips* case statement.Steve Ellcey2014-09-091-20/+25
| | | | Fix capitalization of error message.
* Modify ABI tests in MIPS preconfigure.Steve Ellcey2014-09-091-34/+24
|
* HPPA: Add c++-types.data.Carlos O'Donell2014-09-071-0/+67
| | | | | Added c++-types.data to baseline for HPPA. At this point `make check` completes without error, and the full testing results are summarized.
* HPPA: Transition to new non-addon NPTL.Carlos O'Donell2014-09-0718-29/+4
| | | | | | | | | Merge roland/nptl-hppa to master, update and test for hppa-linux-gnu. This commit squashes and commits the work done by Roland McGrath on roland/nptl-hppa to migrate hppa to the new non-addon NPTL. Some additional tweaks were required for tcb-offsets.sym to work correctly along with clone.S (unique to hppa).
* [BZ #17354] tile: Fix up corner cases with signed relocationsChris Metcalf2014-09-061-18/+23
| | | | | | | | | | | | | | | | | | Some types of relocations technically need to be signed rather than unsigned: in particular ones that are used with moveli or movei, or for jump and branch. This is almost never a problem. Jump and branch opcodes are pretty much uniformly resolved by the static linker (unless you omit -fpic for a shared library, which is not recommended). The moveli and movei opcodes that need to be sign-extended generally are for positive displacements, like the construction of the address of main() from _start(). However, tst-pie1 ends up with main below _start (in a different module) and the test failed due to signedness issues in relocation handling. This commit treats the value as signed when shifting (to preserve the high bit) and also sign-extends the value generated from the updated bundle when comparing with the desired bundle, which we do to make sure no overflow occurred. As a result, the tst-pie1 test now passes.
* Define __GI_fegetenv for e500 libmKhem Raj2014-09-021-0/+1
| | | | | | | | | | | generic HAVE_RM_CTX implementation which is used for ppc/e500 as well has introduced calls to fegetenv which should be resolved internally with in libm Signed-off-by: Khem Raj <raj.khem@gmail.com> * sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c (fegetenv): Add libm_hidden_ver.
* Fix hang on forkSamuel Thibault2014-08-281-0/+4
| | | | | | | | | | If e.g. a signal is being received while we are running fork(), the signal thread may be having our SS lock when we make the space copy, and thus in the child we can not take the SS lock any more. * sysdeps/mach/hurd/fork.c (__fork): Lock SS->lock around __proc_dostop call. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* i386 TLS_INIT_TP might produce bogus asm changing stack pointer [BZ #17319]Mark Wielaard2014-08-281-29/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TLS_INIT_TP in sysdeps/i386/nptl/tls.h uses some hand written asm to generate a set_thread_area that might result in exchanging ebx and esp around the syscall causing introspection tools like valgrind to loose track of the user stack. Just use INTERNAL_SYSCALL which makes sure esp isn't changed arbitrarily. Before the patch the code would generate: mov $0xf3,%eax movl $0xfffff,0x8(%esp) movl $0x51,0xc(%esp) xchg %esp,%ebx int $0x80 xchg %esp,%ebx Using INTERNAL_SYSCALL instead will generate: movl $0xfffff,0x8(%esp) movl $0x51,0xc(%esp) xchg %ecx,%ebx mov $0xf3,%eax int $0x80 xchg %ecx,%ebx Thanks to Florian Weimer for analysing why the original code generated the bogus esp usage: _segdescr.desc happens to be at the top of the stack, so its address is in %esp. The asm statement says that %3 is an input, so its value will not change, and GCC can use %esp as the input register for the expression &_segdescr.desc. But the constraints do not fully describe the asm statement because the %3 register is actually modified, albeit only temporarily. [BZ #17319] * sysdeps/i386/nptl/tls.h (TLS_INIT_TP): Use INTERNAL_SYSCALL to call set_thread_area instead of hand written asm. (__NR_set_thread_area): Removed define. (TLS_FLAG_WRITABLE): Likewise. (__ASSUME_SET_THREAD_AREA): Remove check. (TLS_EBX_ARG): Remove define. (TLS_LOAD_EBX): Likewise.
* Simplify atomicity of socket creation in bind.Samuel Thibault2014-08-281-22/+18
|
* Update x86 ULPsAllan McRae2014-08-271-4/+4
| | | | Using gcc-4.9, i7-2620M, i686 Linux.
* Remove unnecessary uses of NOT_IN_libcSiddhesh Poyarekar2014-08-2127-31/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a IS_IN_* macro is defined, then NOT_IN_libc is always defined, except obviously for IS_IN_libc. There's no need to check for both. Verified on x86_64 and i686 that the source is unchanged. * include/libc-symbols.h: Remove unnecessary check for NOT_IN_libc. * nptl/pthreadP.h: Likewise. * sysdeps/aarch64/setjmp.S: Likewise. * sysdeps/alpha/setjmp.S: Likewise. * sysdeps/arm/sysdep.h: Likewise. * sysdeps/i386/setjmp.S: Likewise. * sysdeps/m68k/setjmp.c: Likewise. * sysdeps/posix/getcwd.c: Likewise. * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. * sysdeps/s390/s390-32/setjmp.S: Likewise. * sysdeps/s390/s390-64/setjmp.S: Likewise. * sysdeps/sh/sh3/setjmp.S: Likewise. * sysdeps/sh/sh4/setjmp.S: Likewise. * sysdeps/unix/alpha/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/x86_64/setjmp.S: Likewise.
* Fix powerpc32 __get_clockfreq for non-power4 (bug 17263).Joseph Myers2014-08-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In my powerpc32 testing I've observed misc/test-gettimebasefreq failing. This is a glibc build (soft-float, though that's not relevant here) without any --with-cpu and without any special configuration of the default CPU for GCC either. In particular, it's one not using sysdeps/powerpc/powerpc32/power4/hp-timing.h (although in fact the processor I'm using for testing is POWER4-based), so hp_timing_t is 32-bit not 64-bit. But the VDSO call being used by INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK is generating a 64-bit result (high part in r3, low part in r4). The code extracting that result, however, expects a result of the type hp_timing_t as passed to INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK, meaning that only r3 (= 0) is used and the value in r4 is ignored. This patch fixes this by always using uint64_t as the type in INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK - reflecting the actual ABI (unconditional in the kernel) of that VDSO call. This is the minimal change for this issue - no check for overflow, no change of the type of the timebase_freq variable or the return type of __get_clockfreq to something other than hp_timing_t (such a change would simply move the implicit conversions to the over callers of that function), no change to hp_timing_t itself. Tested for powerpc32 soft float. [BZ #17263] * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c: Include <stdint.h>. (__get_clockfreq): Use uint64_t instead of hp_timing_t in INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK call.
* Fix comment error that Jakub pointed out but I forgot to fixSiddhesh Poyarekar2014-08-131-1/+1
|
* Disable x87 inline functions for x86_64 and SSE [BZ #17262]Siddhesh Poyarekar2014-08-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Since: commit 409e00bd69b8d8dd74d7327085351d26769ea6fc Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Jan 29 07:51:41 2014 -0800 Disable x87 inline functions for SSE2 math When i386 and x86-64 mathinline.h was merged into a single mathinline.h, "gcc -m32" enables x87 inline functions on x86-64 even when -mfpmath=sse and SSE2 is enabled. It is a regression on x86-64. We should check __SSE2_MATH__ instead of __x86_64__ when disabling x87 inline functions. gcc-3.2 is unable to correctly compile x86_64 routines for llrint since it gets redefined. This is because gcc 3.2 does not set __SSE2_MATH__ for x86_64, thus exposing the duplicate definition. The correct fix ought to be to check for both __SSE2_MATH__ and __x86_64__ and enable those bits only when neither are defined. Tested fix with the reproducer for 409e00bd69b8d8dd74d7327085351d26769ea6fc as well as with gcc-3.2.
* Replace cpuid asm statement with __cpuid_countH.J. Lu2014-08-121-3/+1
| | | | | | | | | | | The compiler doesn't know that the cpuid asm statement in intel_check_word will trash RBX. We are lucky that it doesn't cause any problems since RBX is also used by compiler for other purposes so that RBX is saved and restored. This patch replaces it with __cpuid_count. [BZ #17259] * sysdeps/x86_64/cacheinfo.c (intel_check_word): Replace cpuid asm statement with __cpuid_count.
* Fix powerpc-nofpu __fe_enabled_env and __fe_nonieee_env (bug 17261).Joseph Myers2014-08-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | On powerpc, floating-point environment macros are defined as pointers to constants in the library that contain the bit-patterns of the desired environment, instead of being magic constants cast to pointer type. For soft-float, the bit-patterns used for fenv_t are not laid out the same as for hard-float. (e500 has a third layout used; that's not an ABI issue because these values are only meaningful within a single process, all of whose glibc libraries must come from the same build of glibc.) While the __fe_dfl_env value for soft-float was appropriate for the soft-float fenv_t representation, the other two constants had the same bit-patterns as for hard-float. Those bit patterns had the effect of having exceptions already raised, causing math/test-fenv-return to fail; this patch fixes the patterns used. (__fe_nonieee_env also had exceptions unmasked, though they should be masked to match hard-float semantics. Since there is no separate non-IEEE mode for soft-float, it's most appropriate for __fe_nonieee_env to be the same as __fe_dfl_env; this patch makes it an alias.) Tested for powerpc-nofpu. [BZ #17261] * sysdeps/powerpc/nofpu/fenv_const.c (__fe_enabled_env): Change value to 0. (__fe_nonieee_env): Define as an alias for __fe_dfl_env.
* Check value of futex before updating in __lll_timedlockBernard Ogden2014-08-121-1/+4
| | | | | | | | 2014-08-12 Bernard Ogden <bernie.ogden@linaro.org> [BZ #16892] * sysdeps/nptl/lowlevellock.h (__lll_timedlock): Use atomic_compare_and_exchange_bool_acq rather than atomic_exchange_acq.
* This patch adds new function libc_feholdsetround_noex_aarch64_ctx, enablingWilco Dijkstra2014-08-071-3/+27
| | | | | | | further optimization. libc_feholdsetround_aarch64_ctx now only needs to read the FPCR in the typical case, avoiding a redundant FPSR read. Performance results show a good improvement (5-10% on sin()) on cores with expensive FPCR/FPSR instructions.
* Fix performance issue in misaligned strcpy.Wilco2014-08-071-3/+3
|
* PowerPC: Fix termios definitionsAdhemerval Zanella2014-08-062-50/+73
| | | | | | | | | | | This patch fixes the incorrect guard by __USE_MISC of struct winsize and struct termio in powerpc termios header. Current states leads to build failures if the program defines _XOPEN_SOURCE, but not _DEFAULT_SOURCE or either _BSD_SOURCE or _SVID_SOURCE. Without any definition, __USE_MISC will not be defined and neither the struct definitions. This patch copies the default Linux ioctl-types.h by adjusting only the character control field (c_cc) size in struct termio.
* alpha: Fix exception raising from soft-fpRichard Henderson2014-08-054-12/+12
| | | | | | Use the SSI_IEEE_RAISE_EXCEPTION function as from feraiseexcept, instead of __ieee_get+set_fp_status. Always raise the FP exceptions from float-to-integer conversion.
* alpha: Remove linux lowlevellock.hRichard Henderson2014-08-051-305/+0
| | | | For real this time.
* MIPS - Remove mips lowlevellock.h.Bernard Ogden2014-08-041-354/+0
| | | | * sysdeps/unix/sysv/linux/mips/lowlevellock.h: Remove file.
* AArch64: Remove lowlevellock.hWill Newton2014-08-041-312/+0
| | | | | | | | | | | | | Remove lowlevellock.h in favour of the generic implementation. The generic implementation was tested natively and introduces no regressions. ChangeLog: 2014-08-04 Will Newton <will.newton@linaro.org> * sysdeps/unix/sysv/linux/aarch64/lowlevellock.h: Remove file.
* ia64: define nocancel entry points in PSEUDOMike Frysinger2014-08-041-0/+19
| | | | | | | | | | | | | | The previous set of not-cancel.h headers (prior to the commit 2fbdf5339aaeaa423bd661524f7ec7af41fa2606) did not require the arch to define nocancel entry points, so ia64 never did. However, after the various files were merged, it became a hard requirement for arches which mean ia64 failed to build. Here we add dedicated entry points. It'd be nice to merge with the existing stubs like other arches do, but the ia64 asm does not lend itself to interleaving of functions. If someone has a suggestion on merging these, that'd be great, but at least now we build & pass tests again.
* IA64: Consolidate nptl/ subdirectories under linux/...Roland McGrath2014-08-0431-17/+18
|
* IA64: Move NPTL public headers to sysdeps/ia64/nptl/.Roland McGrath2014-08-043-0/+0
|