about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/arm
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-0258-58/+58
|
* Fix profil_counter namespace (bug 17725).Joseph Myers2014-12-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On ARM, where profil_counter is not static, it is brought in by references to various standard functions, as noted in <https://sourceware.org/ml/libc-alpha/2014-11/msg00890.html>, although it is not a standard function itself. I don't know if this also causes test failures on SPARC, although I see no reason for it not to do so. This patch fixes this namespace issue. profil_counter is renamed to __profil_counter and made a weak alias on ARM and SPARC. Because of the uses in profil.c / sprofil.c it seems simplest to make the rename globally, including on the other architectures for which profil_counter was static and so the change is of no substance. The variant names profil_counter_* used in sprofil.c are also renamed to start with __ so that undesired function names do not get exported in static libc. As I noted in bug 17726, profil_counter should probably be a compat symbol on ARM and SPARC, so it wouldn't exist at all in static libc even as a weak alias. Since defining a compat symbol still requires an internal name as a target of an alias, this patch still seems reasonable as an intermediate step towards that goal: it wouldn't be possible for the function simply to be static profil_counter on ARM and SPARC with profil_counter also being the exported compat symbol name, so profil.c / sprofil.c would still need to be prepared to call the function under another name (here, __profil_counter). Tested for x86_64 (testsuite, and that stripped installed shared libraries are unchanged by the patch) and ARM (ABI and linknamespace tests - this patch reduces the number of linknamespace failures I see on ARM from 227 to 5, the residue being math.h failures for fe* functions and for j0l/j1n/jnl/y0l/y1l/ynl aliases). 2014-12-17 Joseph Myers <joseph@codesourcery.com> [BZ #17725] * sysdeps/generic/profil-counter.h (profil_counter): Rename to __profil_counter. * sysdeps/unix/sysv/linux/hppa/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/i386/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/ia64/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/sh/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/tile/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/x86_64/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter): Likewise. [!__profil_counter] (profil_counter): Define as weak alias of __profil_counter. * sysdeps/unix/sysv/linux/sparc/sparc32/profil-counter.h (profil_counter): Rename to __profil_counter. [!__profil_counter] (profil_counter): Define as weak alias of __profil_counter. * sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h (profil_counter): Rename to __profil_counter. [!__profil_counter] (profil_counter): Define as weak alias of __profil_counter. * sysdeps/posix/profil.c: Update comment referring to profil_counter. (__profil): Use __profil_counter instead of profil_counter. * sysdeps/posix/sprofil.c (profil_counter): Rename to __profil_counter. Use __profil_counter_ushort and __profil_counter_uint in definitions. (__sprofil): Use __profil_counter_uint and __profil_counter_ushort instead of profil_counter_uint and profil_counter_ushort.
* Revert "Use pragmas rather than makefiles for necessary options for unwind ↵Roland McGrath2014-12-161-2/+0
| | | | | | code." This reverts commit c324fcfe75c3976ae0b16943df00710e1d0d74f7.
* Use pragmas rather than makefiles for necessary options for unwind code.Roland McGrath2014-12-161-0/+2
|
* Fix sysdeps/unix/sysv/linux/arm/libc-do-syscall.S warning.Joseph Myers2014-11-261-0/+3
| | | | | | | | | | | | | | | | | This patch fixes a warning ../include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] seen when building for ARM. This warning comes from libc-do-syscall.S being built for nscd: the nscd build uses _FORTIFY_SOURCE, while .S files aren't built with -O, and the combination produces a warning. As _FORTIFY_SOURCE doesn't do anything for .S files, undefining it in libc-do-syscall.S seems the simplest solution. Tested for ARM. * sysdeps/unix/sysv/linux/arm/libc-do-syscall.S (_FORTIFY_SOURCE): Undefine.
* Remove NOT_IN_libcSiddhesh Poyarekar2014-11-242-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace with !IS_IN (libc). This completes the transition from the IS_IN/NOT_IN macros to the IN_MODULE macro set. The generated code is unchanged on x86_64. * stdlib/isomac.c (fmt): Replace NOT_IN_libc with IN_MODULE. (get_null_defines): Adjust. * sunrpc/Makefile: Adjust comment. * Makerules (CPPFLAGS-nonlib): Remove NOT_IN_libc. * elf/Makefile (CPPFLAGS-sotruss-lib): Likewise. (CFLAGS-interp.c): Likewise. (CFLAGS-ldconfig.c): Likewise. (CPPFLAGS-.os): Likewise. * elf/rtld-Rules (rtld-CPPFLAGS): Likewise. * extra-lib.mk (CPPFLAGS-$(lib)): Likewise. * extra-modules.mk (extra-modules.mk): Likewise. * iconv/Makefile (CPPFLAGS-iconvprogs): Likewise. * locale/Makefile (CPPFLAGS-locale_programs): Likewise. * malloc/Makefile (CPPFLAGS-memusagestat): Likewise. * nscd/Makefile (CPPFLAGS-nscd): Likewise. * nss/Makefile (CPPFLAGS-nss_test1): Likewise. * stdlib/Makefile (CFLAGS-tst-putenvmod.c): Likewise. * sysdeps/gnu/Makefile ($(objpfx)errlist-compat.c): Likewise. * sysdeps/unix/sysv/linux/Makefile (CPPFLAGS-lddlibc4): Likewise. * iconvdata/Makefile (CPPFLAGS): Likewise. (cpp-srcs-left): Add libof for all iconvdata routines. * bits/stdio-lock.h: Replace NOT_IN_libc with IS_IN. * include/assert.h: Likewise. * include/ctype.h: Likewise. * include/errno.h: Likewise. * include/libc-symbols.h: Likewise. * include/math.h: Likewise. * include/netdb.h: Likewise. * include/resolv.h: Likewise. * include/stdio.h: Likewise. * include/stdlib.h: Likewise. * include/string.h: Likewise. * include/sys/stat.h: Likewise. * include/wctype.h: Likewise. * intl/l10nflist.c: Likewise. * libidn/idn-stub.c: Likewise. * libio/libioP.h: Likewise. * nptl/libc_multiple_threads.c: Likewise. * nptl/pthreadP.h: Likewise. * posix/regex_internal.h: Likewise. * resolv/res_hconf.c: Likewise. * sysdeps/arm/armv7/multiarch/memcpy.S: Likewise. * sysdeps/arm/memmove.S: Likewise. * sysdeps/arm/sysdep.h: Likewise. * sysdeps/generic/_itoa.h: Likewise. * sysdeps/generic/symbol-hacks.h: Likewise. * sysdeps/gnu/errlist.awk: Likewise. * sysdeps/gnu/errlist.c: Likewise. * sysdeps/i386/i586/memcpy.S: Likewise. * sysdeps/i386/i586/memset.S: Likewise. * sysdeps/i386/i686/memcpy.S: Likewise. * sysdeps/i386/i686/memmove.S: Likewise. * sysdeps/i386/i686/mempcpy.S: Likewise. * sysdeps/i386/i686/memset.S: Likewise. * sysdeps/i386/i686/multiarch/bcopy.S: Likewise. * sysdeps/i386/i686/multiarch/bzero.S: Likewise. * sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/memchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/memchr.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp-sse4.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise. * sysdeps/i386/i686/multiarch/memmove.S: Likewise. * sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise. * sysdeps/i386/i686/multiarch/memrchr-c.c: Likewise. * sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/memrchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/memrchr.S: Likewise. * sysdeps/i386/i686/multiarch/memset-sse2-rep.S: Likewise. * sysdeps/i386/i686/multiarch/memset-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/memset.S: Likewise. * sysdeps/i386/i686/multiarch/memset_chk.S: Likewise. * sysdeps/i386/i686/multiarch/rawmemchr.S: Likewise. * sysdeps/i386/i686/multiarch/strcat-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strcat-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/strcat.S: Likewise. * sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/strchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strchr.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp-sse4.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy.S: Likewise. * sysdeps/i386/i686/multiarch/strcspn.S: Likewise. * sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/strlen-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strlen.S: Likewise. * sysdeps/i386/i686/multiarch/strnlen.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr.S: Likewise. * sysdeps/i386/i686/multiarch/strspn.S: Likewise. * sysdeps/i386/i686/multiarch/wcschr-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcschr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcschr.S: Likewise. * sysdeps/i386/i686/multiarch/wcscmp-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcscmp.S: Likewise. * sysdeps/i386/i686/multiarch/wcscpy-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcscpy-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/wcscpy.S: Likewise. * sysdeps/i386/i686/multiarch/wcslen-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcslen-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcslen.S: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr.S: Likewise. * sysdeps/i386/i686/multiarch/wmemcmp-c.c: Likewise. * sysdeps/i386/i686/multiarch/wmemcmp.S: Likewise. * sysdeps/ia64/fpu/libm-symbols.h: Likewise. * sysdeps/nptl/bits/libc-lock.h: Likewise. * sysdeps/nptl/bits/libc-lockP.h: Likewise. * sysdeps/nptl/bits/stdio-lock.h: Likewise. * sysdeps/posix/closedir.c: Likewise. * sysdeps/posix/opendir.c: Likewise. * sysdeps/posix/readdir.c: Likewise. * sysdeps/posix/rewinddir.c: Likewise. * sysdeps/powerpc/novmx-sigjmp.c: Likewise. * sysdeps/powerpc/powerpc32/__longjmp.S: Likewise. * sysdeps/powerpc/powerpc32/bsd-_setjmp.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/__longjmp.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/setjmp.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memset.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy.c: Likewise. * sysdeps/powerpc/powerpc32/power6/memset.S: Likewise. * sysdeps/powerpc/powerpc32/setjmp.S: Likewise. * sysdeps/powerpc/powerpc64/__longjmp.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/bzero.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcmp-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcpy-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memmove.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/mempcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memrchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memset.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpcpy-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpncpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcat.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strchrnul.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcmp-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcpy-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcspn.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strlen-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strlen.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncase.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncase_l.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncat.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncpy-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strnlen.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strpbrk.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strrchr-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strrchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strspn-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strspn.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcschr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcscpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wordcopy.c: Likewise. * sysdeps/powerpc/powerpc64/setjmp.S: Likewise. * sysdeps/s390/s390-32/multiarch/ifunc-resolve.c: Likewise. * sysdeps/s390/s390-32/multiarch/memcmp.S: Likewise. * sysdeps/s390/s390-32/multiarch/memcpy.S: Likewise. * sysdeps/s390/s390-32/multiarch/memset.S: Likewise. * sysdeps/s390/s390-64/multiarch/ifunc-resolve.c: Likewise. * sysdeps/s390/s390-64/multiarch/memcmp.S: Likewise. * sysdeps/s390/s390-64/multiarch/memcpy.S: Likewise. * sysdeps/s390/s390-64/multiarch/memset.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memset-niagara1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memset-niagara4.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memset.S: Likewise. * sysdeps/unix/alpha/sysdep.S: Likewise. * sysdeps/unix/alpha/sysdep.h: Likewise. * sysdeps/unix/make-syscalls.sh: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/getpid.c: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise. * sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/not-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/longjmp_chk.c: Likewise. * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise. * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sh/vfork.S: Likewise. * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/wordsize-32/symbol-hacks.h: Likewise. * sysdeps/x86_64/memcpy.S: Likewise. * sysdeps/x86_64/memmove.c: Likewise. * sysdeps/x86_64/memset.S: Likewise. * sysdeps/x86_64/multiarch/init-arch.h: Likewise. * sysdeps/x86_64/multiarch/memcmp-sse4.S: Likewise. * sysdeps/x86_64/multiarch/memcmp-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/memcmp.S: Likewise. * sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: Likewise. * sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Likewise. * sysdeps/x86_64/multiarch/memcpy-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/memcpy.S: Likewise. * sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise. * sysdeps/x86_64/multiarch/memmove.c: Likewise. * sysdeps/x86_64/multiarch/mempcpy.S: Likewise. * sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise. * sysdeps/x86_64/multiarch/memset-avx2.S: Likewise. * sysdeps/x86_64/multiarch/memset.S: Likewise. * sysdeps/x86_64/multiarch/memset_chk.S: Likewise. * sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S: Likewise. * sysdeps/x86_64/multiarch/strcat-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/strcat.S: Likewise. * sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S: Likewise. * sysdeps/x86_64/multiarch/strchr.S: Likewise. * sysdeps/x86_64/multiarch/strcmp-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/strcmp.S: Likewise. * sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: Likewise. * sysdeps/x86_64/multiarch/strcpy-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/strcpy.S: Likewise. * sysdeps/x86_64/multiarch/strcspn.S: Likewise. * sysdeps/x86_64/multiarch/strspn.S: Likewise. * sysdeps/x86_64/multiarch/wcscpy-c.c: Likewise. * sysdeps/x86_64/multiarch/wcscpy-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/wcscpy.S: Likewise. * sysdeps/x86_64/multiarch/wmemcmp-c.c: Likewise. * sysdeps/x86_64/multiarch/wmemcmp.S: Likewise. * sysdeps/x86_64/strcmp.S: Likewise.
* Remove IS_IN_libpthreadSiddhesh Poyarekar2014-11-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace with IS_IN (libpthread). Generated code unchanged on x86_64. * nptl/lowlevellock.c: Use IS_IN instead of IS_IN_libpthread. * nptl/pthreadP.h: Likewise. * nptl_db/structs.def: Likewise. * sysdeps/arm/sysdep.h: Likewise. * sysdeps/nptl/bits/libc-lock.h: Likewise. * sysdeps/nptl/bits/libc-lockP.h: Likewise. * sysdeps/sparc/sparc32/lowlevellock.c: Likewise. * sysdeps/unix/alpha/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/not-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
* Remove IS_IN_librtSiddhesh Poyarekar2014-11-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace with IS_IN (librt). Generated code unchanged on x86_64 * include/mqueue.h: Use IS_IN instead of IS_IN_librt. * nptl/pthreadP.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/not-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
* Run check-localpltk/textrel/execstack over ld.so.Carlos O'Donell2014-11-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For maximum paranoia we run ld.so through the normal set of tests for all of the shared libraries. This includes running ld.so through check-localplt, check-textrel, and check-execstack. While none of these should trigger any failures given the way ld.so is built, it might possibly fail if a developer does something wrong. This paranoia was triggered by a discussion over the use of __strcpy vs. strcpy [1] and if the symbol could leak and use the libc.so version. The check-localplt test fails right away because localplt.data needs updating for all arches. By default we add 6 new symbols: __tls_get_addr, __libc_memalign, malloc, calloc, realloc and free. Other machines like i386, power, and s390 require some different symbol sets e.g. ___tls_get_addr vs. __tls_get_addr for i386. Verified for i386 Verified for x86_64 Verified for ppc32 Verified for ppc64 Verified for ppc64le Verified for arm Verified for aarch64 Verified for s390 Verified for s390x Guessed for alpha Guessed for ia64 Guessed for m68k Guessed for microblaze Guessed for sparc32 Guessed for sparc64 Defaults for sh Defaults for mips Defaults for hppa Defaults for tile Machine manintainers notified to double check the data used in localplt.data. [1] https://sourceware.org/ml/libc-alpha/2014-10/msg00548.html
* arm: Re-enable PI futex support for ARM kernels >= 3.14.3Gratian Crisan2014-10-271-4/+6
| | | | | | | | | | | | | | | | | | | ARM linux kernels before 3.14.3 may or may not support futex_atomic_cmpxchg_inatomic depending on the kernel configuration (e.g. CONFIG_CPU_USE_DOMAINS && CONFIG_SMP configuration was not supported) Starting with 3.14.3 the linux kernel unconditionally enables support for ARM, and this re-enables the relevant __ASSUME_* macros. Tested on ARM both with kernels >= 3.14.3 and older kernels. * sysdeps/unix/sysv/linux/arm/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x030E03] (__ASSUME_FUTEX_LOCK_PI): Do not undefine. [__LINUX_KERNEL_VERSION >= 0x030E03] (__ASSUME_REQUEUE_PI): Likewise. [__LINUX_KERNEL_VERSION >= 0x030E03] (__ASSUME_SET_ROBUST_LIST): Likewise.
* Move setfsgid/setfsuid definitions to syscalls.list (bug 14138).Joseph Myers2014-10-273-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 various definitions of setfsgid and setfsuid. Tested for x86. [BZ #14138] * sysdeps/unix/sysv/linux/arm/setfsgid.c: Remove file. * sysdeps/unix/sysv/linux/arm/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setfsgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setfsgid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setfsgid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/setfsgid.c: Likewise. * sysdeps/unix/sysv/linux/sh/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setfsgid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/arm/syscalls.list (setfsgid): Add syscall. (setfsuid): Likewise. * sysdeps/unix/sysv/linux/i386/syscalls.list (setfsgid): Likewise. (setfsuid): Likewise. * sysdeps/unix/sysv/linux/m68k/syscalls.list (setfsgid): Likewise. (setfsuid): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (setfsgid): Likewise. (setfsuid): Likewise. * sysdeps/unix/sysv/linux/sh/syscalls.list (setfsgid): Likewise. (setfsuid): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (setfsgid): Likewise. (setfsuid): Likewise.
* Move get*id and getgroups definitions to syscalls.list (bug 14138).Joseph Myers2014-10-248-8/+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 various definitions of get*id functions and getgroups. The previous C definitions were because of the transition to 32-bit uids and gids. Tested for x86. [BZ #14138] * sysdeps/unix/sysv/linux/arm/getegid.c: Remove file. * sysdeps/unix/sysv/linux/arm/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/arm/getgid.c: Likewise. * sysdeps/unix/sysv/linux/arm/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/arm/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/arm/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/arm/getuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getegid.c: Likewise. * sysdeps/unix/sysv/linux/i386/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getegid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getgid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getuid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getegid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getgid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/getegid.c: Likewise. * sysdeps/unix/sysv/linux/sh/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/getgid.c: Likewise. * sysdeps/unix/sysv/linux/sh/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/sh/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/sh/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/getuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/getegid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/getgid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/getuid.c: Likewise. * sysdeps/unix/sysv/linux/arm/syscalls.list (getegid): Add syscall. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getresgid): Likewise. (getresuid): Likewise. (getgroups): Likewise. * sysdeps/unix/sysv/linux/i386/syscalls.list (getegid): Likewise. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getresgid): Likewise. (getresuid): Likewise. (getgroups): Likewise. * sysdeps/unix/sysv/linux/m68k/syscalls.list (getegid): Likewise. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getresgid): Likewise. (getresuid): Likewise. (getgroups): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (getegid): Likewise. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getresgid): Likewise. (getresuid): Likewise. (getgroups): Likewise. * sysdeps/unix/sysv/linux/sh/syscalls.list (getegid): Likewise. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getresgid): Likewise. (getresuid): Likewise. (getgroups): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (getegid): Likewise. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getgroups): Likewise.
* Move some chown / lchown / fchown definitions to syscalls.list (bug 14138).Joseph Myers2014-10-063-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 various definitions of chown, lchown and fchown. In most cases the need for special syscalls.list entries (rather than existing generic ones) is because these architectures use chown32, lchown32 and fchown32 as syscall names. Some architectures also have symbol versioning compatibility for older versions of chown having been equivalent to lchown. In the case of powerpc, chown.c (providing the chown@@GLIBC_2.1 default version) is replaced by a syscalls.list entry (for powerpc32; powerpc64 has no need for this because of its more recent minimum symbol version, so can just use the entry in sysdeps/unix/syscalls.list), but lchown.S is left as-is because it provides the compat version of chown as an actual alias for __lchown, which is not yet supported by syscalls.list. This file can be removed once such aliases are supported in syscalls.list. [BZ #14138] * sysdeps/unix/sysv/linux/arm/fchown.c: Remove file. * sysdeps/unix/sysv/linux/arm/lchown.c: Likewise. * sysdeps/unix/sysv/linux/m68k/fchown.c: Likewise. * sysdeps/unix/sysv/linux/m68k/lchown.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/chown.c: Likewise. * sysdeps/unix/sysv/linux/arm/syscalls.list (lchown): Add syscall. (fchown): Likewise. * sysdeps/unix/sysv/linux/m68k/syscalls.list (lchown): Likewise. (fchown): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (chown): Likewise.
* Clean up gnu/lib-names.h generation (bug 14171).Joseph Myers2014-09-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove configuration name patterns from shlib-versions.Joseph Myers2014-09-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove sysdeps/unix/sysv/linux/arm/lowlevellock.hRoland McGrath2014-08-011-307/+0
|
* ARM: Move PTR_MANGLE et al out of Linux-specific file.Roland McGrath2014-08-011-44/+0
|
* Move architecture shlib-versions files to Linux-specific directories.Joseph Myers2014-07-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various architectures have files such as sysdeps/<arch>/shlib-versions whose contents are in fact entirely Linux-specific, relating only to the symbol / shared library versions for the port to Linux on that architecture, when any future port to a different OS on that architecture would use the symbol version of the glibc release it goes in, as standard for new ports. This patch moves such files under sysdeps/unix/sysv/linux/, merging in the contents of sysdeps/<arch>/nptl/shlib-versions in the process. The only bits not moved are those relating to libgcc_s versions, which don't appear OS-specific in the same way that glibc's symbol versions so. It deliberately does not change the regular expressions given for matching configurations in each file; some match only Linux although not Linux-specific, or match other OSes although Linux-specific. It is with a view to at least the following further cleanups: * Move architecture-specific content from the toplevel shlib-versions and nptl/shlib-versions into sysdeps shlib-versions files, so eliminating another difference between ex-ports and non-ex-ports architectures. * Likewise, for OS-specific content in shlib-versions files. * At that point, the first field in shlib-versions files (the regular expression matching a configuration triplet) should be redundant, so eliminate that field and leave shlib-versions selection working purely on a sysdeps basis (with limited use of %ifdef in shlib-versions files when needed) rather than having its own separate mechanism to select what configuration information is relevant. * Move the build of gnu/lib-names.h to a similar mechanism to that used for gnu/stubs.h (each library build installing a version of the header specifically for that build), so we can eliminate the duplication of soname information in the makefiles and get it purely from shlib-versions files again. There may be other cleanups possible as well (in particular, I'm not sure that all cases where the same "Earliest symbol set" information is repeated for many different libraries actually should need to repeat it rather than specifying it just once for DEFAULT for the given configuration, and separately specifying any non-default choices of soname). Tested x86_64 that the installed shared libraries are unchanged by this patch. * sysdeps/aarch64/shlib-versions: Move to ... * sysdeps/unix/sysv/linux/aarch64/shlib-versions: ... here. * sysdeps/alpha/shlib-versions: Move to ... * sysdeps/unix/sysv/linux/alpha/shlib-versions: ... here. * sysdeps/arm/shlib-versions: Move to ... * sysdeps/unix/sysv/linux/arm/shlib-versions: ... here. * sysdeps/hppa/shlib-versions: Move all contents except for libgcc_s entry to ... * sysdeps/unix/sysv/linux/hppa/shlib-versions: ... here. Merge in entry from ... * sysdeps/hppa/nptl/shlib-versions: ... here. Remove file. * sysdeps/ia64/shlib-versions: Move to ... * sysdeps/unix/sysv/linux/ia64/shlib-versions: ... here. Merge in entry from ... * sysdeps/ia64/nptl/shlib-versions: ... here. Remove file. * sysdeps/m68k/coldfire/shlib-versions: Move to ... * sysdeps/unix/sysv/linux/m68k/coldfire/shlib-versions: ... here. * sysdeps/microblaze/shlib-versions: Move to ... * sysdeps/unix/sysv/linux/microblaze/shlib-versions: ... here. * sysdeps/mips/shlib-versions: Move to ... * sysdeps/unix/sysv/linux/mips/shlib-versions: ... here. Merge in entry from ... * sysdeps/mips/nptl/shlib-versions: ... here. Remove file. * sysdeps/tile/shlib-versions: Move to ... * sysdeps/unix/sysv/linux/tile/shlib-versions: ... here. * sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Merge in entry from ... * sysdeps/x86_64/64/shlib-versions: ... here. Remove file. * sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Merge in entry from ... * sysdeps/x86_64/x32/shlib-versions: ... here. Remove file.
* ARM: Clean up EABI-related configuryRoland McGrath2014-07-162-21/+0
|
* Get rid of lll_robust_dead.Roland McGrath2014-07-101-9/+0
|
* Get rid of lll_robust_trylock.Roland McGrath2014-07-101-5/+0
|
* NPTL is no longer an add-on!Roland McGrath2014-07-071-0/+1
|
* Get rid of nptl/sysdeps/ entirely!Roland McGrath2014-07-071-9/+1
|
* ARM: Split Linuxism out of sysdeps/arm/nptl/tls.hRoland McGrath2014-06-301-0/+42
|
* ARM: Move more aeabi routine magic out of Linux-specific directoriesRoland McGrath2014-06-264-26/+4
|
* Remove stray includes of kernel-features.h.Joseph Myers2014-06-252-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that files using __ASSUME_* macros have been made by <https://sourceware.org/ml/libc-alpha/2014-06/msg00543.html> to include <kernel-features.h> directly, any include from a file not using __ASSUME_* macros can safely be removed (as there will no longer be some other file relying on indirect inclusion via a header from which the include is being removed). This patch removes such unnecessary kernel-features.h includes. Tested x86_64 that disassembly of installed shared libraries is unchanged by this patch, except for line numbers in calls to __assert_fail from libc.so and ld.so. 2014-06-23 Joseph Myers <joseph@codesourcery.com> * nptl/createthread.c: Don't include kernel-features.h. * nptl/pthread_cancel.c: Likewise. * nptl/pthread_condattr_setclock.c: Likewise. * nptl/sysdeps/unix/sysv/linux/pt-raise.c: Likewise. * nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Likewise. * nptl/sysdeps/unix/sysv/linux/pthread_kill.c: Likewise. * nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c: Likewise. * nptl/sysdeps/unix/sysv/linux/raise.c: Likewise. * nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Likewise. * nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Likewise. * nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Likewise. * nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_create.c: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_delete.c: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_getoverr.c: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_gettime.c: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_routines.c: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_settime.c: Likewise. * nscd/gai.c: Likewise. * nss/nss_db/db-open.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/sh/nptl/tls.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/aarch64/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/vfork.S: Likewise. * sysdeps/unix/sysv/linux/adjtime.c: Likewise. * sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise. * sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/check_pf.c: Likewise. * sysdeps/unix/sysv/linux/clock_getcpuclockid.c: Likewise. * sysdeps/unix/sysv/linux/clock_getres.c: Likewise. * sysdeps/unix/sysv/linux/clock_gettime.c: Likewise. * sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise. * sysdeps/unix/sysv/linux/clock_settime.c: Likewise. * sysdeps/unix/sysv/linux/dl-execstack.c: Likewise. * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. * sysdeps/unix/sysv/linux/dl-sysdep.c: Likewise. * sysdeps/unix/sysv/linux/generic/futimesat.c: Likewise. * sysdeps/unix/sysv/linux/generic/poll.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c: Likewise. * sysdeps/unix/sysv/linux/getcwd.c: Likewise. * sysdeps/unix/sysv/linux/getpagesize.c: Likewise. * sysdeps/unix/sysv/linux/getsysstats.c: Likewise. * sysdeps/unix/sysv/linux/i386/fxstat.c: Likewise. * sysdeps/unix/sysv/linux/i386/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise. * sysdeps/unix/sysv/linux/i386/xstat.c: Likewise. * sysdeps/unix/sysv/linux/ia64/system.c: Likewise. * sysdeps/unix/sysv/linux/if_index.c: Likewise. * sysdeps/unix/sysv/linux/ifaddrs.c: Likewise. * sysdeps/unix/sysv/linux/ifreq.c: Likewise. * sysdeps/unix/sysv/linux/ldsodefs.h: Likewise. * sysdeps/unix/sysv/linux/lutimes.c: Likewise. * sysdeps/unix/sysv/linux/m68k/vfork.S: Likewise. * sysdeps/unix/sysv/linux/microblaze/nptl/vfork.S: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/accept4.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/mmap64.c: Likewise. * sysdeps/unix/sysv/linux/netlinkaccess.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/chown.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise. * sysdeps/unix/sysv/linux/pread.c: Likewise. * sysdeps/unix/sysv/linux/pread64.c: Likewise. * sysdeps/unix/sysv/linux/prof-freq.c: Likewise. * sysdeps/unix/sysv/linux/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/mmap.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: Likewise. * sysdeps/unix/sysv/linux/s390/system.c: Likewise. * sysdeps/unix/sysv/linux/sh/pread.c: Likewise. * sysdeps/unix/sysv/linux/sh/pread64.c: Likewise. * sysdeps/unix/sysv/linux/sh/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/sh/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sigpending.c: Likewise. * sysdeps/unix/sysv/linux/sigprocmask.c: Likewise. * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/xstatconv.c: Likewise. * sysdeps/unix/sysv/linux/sparc/system.c: Likewise. * sysdeps/unix/sysv/linux/syslog.c: Likewise. * sysdeps/unix/sysv/linux/system.c: Likewise. * sysdeps/unix/sysv/linux/testrtsig.h: Likewise. * sysdeps/unix/sysv/linux/timespec_get.c: Likewise. * sysdeps/unix/sysv/linux/ttyname.c: Likewise. * sysdeps/unix/sysv/linux/ttyname_r.c: Likewise. * sysdeps/unix/sysv/linux/utimensat.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/xstatconv.h: Likewise.
* ARM: Add support for AT_HWCAP2 in _dl_procinfoWill Newton2014-06-252-28/+44
| | | | | | | | | | | | | | | | | | | Add support for the new HWCAP2 values for ARMv8 added in the 3.15 kernel. Tested using QEMU which supports these extensions. ChangeLog: 2014-06-25 Will Newton <will.newton@linaro.org> * sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags): Add HWCAP2 values. * sysdeps/unix/sysv/linux/arm/dl-procinfo.h (_DL_HWCAP_COUNT): Increase to 37. (_DL_HWCAP_LAST): New define. (_DL_HWCAP2_LAST): New define. (_dl_procinfo): Add support for printing AT_HWCAP2 entries. (_dl_string_hwcap): Use _dl_hwcap_string.
* Remove ARM __ASSUME_SIGFRAME_V2.Joseph Myers2014-06-214-59/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes ARM __ASSUME_SIGFRAME_V2 now that the 2.6.18-and-later signal frame layout can be assumed, renaming the affected functions accordingly now only one version of them is needed in glibc. (sigrestorer.S did not in fact include <kernel-features.h> and it appears that, unlike other such cases, it didn't get the header indirectly, so the v1 functions would have been compiled in even when sigaction.c didn't reference them.) (alpha and hppa also have architecture-specific __ASSUME_* macros that should now be removed: __ASSUME_FDATASYNC and __ASSUME_LWS_CAS respectively. I don't have any plans to do anything on that myself.) Tested on ARM. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_SIGFRAME_V2): Remove macro. * sysdeps/unix/sysv/linux/arm/sigrestorer.S: Update comment. [!__ASSUME_SIGFRAME_V2]: Remove conditional code. (__default_sa_restorer_v2): Rename to __default_sa_restorer. (__default_rt_sa_restorer_v2): Rename to __default_rt_sa_restorer. * sysdeps/unix/sysv/linux/arm/sigaction.c (__default_sa_restorer): Declare as function. Remove conditional macro definitions. (__default_rt_sa_restorer): Likewise. (__default_sa_restorer_v1): Remove declaration. (__default_sa_restorer_v2): Likewise. (__default_rt_sa_restorer_v1): Likewise. (__default_rt_sa_restorer_v2): Likewise. * sysdeps/unix/sysv/linux/arm/Versions (GLIBC_PRIVATE): Remove __default_sa_restorer_v1, __default_rt_sa_restorer_v1, __default_sa_restorer_v2 and __default_rt_sa_restorer_v2.
* ARM: Define TLS_DEFINE_INIT_TPRoland McGrath2014-06-091-22/+0
|
* arm,aarch64: Remove SINGLE_THREAD_P_PICRichard Henderson2014-05-251-1/+0
| | | | | | | | | | This macro was removed by 2005-11-16 Daniel Jacobowitz <dan@codesourcery.com> but not applied to the (still separate) eabi port so necro'd when the eabi port superceded the old abi. It was thence copied into the new AArch64 port.
* Fix ARM build with GCC trunk.Joseph Myers2014-05-202-2/+4
| | | | | | | | | | | | | | | | sysdeps/unix/sysv/linux/arm/unwind-resume.c and sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static variables that are written in C code but only read from toplevel asms. Current GCC trunk now optimizes away such apparently write-only static variables, so causing a build failure. This patch marks those variables with __attribute_used__ to avoid that optimization. Tested that this fixes the build for ARM. * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c (libgcc_s_resume): Use __attribute_used__. * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): Likewise.
* ARM: Convert fork.c to arch-fork.hRoland McGrath2014-05-161-10/+7
|
* ARM: Consolidate NPTL/non versions of vforkRoland McGrath2014-05-143-77/+20
|
* Reduce kernel-features.h duplication.Joseph Myers2014-05-141-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reduces duplication between different architectures' kernel-features.h files by making the architecture-independent file define various macros unconditionally (instead of only for a particular list of architectures), with the architecture-specific files then undefining the macros if necessary. Specifically, __ASSUME_O_CLOEXEC (O_CLOEXEC flag to open) and __ASSUME_SOCK_CLOEXEC (SOCK_NONBLOCK and SOCK_CLOEXEC flags to socket) are supported on all architectures as of 2.6.32 or the minimum kernel version for the architecture if later. For __ASSUME_IN_NONBLOCK, __ASSUME_PIPE2, __ASSUME_EVENTFD2, __ASSUME_SIGNALFD4 and __ASSUME_DUP3, the relevant syscalls were added for alpha in 2.6.33 but otherwise the features are available as of 2.6.32. For __ASSUME_UTIMES, support is everywhere in 2.6.32 except for asm-generic architectures and hppa. Although those were the main cases of duplication among kernel-features.h files, some other cases of unnecessary definitions were also cleaned up: the hppa file defined various macros that were either no longer used at all, or defined by the main file by default anyway, the ia64 file had duplicative definitions of __ASSUME_PSELECT and __ASSUME_PPOLL, while mips had such a definition of __ASSUME_IPC64. Really, rather than being defined in the main file then undefined for asm-generic architectures, __ASSUME_UTIMES should become an hppa-specific macro. Given that __ASSUME_ATFCTS and __ASSUME_UTIMENSAT are now always true, the only live __ASSUME_UTIMES conditional is in sysdeps/unix/sysv/linux/utimes.c, which is not used for asm-generic architectures. I think the desired state would be an hppa-specific file (that includes sysdeps/unix/sysv/linux/utimes.c if __ASSUME_UTIMES, and otherwise has fallback code), with the fallback code being removed from the main utimes.c. But I think that's most reasonably a separate cleanup once __ASSUME_ATFCTS and __ASSUME_UTIMESAT have both had conditional code cleaned up. Given this patch, I think it's straightforward to move non-ex-ports architectures to having their own kernel-features.h files, like ex-ports architectures, rather than conditionals in the main file (i.e., such a move won't require the architecture-specific file to contain anything that isn't genuinely architecture-specific), and would encourage architecture maintainers to do so. Tested x86_64 that the installed shared libraries are unchanged by this patch. Note that on some architectures this *will* cause __ASSUME_* macros to be defined in cases where they weren't previously but should have been (but this is just optimization, not a fix to a user-visible bug, so doesn't need a bug report in Bugzilla). * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES): Define unconditionally. (__ASSUME_O_CLOEXEC): Likewise. (__ASSUME_SOCK_CLOEXEC): Likewise. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_DUP3): Likewise. * sysdeps/unix/sysv/linux/aarch64/kernel-features.h (__ASSUME_DUP3): Do not define. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_O_CLOEXEC): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_SOCK_CLOEXEC): Likewise. (__ASSUME_UTIMES): Undefine. * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__ASSUME_UTIMES): Do not define. (__ASSUME_O_CLOEXEC): Likewise. (__ASSUME_SOCK_CLOEXEC): Likewise. (__ASSUME_IN_NONBLOCK): Undefine if [__LINUX_KERNEL_VERSION < 0x020621] instead of defining if [__LINUX_KERNEL_VERSION >= 0x020621]. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. [__LINUX_KERNEL_VERSION < 0x020621] (__ASSUME_DUP3): Undefine. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_UTIMES): Do not define. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. * sysdeps/unix/sysv/linux/hppa/kernel-features.h (__ASSUME_32BITUIDS): Likewise. (__ASSUME_TRUNCATE64_SYSCALL): Likewise. (__ASSUME_IPC64): Likewise. (__ASSUME_ST_INO_64_BIT): Likewise. (__ASSUME_GETDENTS64_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION < 0x030e00] (__ASSUME_UTIMES): Undefine. * sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_UTIMES): Do not define. (__ASSUME_PSELECT): Likewise. (__ASSUME_PPOLL): Likewise. (__ASSUME_O_CLOEXEC): Likewise. (__ASSUME_SOCK_CLOEXEC): Likewise. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_DUP3): Likewise. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_UTIMES): Likewise. (__ASSUME_O_CLOEXEC): Likewise. (__ASSUME_SOCK_CLOEXEC): Likewise. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_DUP3): Likewise. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_UTIMES): Likewise. (__ASSUME_O_CLOEXEC): Likewise. (__ASSUME_SOCK_CLOEXEC): Likewise. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_DUP3): Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_IPC64): Likewise. (__ASSUME_UTIMES): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. * sysdeps/unix/sysv/linux/tile/kernel-features.h (__ASSUME_O_CLOEXEC): Likewise. (__ASSUME_SOCK_CLOEXEC): Likewise. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_DUP3): Likewise. (__ASSUME_UTIMES): Undefine.
* Clean up ARM old-ABI symbol versioning relics.Joseph Myers2014-05-142-48/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up some symbol versioning code in the ARM port that exists only as relics of the old-ABI port, which was removed some time ago. The minimum symbol version in the ARM port is GLIBC_2.4 (the version where the EABI port was introduced). Thus, any SHLIB_COMPAT conditionals where the later version is 2.4 or later are obsolete and can be removed. In addition, there is no need to set symbol versions before 2.4 explicitly if the symbols would have a version of 2.4 by default anyway. This includes most of the entries in sysdeps/unix/sysv/linux/arm/Versions: those for GLIBC_2.0 are for libgcc unwind functions that aren't actually in ARM EABI glibc at all, while those for GLIBC_2.2 and GLIBC_2.3.3 are for functions which for the old-ABI port may have had versions different from the architecture-independent default, but where for EABI the default suffices (both the default and the version in that file map to 2.4, so the entries in that file do nothing). The GLIBC_2.1 entries are needed (architecture-specific functions), but it seems less confusing for those to say GLIBC_2.4, as the actual version those symbols in fact have. Various cases in the <fenv.h> functions where a function is defined as __fe* with an fe* versioned alias are cleaned up just to define fe* directly, as done e.g. on AArch64. If in future we actually need an __fe* name for use from C90 functions in libm as discussed recently, of course we can add one on all architectures and make the fe* name into a weak alias for that particular function, but for now the __fe* names aren't needed. In the case of posix_fadvise64, the __posix_fadvise64_l64 name and posix_fadvise64 alias are kept as __posix_fadvise64_l64 is used in posix_fadvise. (For that to be a namespace-clean use, posix_fadvise64 needs to be a *weak* alias not a strong one as at present, but that's an independent preexisting bug.) (There remain references to GLIBC_2_2 in sysdeps/unix/sysv/linux/arm/{msgctl.c,semctl.c,shmctl.c}. As those files are used by alpha which has a genuine 2.2 version for those functions, I think those references need to stay as-is.) Tested that the disassembly of installed shared libraries is unchanged by this patch (though function names shown in disassembly change to no longer have @@GLIBC_2.4, now those functions get versioned only by the version map and not redundantly at assembler time) and that the ABI tests pass. * sysdeps/arm/fclrexcpt.c (__feclearexcept): Rename to feclearexcept. Remove symbol versioning code. * sysdeps/arm/fegetenv.c (__fegetenv): Rename to fegetenv. Remove symbol versioning code. * sysdeps/arm/fesetenv.c (__fesetenv): Rename to fesetenv. Remove symbol versioning code. * sysdeps/arm/feupdateenv.c (__feupdateenv): Rename to feupdateenv. Remove symbol versioning code. * sysdeps/arm/fgetexcptflg.c (__fegetexceptflag): Rename to fegetexceptflag. Remove symbol versioning code. * sysdeps/arm/fsetexcptflg.c (__fesetexceptflag): Rename to fesetexceptflag. Remove symbol versioning code. * sysdeps/unix/sysv/linux/arm/Versions (libc): Remove GLIBC_2.0, GLIBC_2.2 and GLIBC_2.3.3 entries. Change GLIBC_2.1 to GLIBC_2.4. * sysdeps/unix/sysv/linux/arm/posix_fadvise64.c (__posix_fadvise64_l32): Remove prototype. [SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)]: Remove conditional code.
* Move NPTL public ABI headers for ARM to sysdeps/arm/nptl/.Roland McGrath2014-05-132-221/+0
|
* Verbatim NPTL file moves for ARM/Linux.Roland McGrath2014-05-1321-0/+0
|
* Consolidate NPTL configury for ARM/Linux.Roland McGrath2014-05-1310-41/+27
|
* Consolidate NPTL vs non clone.S for ARM.Roland McGrath2014-05-132-7/+1
|
* Clean up kernel version conditionals for pre-2.6.32 kernels.Joseph Myers2014-05-121-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does some initial cleanup, following the move to 2.6.32 minimum kernel version, by removing __LINUX_KERNEL_VERSION conditionals that are now always-true or always-false. In the case of __ASSUME_ARG_MAX_STACK_BASED, where the conditional used a kernel version that was itself in a macro, the associated sysconf.c code is also cleaned up and __ASSUME_ARG_MAX_STACK_BASED removed completely. Tested x86_64 that disassembly of installed shared libraries is unchanged by the patch. * sysdeps/unix/sysv/linux/kernel-features.h [__s390__] (__ASSUME_UTIMES): Do not condition on kernel version. (__ASSUME_PSELECT): Define unconditionally. (__ASSUME_PPOLL): Likewise. (__ASSUME_ATFCTS): Likewise. (__ASSUME_SET_ROBUST_LIST): Do not condition on kernel version. (__ASSUME_COMPLETE_READV_WRITEV): Define unconditionally. (__ASSUME_FUTEX_LOCK_PI): Do not condition on kernel version. (__ASSUME_UTIMENSAT): Define unconditionally. (__ASSUME_PRIVATE_FUTEX): Likewise. (__ASSUME_FALLOCATE): Likewise. (__ASSUME_O_CLOEXEC): Likewise. (__LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL): Remove. (__ASSUME_ARG_MAX_STACK_BASED): Likewise. (__ASSUME_ADJ_OFFSET_SS_READ): Define unconditionally. (__ASSUME_SOCK_CLOEXEC): Do not condition on kernel version. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_DUP3): Likewise. [__x86_64__ || __sparc__] (__ASSUME_ACCEPT4_SYSCALL): Likewise. (__ASSUME_FUTEX_CLOCK_REALTIME): Define unconditionally. (__ASSUME_AT_RANDOM): Likewise. (__ASSUME_PREADV): Likewise. (__ASSUME_PWRITEV): Likewise. (__ASSUME_REQUEUE_PI): Do not condition on kernel version. (__ASSUME_F_GETOWN_EX): Define unconditionally. (__ASSUME_XFS_RESTRICTED_CHOWN): Likewise. * sysdeps/unix/sysv/linux/sysconf.c (__sysconf) [!__ASSUME_ARG_MAX_STACK_BASED]: Remove conditional code. * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__ASSUME_O_CLOEXEC): Define unconditionally. (__ASSUME_PSELECT): Do not undefine conditionally. (__ASSUME_PPOLL): Likewise. (__ASSUME_ATFCTS): Likewise. (__ASSUME_SET_ROBUST_LIST): Likewise. (__ASSUME_UTIMENSAT): Likewise. (__ASSUME_FDATASYNC): Define unconditionally. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_SIGFRAME_V2): Likewise. )__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_PSELECT): Do not undefine conditionally. (__ASSUME_PPOLL): Likewise. * sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_PSELECT): Define unconditionally. (__ASSUME_PPOLL): Likewise. (__ASSUME_O_CLOEXEC): Likewise. (__ASSUME_SOCK_CLOEXEC): Likewise. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_DUP3): Likewise. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_O_CLOEXEC): Likewise. (__ASSUME_SOCK_CLOEXEC): Likewise. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_DUP3): Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_ACCEPT4_SYSCALL): Likewise.
* Move ARM internal unwind.h header to the right sysdeps directory.Roland McGrath2014-05-061-278/+0
|
* ARM: Remove lowlevellock.cWill Newton2014-05-011-132/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lowlevellock.c for arm differs from the generic lowlevellock.c only in insignificant ways, so can be removed. Happily, this fixes BZ 15119 (unnecessary busy loop in __lll_timedlock_wait on arm). The notable differences between the arm and generic implementations are: 1) arm __lll_timedlock_wait has a fast path out if futex has been set to 0 between since the function was called. This seems unlikely to happen very often, so it seems at worst harmless to lose this fast path. 2) Some function in arm's lowlevellock.c set futex to 2 if it was 1. The generic version always sets the futex to 2. As futex can only be 0, 1 or 2 on entry into these functions, the behaviour is equivalent. (If the futex manages to be 0 on entry then we've just lost another unlikely fast path out.) There are no test suite regressions. Note that hppa and sparc also have their own lowlevellock.c. I believe hppa can also be removed, so I'll send a separate patch for that shortly. sparc's seems to be genuinely needed as it uses a different locking structure. Also note that the analysis at https://sourceware.org/ml/libc-ports/2013-02/msg00021.html indicates a further locking performance bug to fix - I've got a partial patch for that which I can submit once I've finished testing. 2014-05-01 Bernard Ogden <bernie.ogden@linaro.org> [BZ #15119] * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c: Remove file.
* Fixed and unified pthread_once.Torvald Riegel2014-04-111-89/+0
| | | | | | | [BZ #15215] This unifies various pthread_once architecture-specific implementations which were using the same algorithm with slightly different implementations. It also adds missing memory barriers that are required for correctness.
* Move __PTHREAD_SPINS definition to architecture specific headerAdhemerval Zanella2014-04-091-0/+3
| | | | | | | This patch moves the __PTHREAD_SPINS definition to arch specific header since pthread_mutex_t layout is also arch specific. This leads to no need to defining __PTHREAD_MUTEX_HAVE_ELISION and thus removing of the undefined compiler warning.
* Correct robust mutex / PI futex kernel assumptions (bug 9894).Joseph Myers2014-03-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch continues fixing __ASSUME_* issues in preparation for moving to a 2.6.32 minimum kernel version by addressing assumptions on robust mutex and PI futex support availability. Those assumptions are bug 9894, but to be clear this patch does not address all the issues from that bug about wrong version assumptions, only those still applicable for --enable-kernel=2.6.32 or later (with the expectation that the move to that minimum kernel will obsolete the other parts of the bug). The patch is independent of <https://sourceware.org/ml/libc-alpha/2014-03/msg00585.html>, my other pending-review patch preparing for the kernel version change; the two together complete all the changes I believe are needed in preparation regarding any macro in sysdeps/unix/sysv/linux/kernel-features.h that would be affected by such a change. (I have not checked the correctness of macros whose conditions are unaffected by such a change, or macros only defined in other kernel-features.h files.) As discussed in that bug, robust mutexes and PI futexes need futex_atomic_cmpxchg_inatomic to be implemented, in addition to certain syscalls needed for robust mutexes (and architecture-independent kernel pieces for all the features in question). That is, as I understand it, they need futex_atomic_cmpxchg_inatomic to *work* (not return an ENOSYS error). The issues identified in my analysis relate to ARM, M68K, MicroBlaze, MIPS and SPARC. On ARM, whether futex_atomic_cmpxchg_inatomic works depends on the kernel configuration. As of 3.13, the condition for *not* working is CONFIG_CPU_USE_DOMAINS && CONFIG_SMP. As of 2.6.32 it was simply CONFIG_SMP that meant the feature was not implemented. I don't know if there are any circumstances in which we can say "we can assume a userspace glibc binary built with these options will never run on a kernel with the problematic configuration", but at least for now I'm just undefining the relevant __ASSUME_* macros for ARM. On M68K, two of the three macros are undefined for kernels before 3.10, but as far as I can see __ASSUME_FUTEX_LOCK_PI is in the same group needing futex_atomic_cmpxchg_inatomic support and so should be undefined as well. On MicroBlaze the required support was added in 2.6.33. On MIPS, the support depends on cpu_has_llsc in the kernel - that is, actual hardware LL/SC support (GCC and glibc for MIPS GNU/Linux rely on the instructions being supported in some way, but it may be kernel emulation; futex_atomic_cmpxchg_inatomic doesn't work with that emulation). The same condition as in GCC for indicating LL/SC support may not be available is used for undefining the macros in glibc, __mips == 1 || defined _MIPS_ARCH_R5900. (Maybe we could in fact desupport MIPS processors without the hardware support in glibc.) On SPARC, 32-bit kernels don't support futex_atomic_cmpxchg_inatomic; __arch64__ || __sparc_v9__ is used as the condition for binaries that won't run on 32-bit kernels. This patch is not tested beyond the sanity check of an x86_64 build. [BZ #9894] * sysdeps/unix/sysv/linux/kernel-features.h [__sparc__ && !__arch64__ && !__sparc_v9__] (__ASSUME_SET_ROBUST_LIST): Do not define. [__sparc__ && !__arch64__ && !__sparc_v9__] (__ASSUME_FUTEX_LOCK_PI): Likewise. [__sparc__ && !__arch64__ && !__sparc_v9__] (__ASSUME_REQUEUE_PI): Likewise. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_FUTEX_LOCK_PI): Undefine. (__ASSUME_REQUEUE_PI): Likewise. (__ASSUME_SET_ROBUST_LIST): Likewise. * sysdeps/unix/sysv/linux/m68k/kernel-features.h [__LINUX_KERNEL_VERSION < 0x030a00] (__ASSUME_FUTEX_LOCK_PI): Undefine. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h [__LINUX_KERNEL_VERSION < 0x020621] (__ASSUME_FUTEX_LOCK_PI): Likewise. [__LINUX_KERNEL_VERSION < 0x020621] (__ASSUME_REQUEUE_PI): Likewise. [__LINUX_KERNEL_VERSION < 0x020621] (__ASSUME_SET_ROBUST_LIST): Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h [__mips == 1 || _MIPS_ARCH_R5900] (__ASSUME_FUTEX_LOCK_PI): Undefine. [__mips == 1 || _MIPS_ARCH_R5900] (__ASSUME_REQUEUE_PI): Likewise. [__mips == 1 || _MIPS_ARCH_R5900] (__ASSUME_SET_ROBUST_LIST): Likewise.
* Fix __ASSUME_SENDMMSG issues (bug 16611).Joseph Myers2014-02-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the issues for accept4 and recvmmsg, __ASSUME_SENDMMSG is also confused about whether it relates to function availability or socketcall operation availability, and the conditions for the definition are always wrong (sendmmsg appeared in Linux kernel 3.0, not 2.6.39); this is now bug 16611. This patch splits the macro into separate macros like those for accept4 and recvmmsg, defining them for appropriate kernel versions. Tested x86_64, including that disassembly of the installed shared libraries is unchanged by this patch. [BZ #16611] * sysdeps/unix/sysv/linux/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x030000 && __ASSUME_SOCKETCALL] (__ASSUME_SENDMMSG_SOCKETCALL): Define. [__LINUX_KERNEL_VERSION >= 0x030000 && (__i386__ || __x86_64__ || __powerpc__ || __sh__ || __sparc__)] (__ASSUME_SENDMMSG_SYSCALL): Likewise. [__i386__ || __powerpc__ || __sh__ || __sparc__] (__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL): Likewise. [__ASSUME_SENDMMSG_SOCKETCALL || __ASSUME_SENDMMSG_SYSCALL] (__ASSUME_SENDMMSG): Define instead of using previous [__LINUX_KERNEL_VERSION >= 0x020627] condition. * sysdeps/unix/sysv/linux/aarch64/kernel-features.h (__ASSUME_SENDMMSG_SYSCALL): Define. * sysdeps/unix/sysv/linux/alpha/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x030200] (__ASSUME_SENDMMSG_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/arm/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/ia64/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/internal_sendmmsg.S [__ASSUME_SOCKETCALL && !__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL && !__ASSUME_SENDMMSG_SYSCALL] (__NR_sendmmsg): Undefine. [__ASSUME_SENDMMSG]: Change conditionals to [__ASSUME_SENDMMSG_SOCKETCALL]. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x030300] (__ASSUME_SENDMMSG_SYSCALL): Define. * sysdeps/unix/sysv/linux/mips/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x030100] (__ASSUME_SENDMMSG_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/sendmmsg.c [__ASSUME_SOCKETCALL && !__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL && !__ASSUME_SENDMMSG_SYSCALL] (__NR_sendmmsg): Undefine. [!__ASSUME_SENDMMSG]: Change conditional to [!__ASSUME_SENDMMSG_SOCKETCALL]. * sysdeps/unix/sysv/linux/tile/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL): Define. * sysdeps/unix/sysv/linux/hppa/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x030100] (__ASSUME_SENDMMSG_SYSCALL): Define.
* Fix __ASSUME_RECVMMSG issues (bug 16610).Joseph Myers2014-02-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the issues for accept4, __ASSUME_RECVMMSG is also confused about whether it relates to function availability or socketcall operation availability; this is now bug 16610. Nothing actually tests __ASSUME_RECVMMSG for function availability, but implicit in the definition in kernel-features.h is the idea that it makes sense when the syscall is available and socketcall is not being used. As with accept4, there are architectures where the syscall was added later than the socketcall operation, meaning that assuming glibc is built with recent enough kernel headers, it does not attempt to use socketcall for these operations and __ASSUME_RECVMMSG gets defined for kernels >= 2.6.33 even when the syscall was only added later. This patch splits the macro into separate macros like those used for accept4; having similar macro structure in both cases (and for sendmmsg once I've dealt with that) seems likely to be less confusing than having a different structure on the basis of nothing actually needing to assume the recvmmsg function works. Appropriate definitions are added for all architectures. Architecture-specific note: Tile's kernel-features.h says "TILE glibc support starts with 2.6.36", which is accurate in that 2.6.36 was the first kernel version with Tile support, and on that basis I've made that header define __ASSUME_RECVMMSG_SYSCALL unconditionally. However, Tile's configure.ac has arch_minimum_kernel=2.6.32. Since arch_minimum_kernel is meant to reflect only kernel.org kernel versions, I think that should change to 2.6.36. (If using glibc with kernel versions from before a port went in kernel.org, it's your responsibility to change arch_minimum_kernel in a local patch, and at the same time to adjust any __ASSUME_* definitions that may not be correct for your older kernel; for developing the official glibc it should only ever be necessary to consider what official kernel.org releases support.) Tested x86_64, including that disassembly of the installed shared libraries is unchanged by this patch. [BZ #16610] * sysdeps/unix/sysv/linux/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621 && __ASSUME_SOCKETCALL] (__ASSUME_RECVMMSG_SOCKETCALL): Define. [(__LINUX_KERNEL_VERSION >= 0x020621 && (__i386__ || __x86_64__ || __sparc__)) || (__LINUX_KERNEL_VERSION >= 0x020625 && (__powerpc__ || __sh__))] (__ASSUME_RECVMMSG_SYSCALL): Likewise. [__i386__ || __sparc__] (__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL): Likewise. [__ASSUME_RECVMMSG_SOCKETCALL || __ASSUME_RECVMMSG_SYSCALL] (__ASSUME_RECVMMSG): Define instead of using previous [__LINUX_KERNEL_VERSION >= 0x020621] condition. * sysdeps/unix/sysv/linux/aarch64/kernel-features.h (__ASSUME_RECVMMSG_SYSCALL): Define. * sysdeps/unix/sysv/linux/alpha/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/arm/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/ia64/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/internal_recvmmsg.S [__ASSUME_SOCKETCALL && !__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL && !__ASSUME_RECVMMSG_SYSCALL] (__NR_recvmmsg): Undefine. [__ASSUME_RECVMMSG]: Change condition to [__ASSUME_RECVMMSG_SOCKETCALL]. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL): Define. (__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL): Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/recvmmsg.c [__ASSUME_SOCKETCALL && !__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL && !__ASSUME_RECVMMSG_SYSCALL] (__NR_recvmmsg): Undefine. [!__ASSUME_RECVMMSG]: Change condition to [!__ASSUME_RECVMMSG_SOCKETCALL]. * sysdeps/unix/sysv/linux/tile/kernel-features.h (__ASSUME_RECVMMSG_SYSCALL): Define. * sysdeps/unix/sysv/linux/hppa/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020622] (__ASSUME_RECVMMSG_SYSCALL): Define.
* Fix __ASSUME_ACCEPT4 issues (bug 16609).Joseph Myers2014-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In <https://sourceware.org/ml/libc-alpha/2013-12/msg00008.html>, Aurelien noted issues with the definition of __ASSUME_ACCEPT4, which I discussed in more detail in <https://sourceware.org/ml/libc-alpha/2013-12/msg00014.html>; these are now bug 16609. As previously noted, __ASSUME_ACCEPT4 is used in two ways: * In OS-independent code, to mean "accept4 can be assumed to work rather than fail with ENOSYS". It doesn't matter whether it's implemented with socketcall or a separate syscall. * In Linux-specific code, to mean "the socketcall multiplex syscall can be assumed to handle the accept4 operation. When used in Linux-specific code, it *never* refers to anything relating to the accept4 syscall, only to the socketcall multiplexer. This patch splits the macro into separate __ASSUME_ACCEPT4_SOCKETCALL, __ASSUME_ACCEPT4_SYSCALL and __ASSUME_ACCEPT4 to clarify the different cases involved. A macro __ASSUME_SOCKETCALL is added for convenience in writing logic relating to all socketcall architectures. In addition, to address the issue of architectures where socketcall support for accept4 was added before a separate syscall was added (and so the separate syscall should not be used unless known to be present or fallback to socketcall is available), a fourth macro __ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL is added to indicate that the syscall became available at the same time as socketcall support. This is then used in the relevant places in a conditional determining whether to undefine __NR_accept4 (the simple approach to avoiding the syscall's presence causing problems; I didn't try to implement runtime fallback from the syscall to socketcall). Architecture-specific note: alpha defined __ASSUME_ACCEPT4 for 2.6.33 and later, but actually the syscall was added for alpha in 3.2, so this patch uses the correct condition for __ASSUME_ACCEPT4_SYSCALL there. Tested x86_64, including that disassembly of the installed shared libraries is unchanged by this patch. [BZ #16609] * sysdeps/unix/sysv/linux/kernel-features.h [__i386__ || __powerpc__ || __s390__ || __sh__ || __sparc__] (__ASSUME_SOCKETCALL): Define. [__LINUX_KERNEL_VERSION && __ASSUME_SOCKETCALL] (__ASSUME_ACCEPT4_SOCKETCALL): Likewise. [(__LINUX_KERNEL_VERSION >= 0x02061c && (__x86_64__ || __sparc__)) || (__LINUX_KERNEL_VERSION >= 0x020625 && (__powerpc__ || __sh__))] (__ASSUME_ACCEPT4_SYSCALL): Likewise. [__sparc__] (__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL): Likewise. [__ASSUME_ACCEPT4_SOCKETCALL || __ASSUME_ACCEPT4_SYSCALL] (__ASSUME_ACCEPT4): Define instead of using previous [__LINUX_KERNEL_VERSION >= 0x02061c && (__i386__ || __x86_64__ || __powerpc__ || __sparc__ || __s390__)] condition. * sysdeps/unix/sysv/linux/aarch64/kernel-features.h (__ASSUME_ACCEPT4): Change to __ASSUME_ACCEPT4_SYSCALL. * sysdeps/unix/sysv/linux/accept4.c [__ASSUME_SOCKETCALL && !__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL && !__ASSUME_ACCEPT4_SYSCALL] (__NR_accept4): Undefine. [!__ASSUME_ACCEPT4]: Change condition to [!__ASSUME_ACCEPT4_SOCKETCALL]. * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__ASSUME_ACCEPT4): Change to __ASSUME_ACCEPT4_SYSCALL. Correct condition to [__LINUX_KERNEL_VERSION >= 0x030200]. * sysdeps/unix/sysv/linux/arm/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020624] (__ASSUME_ACCEPT4): Change to __ASSUME_ACCEPT4_SYSCALL. * sysdeps/unix/sysv/linux/i386/accept4.S [__ASSUME_ACCEPT4]: Change conditions to [__ASSUME_ACCEPT4_SOCKETCALL]. * sysdeps/unix/sysv/linux/ia64/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x030300] (__ASSUME_ACCEPT4): Change to __ASSUME_ACCEPT4_SYSCALL. * sysdeps/unix/sysv/linux/internal_accept4.S [__ASSUME_SOCKETCALL && !__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL && !__ASSUME_ACCEPT4_SYSCALL] (__NR_accept4): Undefine. [__ASSUME_ACCEPT4]: Change condition to [__ASSUME_ACCEPT4_SOCKETCALL]. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_SOCKETCALL): Define. [__LINUX_KERNEL_VERSION >= 0x02061c] (__ASSUME_ACCEPT4): Remove. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_SOCKETCALL): Define. (__ASSUME_ACCEPT4): Remove. [__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_ACCEPT4_SYSCALL): Define. * sysdeps/unix/sysv/linux/mips/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x02061f] (__ASSUME_ACCEPT4_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/tile/kernel-features.h (__ASSUME_ACCEPT4): Change to __ASSUME_ACCEPT4_SYSCALL. * sysdeps/unix/sysv/linux/hppa/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020622] (__ASSUME_ACCEPT4_SYSCALL): Define.