mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-24 11:41:07 +00:00
4f41c682f3
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.
313 lines
9.8 KiB
Bash
313 lines
9.8 KiB
Bash
#! /bin/sh
|
|
|
|
# Usage: make-syscalls.sh ../sysdeps/unix/common
|
|
# Expects $sysdirs in environment.
|
|
|
|
##############################################################################
|
|
#
|
|
# This script is used to process the syscall data encoded in the various
|
|
# syscalls.list files to produce thin assembly syscall wrappers around the
|
|
# appropriate OS syscall. See syscall-template.s for more details on the
|
|
# actual wrapper.
|
|
#
|
|
# Syscall Signature Prefixes:
|
|
#
|
|
# C: cancellable (i.e., this syscall is a cancellation point)
|
|
# E: errno and return value are not set by the call
|
|
# V: errno is not set, but errno or zero (success) is returned from the call
|
|
#
|
|
# Syscall Signature Key Letters:
|
|
#
|
|
# a: unchecked address (e.g., 1st arg to mmap)
|
|
# b: non-NULL buffer (e.g., 2nd arg to read; return value from mmap)
|
|
# B: optionally-NULL buffer (e.g., 4th arg to getsockopt)
|
|
# f: buffer of 2 ints (e.g., 4th arg to socketpair)
|
|
# F: 3rd arg to fcntl
|
|
# i: scalar (any signedness & size: int, long, long long, enum, whatever)
|
|
# I: 3rd arg to ioctl
|
|
# n: scalar buffer length (e.g., 3rd arg to read)
|
|
# N: pointer to value/return scalar buffer length (e.g., 6th arg to recvfrom)
|
|
# p: non-NULL pointer to typed object (e.g., any non-void* arg)
|
|
# P: optionally-NULL pointer to typed object (e.g., 2nd argument to gettimeofday)
|
|
# s: non-NULL string (e.g., 1st arg to open)
|
|
# S: optionally-NULL string (e.g., 1st arg to acct)
|
|
# v: vararg scalar (e.g., optional 3rd arg to open)
|
|
# V: byte-per-page vector (3rd arg to mincore)
|
|
# W: wait status, optionally-NULL pointer to int (e.g., 2nd arg of wait4)
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
thisdir=$1; shift
|
|
|
|
echo ''
|
|
echo \#### DIRECTORY = $thisdir
|
|
# Check each sysdep dir with higher priority than this one,
|
|
# and remove from $calls all the functions found in other dirs.
|
|
# Punt when we reach the directory defining these syscalls.
|
|
sysdirs=`for dir in $sysdirs; do
|
|
test $dir = $thisdir && break; echo $dir; done`
|
|
echo \#### SYSDIRS = $sysdirs
|
|
|
|
# Get the list of system calls for this directory.
|
|
calls=`sed 's/#.*$//
|
|
/^[ ]*$/d' $thisdir/syscalls.list`
|
|
|
|
calls=`echo "$calls" |
|
|
while read file caller rest; do
|
|
# Remove each syscall that is implemented by a file in $dir.
|
|
# If a syscall specified a "caller", then only compile that syscall
|
|
# if the caller function is also implemented in this directory.
|
|
srcfile=-;
|
|
for dir in $sysdirs; do
|
|
{ test -f $dir/$file.c && srcfile=$dir/$file.c; } ||
|
|
{ test -f $dir/$file.S && srcfile=$dir/$file.S; } ||
|
|
{ test x$caller != x- &&
|
|
{ { test -f $dir/$caller.c && srcfile=$dir/$caller.c; } ||
|
|
{ test -f $dir/$caller.S && srcfile=$dir/$caller.S; }; }; } && break;
|
|
done;
|
|
echo $file $srcfile $caller $rest;
|
|
done`
|
|
|
|
# Any calls left?
|
|
test -n "$calls" || exit 0
|
|
|
|
# This uses variables $weak, $strong, and $any_versioned.
|
|
emit_weak_aliases()
|
|
{
|
|
# A shortcoming in the current gas is that it will only allow one
|
|
# version-alias per symbol. So we create new strong aliases as needed.
|
|
vcount=""
|
|
|
|
# We use the <shlib-compat.h> macros to generate the versioned aliases
|
|
# so that the version sets can be mapped to the configuration's
|
|
# minimum version set as per shlib-versions DEFAULT lines. But note
|
|
# we don't generate any "#if SHLIB_COMPAT (...)" conditionals. To do
|
|
# that we'd need to change the syscalls.list format so that it can
|
|
# list the "obsoleted" version set too. If it ever arises that we
|
|
# have a syscall entry point that is obsoleted by a newer version set,
|
|
# we'll have to revamp all this.
|
|
if [ $any_versioned = t ]; then
|
|
echo " echo '#include <shlib-compat.h>'; \\"
|
|
fi
|
|
|
|
for name in $weak; do
|
|
case $name in
|
|
*@@*)
|
|
base=`echo $name | sed 's/@@.*//'`
|
|
ver=`echo $name | sed 's/.*@@//;s/\./_/g'`
|
|
echo " echo '#if IS_IN (libc)'; \\"
|
|
if test -z "$vcount" ; then
|
|
source=$strong
|
|
vcount=1
|
|
else
|
|
source="${strong}_${vcount}"
|
|
vcount=`expr $vcount + 1`
|
|
echo " echo 'strong_alias ($strong, $source)'; \\"
|
|
fi
|
|
echo " echo 'versioned_symbol (libc, $source, $base, $ver)'; \\"
|
|
echo " echo '#else'; \\"
|
|
echo " echo 'strong_alias ($strong, $base)'; \\"
|
|
echo " echo '#endif'; \\"
|
|
;;
|
|
*@*)
|
|
base=`echo $name | sed 's/@.*//'`
|
|
ver=`echo $name | sed 's/.*@//;s/\./_/g'`
|
|
echo " echo '#if defined SHARED && IS_IN (libc)'; \\"
|
|
if test -z "$vcount" ; then
|
|
source=$strong
|
|
vcount=1
|
|
else
|
|
source="${strong}_${vcount}"
|
|
vcount=`expr $vcount + 1`
|
|
echo " echo 'strong_alias ($strong, $source)'; \\"
|
|
fi
|
|
echo " echo 'compat_symbol (libc, $source, $base, $ver)'; \\"
|
|
echo " echo '#endif'; \\"
|
|
;;
|
|
!*)
|
|
name=`echo $name | sed 's/.//'`
|
|
echo " echo 'strong_alias ($strong, $name)'; \\"
|
|
echo " echo 'libc_hidden_def ($name)'; \\"
|
|
;;
|
|
*)
|
|
echo " echo 'weak_alias ($strong, $name)'; \\"
|
|
echo " echo 'libc_hidden_weak ($name)'; \\"
|
|
;;
|
|
esac
|
|
done
|
|
}
|
|
|
|
|
|
# Emit rules to compile the syscalls remaining in $calls.
|
|
echo "$calls" |
|
|
while read file srcfile caller syscall args strong weak; do
|
|
|
|
vdso_syscall=
|
|
case x"$syscall" in
|
|
*:*@*)
|
|
vdso_syscall="${syscall#*:}"
|
|
syscall="${syscall%:*}"
|
|
;;
|
|
esac
|
|
|
|
case x"$syscall" in
|
|
x-) callnum=_ ;;
|
|
*)
|
|
# Figure out if $syscall is defined with a number in syscall.h.
|
|
callnum=-
|
|
eval `{ echo "#include <sysdep.h>";
|
|
echo "callnum=SYS_ify ($syscall)"; } |
|
|
$asm_CPP -D__OPTIMIZE__ - |
|
|
sed -n -e "/^callnum=.*$syscall/d" \
|
|
-e "/^\(callnum=\)[ ]*\(.*\)/s//\1'\2'/p"`
|
|
;;
|
|
esac
|
|
|
|
cancellable=0
|
|
noerrno=0
|
|
errval=0
|
|
case $args in
|
|
C*) cancellable=1; args=`echo $args | sed 's/C:\?//'`;;
|
|
E*) noerrno=1; args=`echo $args | sed 's/E:\?//'`;;
|
|
V*) errval=1; args=`echo $args | sed 's/V:\?//'`;;
|
|
esac
|
|
|
|
# Derive the number of arguments from the argument signature
|
|
case $args in
|
|
[0-9]) nargs=$args;;
|
|
?:) nargs=0;;
|
|
?:?) nargs=1;;
|
|
?:??) nargs=2;;
|
|
?:???) nargs=3;;
|
|
?:????) nargs=4;;
|
|
?:?????) nargs=5;;
|
|
?:??????) nargs=6;;
|
|
?:???????) nargs=7;;
|
|
?:????????) nargs=8;;
|
|
?:?????????) nargs=9;;
|
|
esac
|
|
|
|
# Make sure only the first syscall rule is used, if multiple dirs
|
|
# define the same syscall.
|
|
echo ''
|
|
echo "#### CALL=$file NUMBER=$callnum ARGS=$args SOURCE=$srcfile"
|
|
|
|
# If there are versioned aliases the entry is only generated for the
|
|
# shared library, unless it is a default version.
|
|
any_versioned=f
|
|
shared_only=f
|
|
case $weak in
|
|
*@@*) any_versioned=t ;;
|
|
*@*) any_versioned=t shared_only=t ;;
|
|
esac
|
|
|
|
case x$srcfile"$callnum" in
|
|
x--)
|
|
# Undefined callnum for an extra syscall.
|
|
if [ x$caller != x- ]; then
|
|
if [ $noerrno != 0 ]; then
|
|
echo >&2 "$0: no number for $fileno, no-error syscall ($strong $weak)"
|
|
exit 2
|
|
fi
|
|
echo "unix-stub-syscalls += $strong $weak"
|
|
fi
|
|
;;
|
|
x*-) ;; ### Do nothing for undefined callnum
|
|
x-*)
|
|
echo "ifeq (,\$(filter $file,\$(unix-syscalls)))"
|
|
|
|
if test $shared_only = t; then
|
|
# The versioned symbols are only in the shared library.
|
|
echo "ifneq (,\$(filter .os,\$(object-suffixes)))"
|
|
fi
|
|
# Accumulate the list of syscall files for this directory.
|
|
echo "unix-syscalls += $file"
|
|
test x$caller = x- || echo "unix-extra-syscalls += $file"
|
|
|
|
# Emit a compilation rule for this syscall.
|
|
if test $shared_only = t; then
|
|
# The versioned symbols are only in the shared library.
|
|
echo "shared-only-routines += $file"
|
|
test -n "$vdso_syscall" || echo "\$(objpfx)${file}.os: \\"
|
|
else
|
|
object_suffixes='$(object-suffixes)'
|
|
test -z "$vdso_syscall" || object_suffixes='$(object-suffixes-noshared)'
|
|
echo "\
|
|
\$(foreach p,\$(sysd-rules-targets),\
|
|
\$(foreach o,${object_suffixes},\$(objpfx)\$(patsubst %,\$p,$file)\$o)): \\"
|
|
fi
|
|
|
|
echo " \$(..)sysdeps/unix/make-syscalls.sh"
|
|
case x"$callnum" in
|
|
x_)
|
|
echo "\
|
|
\$(make-target-directory)
|
|
(echo '/* Dummy module requested by syscalls.list */'; \\"
|
|
;;
|
|
x*)
|
|
echo "\
|
|
\$(make-target-directory)
|
|
(echo '#define SYSCALL_NAME $syscall'; \\
|
|
echo '#define SYSCALL_NARGS $nargs'; \\
|
|
echo '#define SYSCALL_SYMBOL $strong'; \\"
|
|
[ $cancellable = 0 ] || echo "\
|
|
echo '#define SYSCALL_CANCELLABLE 1'; \\"
|
|
[ $noerrno = 0 ] || echo "\
|
|
echo '#define SYSCALL_NOERRNO 1'; \\"
|
|
[ $errval = 0 ] || echo "\
|
|
echo '#define SYSCALL_ERRVAL 1'; \\"
|
|
echo "\
|
|
echo '#include <syscall-template.S>'; \\"
|
|
;;
|
|
esac
|
|
|
|
# Append any weak aliases or versions defined for this syscall function.
|
|
emit_weak_aliases
|
|
|
|
# And finally, pipe this all into the compiler.
|
|
echo ' ) | $(compile-syscall) '"\
|
|
\$(foreach p,\$(patsubst %$file,%,\$(basename \$(@F))),\$(\$(p)CPPFLAGS))"
|
|
|
|
if test -n "$vdso_syscall"; then
|
|
# In the shared library, we're going to emit an IFUNC using a vDSO function.
|
|
# $vdso_syscall looks like "name@KERNEL_X.Y" where "name" is the symbol
|
|
# name in the vDSO and KERNEL_X.Y is its symbol version.
|
|
vdso_symbol="${vdso_syscall%@*}"
|
|
vdso_symver="${vdso_syscall#*@}"
|
|
vdso_symver=`echo "$vdso_symver" | sed 's/\./_/g'`
|
|
echo "\
|
|
\$(foreach p,\$(sysd-rules-targets),\$(objpfx)\$(patsubst %,\$p,$file).os): \\
|
|
\$(..)sysdeps/unix/make-syscalls.sh\
|
|
\$(make-target-directory)
|
|
(echo '#include <dl-vdso.h>'; \\
|
|
echo 'extern void *${strong}_ifunc (void) __asm (\"${strong}\");'; \\
|
|
echo 'void *'; \\
|
|
echo '${strong}_ifunc (void)'; \\
|
|
echo '{'; \\
|
|
echo ' PREPARE_VERSION_KNOWN (symver, ${vdso_symver});'; \\
|
|
echo ' return _dl_vdso_vsym (\"${vdso_symbol}\", &symver);'; \\
|
|
echo '}'; \\
|
|
echo 'asm (\".type ${strong}, %gnu_indirect_function\");'; \\"
|
|
# This is doing "libc_hidden_def (${strong})", but the compiler
|
|
# doesn't know that we've defined ${strong} in the same file, so
|
|
# we can't do it the normal way.
|
|
echo "\
|
|
echo 'asm (\".globl __GI_${strong}\\n\"'; \\
|
|
echo ' \"__GI_${strong} = ${strong}\");'; \\"
|
|
emit_weak_aliases
|
|
echo ' ) | $(compile-stdin.c) '"\
|
|
\$(foreach p,\$(patsubst %$file,%,\$(basename \$(@F))),\$(\$(p)CPPFLAGS))"
|
|
fi
|
|
|
|
if test $shared_only = t; then
|
|
# The versioned symbols are only in the shared library.
|
|
echo endif
|
|
fi
|
|
|
|
echo endif
|
|
;;
|
|
esac
|
|
|
|
done
|