diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386')
47 files changed, 252 insertions, 1323 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S index a7640d9892..865141a95b 100644 --- a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2018 Free Software Foundation, Inc. +/* Copyright (C) 2001-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> #include <jmpbuf-offsets.h> diff --git a/sysdeps/unix/sysv/linux/i386/_exit.S b/sysdeps/unix/sysv/linux/i386/_exit.S index a10eedecc4..d59c127501 100644 --- a/sysdeps/unix/sysv/linux/i386/_exit.S +++ b/sysdeps/unix/sysv/linux/i386/_exit.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2018 Free Software Foundation, Inc. +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> diff --git a/sysdeps/unix/sysv/linux/i386/brk.c b/sysdeps/unix/sysv/linux/i386/brk.c index 7b8a1a0f6d..885d01291e 100644 --- a/sysdeps/unix/sysv/linux/i386/brk.c +++ b/sysdeps/unix/sysv/linux/i386/brk.c @@ -1,5 +1,5 @@ /* brk system call for Linux/i386. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if BUILD_PIE_DEFAULT /* Can't use "call *%gs:SYSINFO_OFFSET" during statup in static PIE. */ diff --git a/sysdeps/unix/sysv/linux/i386/clone.S b/sysdeps/unix/sysv/linux/i386/clone.S index e3b0cf18f7..9d47a3c516 100644 --- a/sysdeps/unix/sysv/linux/i386/clone.S +++ b/sysdeps/unix/sysv/linux/i386/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2018 Free Software Foundation, Inc. +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@tamu.edu) @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* clone() is even more special than fork() as it mucks with stacks and invokes a function in the right context after its all over. */ diff --git a/sysdeps/unix/sysv/linux/i386/dl-librecon.h b/sysdeps/unix/sysv/linux/i386/dl-librecon.h index d320ea81fc..5bdc39d815 100644 --- a/sysdeps/unix/sysv/linux/i386/dl-librecon.h +++ b/sysdeps/unix/sysv/linux/i386/dl-librecon.h @@ -1,5 +1,5 @@ /* Optional code to distinguish library flavours. - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DL_LIBRECON_H diff --git a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h b/sysdeps/unix/sysv/linux/i386/dl-procinfo.h index b454367b72..d64354e2ba 100644 --- a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/i386/dl-procinfo.h @@ -1,5 +1,5 @@ /* Linux/i386 version of processor capability information handling macros. - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DL_I386_PROCINFO_H #define _DL_I386_PROCINFO_H 1 @@ -30,8 +30,8 @@ _dl_procinfo (unsigned int type, unsigned long int word) in the kernel sources. */ int i; - /* Fallback to unknown output mechanism. */ - if (type == AT_HWCAP2) + /* Fallback to generic output mechanism. */ + if (type != AT_HWCAP) return -1; _dl_printf ("AT_HWCAP: "); diff --git a/sysdeps/unix/sysv/linux/i386/dl-sysdep.h b/sysdeps/unix/sysv/linux/i386/dl-sysdep.h index ade0279abc..70149a9d5d 100644 --- a/sysdeps/unix/sysv/linux/i386/dl-sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. i386 version. - Copyright (C) 2002-2018 Free Software Foundation, Inc. + Copyright (C) 2002-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINUX_I386_DL_SYSDEP_H diff --git a/sysdeps/unix/sysv/linux/i386/fxstat.c b/sysdeps/unix/sysv/linux/i386/fxstat.c index 83917e8495..f177206609 100644 --- a/sysdeps/unix/sysv/linux/i386/fxstat.c +++ b/sysdeps/unix/sysv/linux/i386/fxstat.c @@ -1,5 +1,5 @@ /* fxstat using old-style Unix fstat system call. - Copyright (C) 1991-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Ho hum, if xstat == xstat64 we must get rid of the prototype or gcc will complain since they don't strictly match. */ diff --git a/sysdeps/unix/sysv/linux/i386/fxstatat.c b/sysdeps/unix/sysv/linux/i386/fxstatat.c index bcd07fc382..6cfeb0e53a 100644 --- a/sysdeps/unix/sysv/linux/i386/fxstatat.c +++ b/sysdeps/unix/sysv/linux/i386/fxstatat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2018 Free Software Foundation, Inc. +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Ho hum, if fxstatat == fxstatat64 we must get rid of the prototype or gcc will complain since they don't strictly match. */ diff --git a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c b/sysdeps/unix/sysv/linux/i386/get_clockfreq.c deleted file mode 100644 index 633f186be8..0000000000 --- a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c +++ /dev/null @@ -1,88 +0,0 @@ -/* Get frequency of the system processor. i386/Linux version. - Copyright (C) 2000-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <ctype.h> -#include <fcntl.h> -#include <string.h> -#include <unistd.h> - -hp_timing_t -__get_clockfreq (void) -{ - /* We read the information from the /proc filesystem. It contains at - least one line like - cpu MHz : 497.840237 - or also - cpu MHz : 497.841 - We search for this line and convert the number in an integer. */ - static hp_timing_t result; - int fd; - - /* If this function was called before, we know the result. */ - if (result != 0) - return result; - - fd = __open ("/proc/cpuinfo", O_RDONLY); - if (__glibc_likely (fd != -1)) - { - /* XXX AFAIK the /proc filesystem can generate "files" only up - to a size of 4096 bytes. */ - char buf[4096]; - ssize_t n; - - n = __read (fd, buf, sizeof buf); - if (__builtin_expect (n, 1) > 0) - { - char *mhz = memmem (buf, n, "cpu MHz", 7); - - if (__glibc_likely (mhz != NULL)) - { - char *endp = buf + n; - int seen_decpoint = 0; - int ndigits = 0; - - /* Search for the beginning of the string. */ - while (mhz < endp && (*mhz < '0' || *mhz > '9') && *mhz != '\n') - ++mhz; - - while (mhz < endp && *mhz != '\n') - { - if (*mhz >= '0' && *mhz <= '9') - { - result *= 10; - result += *mhz - '0'; - if (seen_decpoint) - ++ndigits; - } - else if (*mhz == '.') - seen_decpoint = 1; - - ++mhz; - } - - /* Compensate for missing digits at the end. */ - while (ndigits++ < 6) - result *= 10; - } - } - - __close (fd); - } - - return result; -} diff --git a/sysdeps/unix/sysv/linux/i386/getcontext.S b/sysdeps/unix/sysv/linux/i386/getcontext.S index 26ca08a8c7..1568f9604a 100644 --- a/sysdeps/unix/sysv/linux/i386/getcontext.S +++ b/sysdeps/unix/sysv/linux/i386/getcontext.S @@ -1,5 +1,5 @@ /* Save current context. - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2001. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> diff --git a/sysdeps/unix/sysv/linux/i386/getmsg.c b/sysdeps/unix/sysv/linux/i386/getmsg.c deleted file mode 100644 index 0ae87f2a9e..0000000000 --- a/sysdeps/unix/sysv/linux/i386/getmsg.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1998-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <stddef.h> -#include <stropts.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -#ifdef __NR_getpmsg -int -getmsg (int fildes, struct strbuf *ctlptr, struct strbuf *dataptr, int *flagsp) -{ - return INLINE_SYSCALL (getpmsg, 5, fildes, ctlptr, dataptr, NULL, flagsp); -} -#else -# include <streams/getmsg.c> -#endif diff --git a/sysdeps/unix/sysv/linux/i386/gettimeofday.c b/sysdeps/unix/sysv/linux/i386/gettimeofday.c deleted file mode 100644 index 6f561ffe39..0000000000 --- a/sysdeps/unix/sysv/linux/i386/gettimeofday.c +++ /dev/null @@ -1,35 +0,0 @@ -/* gettimeofday - get the time. Linux/i386 version. - Copyright (C) 2015-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#ifdef SHARED -# define __gettimeofday __redirect___gettimeofday -#endif - -#include <sys/time.h> - -#ifdef SHARED -# undef __gettimeofday -# define __gettimeofday_type __redirect___gettimeofday - -# undef libc_hidden_def -# define libc_hidden_def(name) \ - __hidden_ver1 (__gettimeofday_syscall, __GI___gettimeofday, \ - __gettimeofday_syscall); -#endif - -#include <sysdeps/unix/sysv/linux/x86/gettimeofday.c> diff --git a/sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h b/sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h index 83de2f5040..c1666d93ed 100644 --- a/sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. IA-32 version. - Copyright (C) 2002-2018 Free Software Foundation, Inc. + Copyright (C) 2002-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINUX_I686_DL_SYSDEP_H #define _LINUX_I686_DL_SYSDEP_H 1 diff --git a/sysdeps/unix/sysv/linux/i386/init-first.c b/sysdeps/unix/sysv/linux/i386/init-first.c deleted file mode 100644 index 82ac7f5cf2..0000000000 --- a/sysdeps/unix/sysv/linux/i386/init-first.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Initialization code run first thing by the ELF startup code. Linux/i386. - Copyright (C) 2015-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#ifdef SHARED -# include <time.h> -# include <sysdep.h> -# include <dl-vdso.h> -# include <sysdep-vdso.h> - -long int (*VDSO_SYMBOL (clock_gettime)) (clockid_t, struct timespec *) - attribute_hidden; - -static long int -clock_gettime_syscall (clockid_t id, struct timespec *tp) -{ - INTERNAL_SYSCALL_DECL (err); - return INTERNAL_SYSCALL (clock_gettime, err, 2, id, tp); -} - -static inline void -__vdso_platform_setup (void) -{ - PREPARE_VERSION_KNOWN (linux26, LINUX_2_6); - - void *p = _dl_vdso_vsym ("__vdso_clock_gettime", &linux26); - if (p == NULL) - p = clock_gettime_syscall; - PTR_MANGLE (p); - VDSO_SYMBOL (clock_gettime) = p; -} - -# define VDSO_SETUP __vdso_platform_setup -#endif - -#include <csu/init-first.c> diff --git a/sysdeps/unix/sysv/linux/i386/kernel-features.h b/sysdeps/unix/sysv/linux/i386/kernel-features.h index f3cfd48c44..9db3b3a31c 100644 --- a/sysdeps/unix/sysv/linux/i386/kernel-features.h +++ b/sysdeps/unix/sysv/linux/i386/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. i386 version. - Copyright (C) 1999-2018 Free Software Foundation, Inc. + Copyright (C) 1999-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -15,10 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -/* i386 uses socketcall. */ -#define __ASSUME_SOCKETCALL 1 + <https://www.gnu.org/licenses/>. */ /* Direct socketcalls available with kernel 4.3. */ #if __LINUX_KERNEL_VERSION >= 0x040300 @@ -46,8 +43,11 @@ # undef __ASSUME_SENDTO_SYSCALL #endif -/* i686 only supports ipc syscall. */ -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +/* i686 only supports ipc syscall before 5.1. */ +#if __LINUX_KERNEL_VERSION < 0x050100 +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 +#endif #undef __ASSUME_CLONE_DEFAULT #define __ASSUME_CLONE_BACKWARDS 1 diff --git a/sysdeps/unix/sysv/linux/i386/ldconfig.h b/sysdeps/unix/sysv/linux/i386/ldconfig.h index ad8f826509..79907bb4ac 100644 --- a/sysdeps/unix/sysv/linux/i386/ldconfig.h +++ b/sysdeps/unix/sysv/linux/i386/ldconfig.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2018 Free Software Foundation, Inc. +/* Copyright (C) 2001-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/generic/ldconfig.h> diff --git a/sysdeps/unix/sysv/linux/i386/libc-do-syscall.S b/sysdeps/unix/sysv/linux/i386/libc-do-syscall.S index 35aac82cc8..b3eacec4b7 100644 --- a/sysdeps/unix/sysv/linux/i386/libc-do-syscall.S +++ b/sysdeps/unix/sysv/linux/i386/libc-do-syscall.S @@ -1,5 +1,5 @@ /* Out-of-line syscall stub for six-argument syscalls from C. - Copyright (C) 2015-2018 Free Software Foundation, Inc. + Copyright (C) 2015-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> diff --git a/sysdeps/unix/sysv/linux/i386/libc-lowlevellock.S b/sysdeps/unix/sysv/linux/i386/libc-lowlevellock.S deleted file mode 100644 index a1ddaaf77a..0000000000 --- a/sysdeps/unix/sysv/linux/i386/libc-lowlevellock.S +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 2002-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include "lowlevellock.S" diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index 9762c81365..fcb625b6bf 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -1869,6 +1869,11 @@ GLIBC_2.2 _flushlbf F GLIBC_2.2 _res_hconf D 0x30 GLIBC_2.2 alphasort64 F GLIBC_2.2 bind_textdomain_codeset F +GLIBC_2.2 clock_getcpuclockid F +GLIBC_2.2 clock_getres F +GLIBC_2.2 clock_gettime F +GLIBC_2.2 clock_nanosleep F +GLIBC_2.2 clock_settime F GLIBC_2.2 dcngettext F GLIBC_2.2 dngettext F GLIBC_2.2 fgetpos F @@ -2045,6 +2050,9 @@ GLIBC_2.28 thrd_current F GLIBC_2.28 thrd_equal F GLIBC_2.28 thrd_sleep F GLIBC_2.28 thrd_yield F +GLIBC_2.29 getcpu F +GLIBC_2.29 posix_spawn_file_actions_addchdir_np F +GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F GLIBC_2.3 __ctype_toupper_loc F @@ -2200,6 +2208,10 @@ GLIBC_2.3.4 setsourcefilter F GLIBC_2.3.4 vm86 F GLIBC_2.3.4 xdr_quad_t F GLIBC_2.3.4 xdr_u_quad_t F +GLIBC_2.30 getdents64 F +GLIBC_2.30 gettid F +GLIBC_2.30 tgkill F +GLIBC_2.30 twalk_r F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index 3110c1f4fa..e67f9d7d27 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -1075,3 +1075,24 @@ GLIBC_2.28 fmul F GLIBC_2.28 fmull F GLIBC_2.28 fsub F GLIBC_2.28 fsubl F +GLIBC_2.29 exp F +GLIBC_2.29 exp2 F +GLIBC_2.29 log F +GLIBC_2.29 log2 F +GLIBC_2.29 pow F +GLIBC_2.31 totalorder F +GLIBC_2.31 totalorderf F +GLIBC_2.31 totalorderf128 F +GLIBC_2.31 totalorderf32 F +GLIBC_2.31 totalorderf32x F +GLIBC_2.31 totalorderf64 F +GLIBC_2.31 totalorderf64x F +GLIBC_2.31 totalorderl F +GLIBC_2.31 totalordermag F +GLIBC_2.31 totalordermagf F +GLIBC_2.31 totalordermagf128 F +GLIBC_2.31 totalordermagf32 F +GLIBC_2.31 totalordermagf32x F +GLIBC_2.31 totalordermagf64 F +GLIBC_2.31 totalordermagf64x F +GLIBC_2.31 totalordermagl F diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist index bece86d246..68fd15047c 100644 --- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist @@ -42,20 +42,11 @@ GLIBC_2.0 funlockfile F GLIBC_2.0 longjmp F GLIBC_2.0 lseek F GLIBC_2.0 msync F -GLIBC_2.0 nanosleep F GLIBC_2.0 open F GLIBC_2.0 pause F GLIBC_2.0 pthread_atfork F -GLIBC_2.0 pthread_attr_destroy F -GLIBC_2.0 pthread_attr_getdetachstate F -GLIBC_2.0 pthread_attr_getinheritsched F -GLIBC_2.0 pthread_attr_getschedparam F GLIBC_2.0 pthread_attr_getschedpolicy F GLIBC_2.0 pthread_attr_getscope F -GLIBC_2.0 pthread_attr_init F -GLIBC_2.0 pthread_attr_setdetachstate F -GLIBC_2.0 pthread_attr_setinheritsched F -GLIBC_2.0 pthread_attr_setschedparam F GLIBC_2.0 pthread_attr_setschedpolicy F GLIBC_2.0 pthread_attr_setscope F GLIBC_2.0 pthread_cancel F @@ -69,7 +60,6 @@ GLIBC_2.0 pthread_condattr_destroy F GLIBC_2.0 pthread_condattr_init F GLIBC_2.0 pthread_create F GLIBC_2.0 pthread_detach F -GLIBC_2.0 pthread_equal F GLIBC_2.0 pthread_exit F GLIBC_2.0 pthread_getschedparam F GLIBC_2.0 pthread_getspecific F @@ -88,7 +78,6 @@ GLIBC_2.0 pthread_mutexattr_getkind_np F GLIBC_2.0 pthread_mutexattr_init F GLIBC_2.0 pthread_mutexattr_setkind_np F GLIBC_2.0 pthread_once F -GLIBC_2.0 pthread_self F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setschedparam F @@ -114,7 +103,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 vfork F GLIBC_2.0 wait F GLIBC_2.0 waitpid F GLIBC_2.0 write F @@ -124,7 +112,6 @@ GLIBC_2.1 __libc_current_sigrtmin F GLIBC_2.1 pthread_attr_getguardsize F GLIBC_2.1 pthread_attr_getstackaddr F GLIBC_2.1 pthread_attr_getstacksize F -GLIBC_2.1 pthread_attr_init F GLIBC_2.1 pthread_attr_setguardsize F GLIBC_2.1 pthread_attr_setstackaddr F GLIBC_2.1 pthread_attr_setstacksize F @@ -155,7 +142,7 @@ GLIBC_2.1 sem_wait F GLIBC_2.1.1 sem_close F GLIBC_2.1.1 sem_open F GLIBC_2.1.1 sem_unlink F -GLIBC_2.1.2 __vfork F +GLIBC_2.1.2 __libpthread_version_placeholder F GLIBC_2.11 pthread_sigqueue F GLIBC_2.12 pthread_getname_np F GLIBC_2.12 pthread_mutex_consistent F @@ -205,7 +192,7 @@ GLIBC_2.2 pwrite F GLIBC_2.2 pwrite64 F GLIBC_2.2 sem_timedwait F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F +GLIBC_2.2.6 __libpthread_version_placeholder F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F @@ -253,6 +240,12 @@ GLIBC_2.3.4 pthread_attr_setaffinity_np F GLIBC_2.3.4 pthread_getaffinity_np F GLIBC_2.3.4 pthread_setaffinity_np F GLIBC_2.3.4 pthread_setschedprio F +GLIBC_2.30 pthread_cond_clockwait F +GLIBC_2.30 pthread_mutex_clocklock F +GLIBC_2.30 pthread_rwlock_clockrdlock F +GLIBC_2.30 pthread_rwlock_clockwrlock F +GLIBC_2.30 sem_clockwait F +GLIBC_2.31 pthread_clockjoin_np F GLIBC_2.4 pthread_mutex_consistent_np F GLIBC_2.4 pthread_mutex_getprioceiling F GLIBC_2.4 pthread_mutex_setprioceiling F diff --git a/sysdeps/unix/sysv/linux/i386/librt.abilist b/sysdeps/unix/sysv/linux/i386/librt.abilist index 595f1b712a..bb03781dcc 100644 --- a/sysdeps/unix/sysv/linux/i386/librt.abilist +++ b/sysdeps/unix/sysv/linux/i386/librt.abilist @@ -15,11 +15,6 @@ GLIBC_2.1 aio_write F GLIBC_2.1 aio_write64 F GLIBC_2.1 lio_listio F GLIBC_2.1 lio_listio64 F -GLIBC_2.2 clock_getcpuclockid F -GLIBC_2.2 clock_getres F -GLIBC_2.2 clock_gettime F -GLIBC_2.2 clock_nanosleep F -GLIBC_2.2 clock_settime F GLIBC_2.2 shm_open F GLIBC_2.2 shm_unlink F GLIBC_2.2 timer_create F diff --git a/sysdeps/unix/sysv/linux/i386/lll_timedlock_wait.c b/sysdeps/unix/sysv/linux/i386/lll_timedlock_wait.c deleted file mode 100644 index f6875b8f89..0000000000 --- a/sysdeps/unix/sysv/linux/i386/lll_timedlock_wait.c +++ /dev/null @@ -1 +0,0 @@ -/* __lll_timedlock_wait is in lowlevellock.S. */ diff --git a/sysdeps/unix/sysv/linux/i386/lll_timedwait_tid.c b/sysdeps/unix/sysv/linux/i386/lll_timedwait_tid.c deleted file mode 100644 index 43900c6294..0000000000 --- a/sysdeps/unix/sysv/linux/i386/lll_timedwait_tid.c +++ /dev/null @@ -1 +0,0 @@ -/* __lll_timedwait_tid is in lowlevellock.S. */ diff --git a/sysdeps/unix/sysv/linux/i386/lockf64.c b/sysdeps/unix/sysv/linux/i386/lockf64.c deleted file mode 100644 index 8a17c13cbe..0000000000 --- a/sysdeps/unix/sysv/linux/i386/lockf64.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (C) 1994-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sys/types.h> -#include <unistd.h> -#include <fcntl.h> -#include <errno.h> -#include <string.h> -#include <sysdep.h> - -/* lockf is a simplified interface to fcntl's locking facilities. */ - -int -lockf64 (int fd, int cmd, off64_t len64) -{ - struct flock64 fl64; - int cmd64; - int result; - - memset ((char *) &fl64, '\0', sizeof (fl64)); - fl64.l_whence = SEEK_CUR; - fl64.l_start = 0; - fl64.l_len = len64; - - switch (cmd) - { - case F_TEST: - /* Test the lock: return 0 if FD is unlocked or locked by this process; - return -1, set errno to EACCES, if another process holds the lock. */ - fl64.l_type = F_RDLCK; - INTERNAL_SYSCALL_DECL (err); - result = INTERNAL_SYSCALL (fcntl64, err, 3, fd, F_GETLK64, &fl64); - if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err))) - return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result, - err)); - if (fl64.l_type == F_UNLCK || fl64.l_pid == __getpid ()) - return 0; - return INLINE_SYSCALL_ERROR_RETURN_VALUE (EACCES); - case F_ULOCK: - fl64.l_type = F_UNLCK; - cmd64 = F_SETLK64; - break; - case F_LOCK: - fl64.l_type = F_WRLCK; - cmd64 = F_SETLKW64; - break; - case F_TLOCK: - fl64.l_type = F_WRLCK; - cmd64 = F_SETLK64; - break; - - default: - return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL); - } - return INLINE_SYSCALL (fcntl64, 3, fd, cmd64, &fl64); -} diff --git a/sysdeps/unix/sysv/linux/i386/lowlevellock.S b/sysdeps/unix/sysv/linux/i386/lowlevellock.S deleted file mode 100644 index feda390eeb..0000000000 --- a/sysdeps/unix/sysv/linux/i386/lowlevellock.S +++ /dev/null @@ -1,434 +0,0 @@ -/* Copyright (C) 2002-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> -#include <pthread-errnos.h> -#include <kernel-features.h> -#include <lowlevellock.h> - -#include <stap-probe.h> - - .text - -#define LOAD_PRIVATE_FUTEX_WAIT(reg) \ - movl $(FUTEX_WAIT | FUTEX_PRIVATE_FLAG), reg -#define LOAD_PRIVATE_FUTEX_WAKE(reg) \ - movl $(FUTEX_WAKE | FUTEX_PRIVATE_FLAG), reg -#define LOAD_FUTEX_WAIT(reg) \ - xorl $(FUTEX_WAIT | FUTEX_PRIVATE_FLAG), reg -#define LOAD_FUTEX_WAIT_ABS(reg) \ - xorl $(FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME), reg -#define LOAD_FUTEX_WAKE(reg) \ - xorl $(FUTEX_WAKE | FUTEX_PRIVATE_FLAG), reg - - .globl __lll_lock_wait_private - .type __lll_lock_wait_private,@function - .hidden __lll_lock_wait_private - .align 16 -__lll_lock_wait_private: - cfi_startproc - pushl %edx - cfi_adjust_cfa_offset(4) - pushl %ebx - cfi_adjust_cfa_offset(4) - pushl %esi - cfi_adjust_cfa_offset(4) - cfi_offset(%edx, -8) - cfi_offset(%ebx, -12) - cfi_offset(%esi, -16) - - movl $2, %edx - movl %ecx, %ebx - xorl %esi, %esi /* No timeout. */ - LOAD_PRIVATE_FUTEX_WAIT (%ecx) - - cmpl %edx, %eax /* NB: %edx == 2 */ - jne 2f - -1: LIBC_PROBE (lll_lock_wait_private, 1, %ebx) - movl $SYS_futex, %eax - ENTER_KERNEL - -2: movl %edx, %eax - xchgl %eax, (%ebx) /* NB: lock is implied */ - - testl %eax, %eax - jnz 1b - - popl %esi - cfi_adjust_cfa_offset(-4) - cfi_restore(%esi) - popl %ebx - cfi_adjust_cfa_offset(-4) - cfi_restore(%ebx) - popl %edx - cfi_adjust_cfa_offset(-4) - cfi_restore(%edx) - ret - cfi_endproc - .size __lll_lock_wait_private,.-__lll_lock_wait_private - -#if !IS_IN (libc) - .globl __lll_lock_wait - .type __lll_lock_wait,@function - .hidden __lll_lock_wait - .align 16 -__lll_lock_wait: - cfi_startproc - pushl %edx - cfi_adjust_cfa_offset(4) - pushl %ebx - cfi_adjust_cfa_offset(4) - pushl %esi - cfi_adjust_cfa_offset(4) - cfi_offset(%edx, -8) - cfi_offset(%ebx, -12) - cfi_offset(%esi, -16) - - movl %edx, %ebx - movl $2, %edx - xorl %esi, %esi /* No timeout. */ - LOAD_FUTEX_WAIT (%ecx) - - cmpl %edx, %eax /* NB: %edx == 2 */ - jne 2f - -1: movl $SYS_futex, %eax - ENTER_KERNEL - -2: movl %edx, %eax - xchgl %eax, (%ebx) /* NB: lock is implied */ - - testl %eax, %eax - jnz 1b - - popl %esi - cfi_adjust_cfa_offset(-4) - cfi_restore(%esi) - popl %ebx - cfi_adjust_cfa_offset(-4) - cfi_restore(%ebx) - popl %edx - cfi_adjust_cfa_offset(-4) - cfi_restore(%edx) - ret - cfi_endproc - .size __lll_lock_wait,.-__lll_lock_wait - - /* %ecx: futex - %esi: flags - %edx: timeout - %eax: futex value - */ - .globl __lll_timedlock_wait - .type __lll_timedlock_wait,@function - .hidden __lll_timedlock_wait - .align 16 -__lll_timedlock_wait: - cfi_startproc - pushl %ebp - cfi_adjust_cfa_offset(4) - cfi_rel_offset(%ebp, 0) - pushl %ebx - cfi_adjust_cfa_offset(4) - cfi_rel_offset(%ebx, 0) - -# ifndef __ASSUME_FUTEX_CLOCK_REALTIME -# ifdef PIC - LOAD_PIC_REG (bx) - cmpl $0, __have_futex_clock_realtime@GOTOFF(%ebx) -# else - cmpl $0, __have_futex_clock_realtime -# endif - je .Lreltmo -# endif - - cmpl $0, (%edx) - js 8f - - movl %ecx, %ebx - movl %esi, %ecx - movl %edx, %esi - movl $0xffffffff, %ebp - LOAD_FUTEX_WAIT_ABS (%ecx) - - movl $2, %edx - cmpl %edx, %eax - jne 2f - -1: movl $SYS_futex, %eax - movl $2, %edx - ENTER_KERNEL - -2: xchgl %edx, (%ebx) /* NB: lock is implied */ - - testl %edx, %edx - jz 3f - - cmpl $-ETIMEDOUT, %eax - je 4f - cmpl $-EINVAL, %eax - jne 1b -4: movl %eax, %edx - negl %edx - -3: movl %edx, %eax -7: popl %ebx - cfi_adjust_cfa_offset(-4) - cfi_restore(%ebx) - popl %ebp - cfi_adjust_cfa_offset(-4) - cfi_restore(%ebp) - ret - -8: movl $ETIMEDOUT, %eax - jmp 7b - -# ifndef __ASSUME_FUTEX_CLOCK_REALTIME -.Lreltmo: - /* Check for a valid timeout value. */ - cmpl $1000000000, 4(%edx) - jae 3f - - pushl %esi - cfi_adjust_cfa_offset(4) - cfi_rel_offset(%esi, 0) - pushl %edi - cfi_adjust_cfa_offset(4) - cfi_rel_offset(%edi, 0) - - /* Stack frame for the timespec and timeval structs. */ - subl $8, %esp - cfi_adjust_cfa_offset(8) - - movl %ecx, %ebp - movl %edx, %edi - - movl $2, %edx - xchgl %edx, (%ebp) - - test %edx, %edx - je 6f - -1: - /* Get current time. */ - movl %esp, %ebx - xorl %ecx, %ecx - movl $__NR_gettimeofday, %eax - ENTER_KERNEL - - /* Compute relative timeout. */ - movl 4(%esp), %eax - movl $1000, %edx - mul %edx /* Milli seconds to nano seconds. */ - movl (%edi), %ecx - movl 4(%edi), %edx - subl (%esp), %ecx - subl %eax, %edx - jns 4f - addl $1000000000, %edx - subl $1, %ecx -4: testl %ecx, %ecx - js 2f /* Time is already up. */ - - /* Store relative timeout. */ - movl %ecx, (%esp) - movl %edx, 4(%esp) - - /* Futex call. */ - movl %ebp, %ebx - movl $2, %edx - movl %esp, %esi - movl 16(%esp), %ecx - LOAD_FUTEX_WAIT (%ecx) - movl $SYS_futex, %eax - ENTER_KERNEL - - /* NB: %edx == 2 */ - xchgl %edx, (%ebp) - - testl %edx, %edx - je 6f - - cmpl $-ETIMEDOUT, %eax - jne 1b -2: movl $ETIMEDOUT, %edx - -6: addl $8, %esp - cfi_adjust_cfa_offset(-8) - popl %edi - cfi_adjust_cfa_offset(-4) - cfi_restore(%edi) - popl %esi - cfi_adjust_cfa_offset(-4) - cfi_restore(%esi) -7: popl %ebx - cfi_adjust_cfa_offset(-4) - cfi_restore(%ebx) - popl %ebp - cfi_adjust_cfa_offset(-4) - cfi_restore(%ebp) - movl %edx, %eax - ret - -3: movl $EINVAL, %edx - jmp 7b -# endif - cfi_endproc - .size __lll_timedlock_wait,.-__lll_timedlock_wait -#endif - - .globl __lll_unlock_wake_private - .type __lll_unlock_wake_private,@function - .hidden __lll_unlock_wake_private - .align 16 -__lll_unlock_wake_private: - cfi_startproc - pushl %ebx - cfi_adjust_cfa_offset(4) - pushl %ecx - cfi_adjust_cfa_offset(4) - pushl %edx - cfi_adjust_cfa_offset(4) - cfi_offset(%ebx, -8) - cfi_offset(%ecx, -12) - cfi_offset(%edx, -16) - - movl %eax, %ebx - movl $0, (%eax) - LOAD_PRIVATE_FUTEX_WAKE (%ecx) - movl $1, %edx /* Wake one thread. */ - movl $SYS_futex, %eax - ENTER_KERNEL - - popl %edx - cfi_adjust_cfa_offset(-4) - cfi_restore(%edx) - popl %ecx - cfi_adjust_cfa_offset(-4) - cfi_restore(%ecx) - popl %ebx - cfi_adjust_cfa_offset(-4) - cfi_restore(%ebx) - ret - cfi_endproc - .size __lll_unlock_wake_private,.-__lll_unlock_wake_private - -#if !IS_IN (libc) - .globl __lll_unlock_wake - .type __lll_unlock_wake,@function - .hidden __lll_unlock_wake - .align 16 -__lll_unlock_wake: - cfi_startproc - pushl %ebx - cfi_adjust_cfa_offset(4) - pushl %ecx - cfi_adjust_cfa_offset(4) - pushl %edx - cfi_adjust_cfa_offset(4) - cfi_offset(%ebx, -8) - cfi_offset(%ecx, -12) - cfi_offset(%edx, -16) - - movl %eax, %ebx - movl $0, (%eax) - LOAD_FUTEX_WAKE (%ecx) - movl $1, %edx /* Wake one thread. */ - movl $SYS_futex, %eax - ENTER_KERNEL - - popl %edx - cfi_adjust_cfa_offset(-4) - cfi_restore(%edx) - popl %ecx - cfi_adjust_cfa_offset(-4) - cfi_restore(%ecx) - popl %ebx - cfi_adjust_cfa_offset(-4) - cfi_restore(%ebx) - ret - cfi_endproc - .size __lll_unlock_wake,.-__lll_unlock_wake - - .globl __lll_timedwait_tid - .type __lll_timedwait_tid,@function - .hidden __lll_timedwait_tid - .align 16 -__lll_timedwait_tid: - pushl %edi - pushl %esi - pushl %ebx - pushl %ebp - - movl %eax, %ebp - movl %edx, %edi - subl $8, %esp - - /* Get current time. */ -2: movl %esp, %ebx - xorl %ecx, %ecx - movl $__NR_gettimeofday, %eax - ENTER_KERNEL - - /* Compute relative timeout. */ - movl 4(%esp), %eax - movl $1000, %edx - mul %edx /* Milli seconds to nano seconds. */ - movl (%edi), %ecx - movl 4(%edi), %edx - subl (%esp), %ecx - subl %eax, %edx - jns 5f - addl $1000000000, %edx - subl $1, %ecx -5: testl %ecx, %ecx - js 6f /* Time is already up. */ - - movl %ecx, (%esp) /* Store relative timeout. */ - movl %edx, 4(%esp) - - movl (%ebp), %edx - testl %edx, %edx - jz 4f - - movl %esp, %esi - /* XXX The kernel so far uses global futex for the wakeup at - all times. */ - xorl %ecx, %ecx /* movl $FUTEX_WAIT, %ecx */ - movl %ebp, %ebx - movl $SYS_futex, %eax - ENTER_KERNEL - - cmpl $0, (%ebx) - jne 1f -4: xorl %eax, %eax - -3: addl $8, %esp - popl %ebp - popl %ebx - popl %esi - popl %edi - ret - -1: cmpl $-ETIMEDOUT, %eax - jne 2b -6: movl $ETIMEDOUT, %eax - jmp 3b - .size __lll_timedwait_tid,.-__lll_timedwait_tid -#endif diff --git a/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/sysdeps/unix/sysv/linux/i386/lowlevellock.h deleted file mode 100644 index 38fbc2556f..0000000000 --- a/sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ /dev/null @@ -1,269 +0,0 @@ -/* Copyright (C) 2002-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _LOWLEVELLOCK_H -#define _LOWLEVELLOCK_H 1 - -#include <stap-probe.h> - -#ifndef __ASSEMBLER__ -# include <time.h> -# include <sys/param.h> -# include <bits/pthreadtypes.h> -# include <kernel-features.h> -/* <tcb-offsets.h> is generated from tcb-offsets.sym to define offsets - and sizes of types in <tls.h> as well as <pthread.h> which includes - <lowlevellock.h> via nptl/descr.h. Don't include <tcb-offsets.h> - when generating <tcb-offsets.h> to avoid circular dependency which - may lead to build hang on a many-core machine. */ -# ifndef GEN_AS_CONST_HEADERS -# include <tcb-offsets.h> -# endif - -# ifndef LOCK_INSTR -# ifdef UP -# define LOCK_INSTR /* nothing */ -# else -# define LOCK_INSTR "lock;" -# endif -# endif -#else -# ifndef LOCK -# ifdef UP -# define LOCK -# else -# define LOCK lock -# endif -# endif -#endif - -#include <lowlevellock-futex.h> - -/* XXX Remove when no assembler code uses futexes anymore. */ -#define SYS_futex __NR_futex - -#ifndef __ASSEMBLER__ - -/* Initializer for compatibility lock. */ -#define LLL_LOCK_INITIALIZER (0) -#define LLL_LOCK_INITIALIZER_LOCKED (1) -#define LLL_LOCK_INITIALIZER_WAITERS (2) - - -/* NB: in the lll_trylock macro we simply return the value in %eax - after the cmpxchg instruction. In case the operation succeded this - value is zero. In case the operation failed, the cmpxchg instruction - has loaded the current value of the memory work which is guaranteed - to be nonzero. */ -#if !IS_IN (libc) || defined UP -# define __lll_trylock_asm LOCK_INSTR "cmpxchgl %2, %1" -#else -# define __lll_trylock_asm "cmpl $0, %%gs:%P5\n\t" \ - "je 0f\n\t" \ - "lock\n" \ - "0:\tcmpxchgl %2, %1" -#endif - -#define lll_trylock(futex) \ - ({ int ret; \ - __asm __volatile (__lll_trylock_asm \ - : "=a" (ret), "=m" (futex) \ - : "r" (LLL_LOCK_INITIALIZER_LOCKED), "m" (futex), \ - "0" (LLL_LOCK_INITIALIZER), \ - "i" (MULTIPLE_THREADS_OFFSET) \ - : "memory"); \ - ret; }) - - -#define lll_cond_trylock(futex) \ - ({ int ret; \ - __asm __volatile (LOCK_INSTR "cmpxchgl %2, %1" \ - : "=a" (ret), "=m" (futex) \ - : "r" (LLL_LOCK_INITIALIZER_WAITERS), \ - "m" (futex), "0" (LLL_LOCK_INITIALIZER) \ - : "memory"); \ - ret; }) - -#if !IS_IN (libc) || defined UP -# define __lll_lock_asm_start LOCK_INSTR "cmpxchgl %1, %2\n\t" -#else -# define __lll_lock_asm_start "cmpl $0, %%gs:%P6\n\t" \ - "je 0f\n\t" \ - "lock\n" \ - "0:\tcmpxchgl %1, %2\n\t" -#endif - -#define lll_lock(futex, private) \ - (void) \ - ({ int ignore1, ignore2; \ - if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \ - __asm __volatile (__lll_lock_asm_start \ - "jz 18f\n\t" \ - "1:\tleal %2, %%ecx\n" \ - "2:\tcall __lll_lock_wait_private\n" \ - "18:" \ - : "=a" (ignore1), "=c" (ignore2), "=m" (futex) \ - : "0" (0), "1" (1), "m" (futex), \ - "i" (MULTIPLE_THREADS_OFFSET) \ - : "memory"); \ - else \ - { \ - int ignore3; \ - __asm __volatile (__lll_lock_asm_start \ - "jz 18f\n\t" \ - "1:\tleal %2, %%edx\n" \ - "0:\tmovl %8, %%ecx\n" \ - "2:\tcall __lll_lock_wait\n" \ - "18:" \ - : "=a" (ignore1), "=c" (ignore2), \ - "=m" (futex), "=&d" (ignore3) \ - : "1" (1), "m" (futex), \ - "i" (MULTIPLE_THREADS_OFFSET), "0" (0), \ - "g" ((int) (private)) \ - : "memory"); \ - } \ - }) - - -/* Special version of lll_lock which causes the unlock function to - always wakeup waiters. */ -#define lll_cond_lock(futex, private) \ - (void) \ - ({ int ignore1, ignore2, ignore3; \ - __asm __volatile (LOCK_INSTR "cmpxchgl %1, %2\n\t" \ - "jz 18f\n\t" \ - "1:\tleal %2, %%edx\n" \ - "0:\tmovl %7, %%ecx\n" \ - "2:\tcall __lll_lock_wait\n" \ - "18:" \ - : "=a" (ignore1), "=c" (ignore2), "=m" (futex), \ - "=&d" (ignore3) \ - : "0" (0), "1" (2), "m" (futex), "g" ((int) (private))\ - : "memory"); \ - }) - - -#define lll_timedlock(futex, timeout, private) \ - ({ int result, ignore1, ignore2, ignore3; \ - __asm __volatile (LOCK_INSTR "cmpxchgl %1, %3\n\t" \ - "jz 18f\n\t" \ - "1:\tleal %3, %%ecx\n" \ - "0:\tmovl %8, %%edx\n" \ - "2:\tcall __lll_timedlock_wait\n" \ - "18:" \ - : "=a" (result), "=c" (ignore1), "=&d" (ignore2), \ - "=m" (futex), "=S" (ignore3) \ - : "0" (0), "1" (1), "m" (futex), "m" (timeout), \ - "4" ((int) (private)) \ - : "memory"); \ - result; }) - -extern int __lll_timedlock_elision (int *futex, short *adapt_count, - const struct timespec *timeout, - int private) attribute_hidden; - -#define lll_timedlock_elision(futex, adapt_count, timeout, private) \ - __lll_timedlock_elision(&(futex), &(adapt_count), timeout, private) - -#if !IS_IN (libc) || defined UP -# define __lll_unlock_asm LOCK_INSTR "subl $1, %0\n\t" -#else -# define __lll_unlock_asm "cmpl $0, %%gs:%P3\n\t" \ - "je 0f\n\t" \ - "lock\n" \ - "0:\tsubl $1,%0\n\t" -#endif - -#define lll_unlock(futex, private) \ - (void) \ - ({ int ignore; \ - if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \ - __asm __volatile (__lll_unlock_asm \ - "je 18f\n\t" \ - "1:\tleal %0, %%eax\n" \ - "2:\tcall __lll_unlock_wake_private\n" \ - "18:" \ - : "=m" (futex), "=&a" (ignore) \ - : "m" (futex), "i" (MULTIPLE_THREADS_OFFSET) \ - : "memory"); \ - else \ - { \ - int ignore2; \ - __asm __volatile (__lll_unlock_asm \ - "je 18f\n\t" \ - "1:\tleal %0, %%eax\n" \ - "0:\tmovl %5, %%ecx\n" \ - "2:\tcall __lll_unlock_wake\n" \ - "18:" \ - : "=m" (futex), "=&a" (ignore), "=&c" (ignore2) \ - : "i" (MULTIPLE_THREADS_OFFSET), "m" (futex), \ - "g" ((int) (private)) \ - : "memory"); \ - } \ - }) - - -#define lll_islocked(futex) \ - (futex != LLL_LOCK_INITIALIZER) - -/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex - wake-up when the clone terminates. The memory location contains the - thread ID while the clone is running and is reset to zero by the kernel - afterwards. The kernel up to version 3.16.3 does not use the private futex - operations for futex wake-up when the clone terminates. */ -#define lll_wait_tid(tid) \ - do { \ - __typeof (tid) __tid; \ - while ((__tid = (tid)) != 0) \ - lll_futex_wait (&(tid), __tid, LLL_SHARED);\ - } while (0) - -extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime) - __attribute__ ((regparm (2))) attribute_hidden; - -/* As lll_wait_tid, but with a timeout. If the timeout occurs then return - ETIMEDOUT. If ABSTIME is invalid, return EINVAL. - XXX Note that this differs from the generic version in that we do the - error checking here and not in __lll_timedwait_tid. */ -#define lll_timedwait_tid(tid, abstime) \ - ({ \ - int __result = 0; \ - if ((tid) != 0) \ - __result = __lll_timedwait_tid (&(tid), (abstime)); \ - __result; }) - - -extern int __lll_lock_elision (int *futex, short *adapt_count, int private) - attribute_hidden; - -extern int __lll_unlock_elision(int *lock, int private) - attribute_hidden; - -extern int __lll_trylock_elision(int *lock, short *adapt_count) - attribute_hidden; - -#define lll_lock_elision(futex, adapt_count, private) \ - __lll_lock_elision (&(futex), &(adapt_count), private) -#define lll_unlock_elision(futex, adapt_count, private) \ - __lll_unlock_elision (&(futex), private) -#define lll_trylock_elision(futex, adapt_count) \ - __lll_trylock_elision(&(futex), &(adapt_count)) - -#endif /* !__ASSEMBLER__ */ - -#endif /* lowlevellock.h */ diff --git a/sysdeps/unix/sysv/linux/i386/lxstat.c b/sysdeps/unix/sysv/linux/i386/lxstat.c index 0049fd1840..b7f6bfe83b 100644 --- a/sysdeps/unix/sysv/linux/i386/lxstat.c +++ b/sysdeps/unix/sysv/linux/i386/lxstat.c @@ -1,5 +1,5 @@ /* lxstat using old-style Unix lstat system call. - Copyright (C) 1991-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Ho hum, if xstat == xstat64 we must get rid of the prototype or gcc will complain since they don't strictly match. */ diff --git a/sysdeps/unix/sysv/linux/i386/makecontext.S b/sysdeps/unix/sysv/linux/i386/makecontext.S index e3ca3dc0d5..e2f8afc895 100644 --- a/sysdeps/unix/sysv/linux/i386/makecontext.S +++ b/sysdeps/unix/sysv/linux/i386/makecontext.S @@ -1,5 +1,5 @@ /* Create new context. - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2001. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> diff --git a/sysdeps/unix/sysv/linux/i386/profil-counter.h b/sysdeps/unix/sysv/linux/i386/profil-counter.h deleted file mode 100644 index 871709961c..0000000000 --- a/sysdeps/unix/sysv/linux/i386/profil-counter.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Low-level statistical profiling support function. Linux/i386 version. - Copyright (C) 1996-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <signal.h> -#include <sigcontextinfo.h> - -static void -__profil_counter (int signo, const SIGCONTEXT scp) -{ - profil_count ((void *) GET_PC (scp)); - - /* This is a hack to prevent the compiler from implementing the - above function call as a sibcall. The sibcall would overwrite - the signal context. */ - asm volatile (""); -} diff --git a/sysdeps/unix/sysv/linux/i386/putmsg.c b/sysdeps/unix/sysv/linux/i386/putmsg.c deleted file mode 100644 index e08dbd625a..0000000000 --- a/sysdeps/unix/sysv/linux/i386/putmsg.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1998-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <stddef.h> -#include <stropts.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -#ifdef __NR_putpmsg -int -putmsg (int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr, - int flags) -{ - return INLINE_SYSCALL (putpmsg, 5, fildes, ctlptr, dataptr, -1, flags); -} -#else -# include <streams/putmsg.c> -#endif diff --git a/sysdeps/unix/sysv/linux/i386/readelflib.c b/sysdeps/unix/sysv/linux/i386/readelflib.c index 3a84559592..8adfe634db 100644 --- a/sysdeps/unix/sysv/linux/i386/readelflib.c +++ b/sysdeps/unix/sysv/linux/i386/readelflib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2018 Free Software Foundation, Inc. +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>, 1999 and Jakub Jelinek <jakub@redhat.com>, 2000. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ int process_elf32_file (const char *file_name, const char *lib, int *flag, diff --git a/sysdeps/unix/sysv/linux/i386/register-dump.h b/sysdeps/unix/sysv/linux/i386/register-dump.h index 1570a74533..abcd533544 100644 --- a/sysdeps/unix/sysv/linux/i386/register-dump.h +++ b/sysdeps/unix/sysv/linux/i386/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/uio.h> #include <_itoa.h> @@ -51,7 +51,7 @@ hexvalue (unsigned long int value, char *buf, size_t len) } static void -register_dump (int fd, struct sigcontext *ctx) +register_dump (int fd, struct ucontext_t *ctx) { char regs[21][8]; char fpregs[31][8]; @@ -68,27 +68,27 @@ register_dump (int fd, struct sigcontext *ctx) ++nr /* Generate strings of register contents. */ - hexvalue (ctx->eax, regs[0], 8); - hexvalue (ctx->ebx, regs[1], 8); - hexvalue (ctx->ecx, regs[2], 8); - hexvalue (ctx->edx, regs[3], 8); - hexvalue (ctx->esi, regs[4], 8); - hexvalue (ctx->edi, regs[5], 8); - hexvalue (ctx->ebp, regs[6], 8); - hexvalue (ctx->esp, regs[7], 8); - hexvalue (ctx->eip, regs[8], 8); - hexvalue (ctx->eflags, regs[9], 8); - hexvalue (ctx->cs, regs[10], 4); - hexvalue (ctx->ds, regs[11], 4); - hexvalue (ctx->es, regs[12], 4); - hexvalue (ctx->fs, regs[13], 4); - hexvalue (ctx->gs, regs[14], 4); - hexvalue (ctx->ss, regs[15], 4); - hexvalue (ctx->trapno, regs[16], 8); - hexvalue (ctx->err, regs[17], 8); - hexvalue (ctx->oldmask, regs[18], 8); - hexvalue (ctx->esp_at_signal, regs[19], 8); - hexvalue (ctx->cr2, regs[20], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_EAX], regs[0], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_EBX], regs[1], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_ECX], regs[2], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_EDX], regs[3], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_ESI], regs[4], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_EDI], regs[5], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_EBP], regs[6], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_ESP], regs[7], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_EIP], regs[8], 8); + hexvalue (ctx->uc_flags, regs[9], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_CS], regs[10], 4); + hexvalue (ctx->uc_mcontext.gregs[REG_DS], regs[11], 4); + hexvalue (ctx->uc_mcontext.gregs[REG_ES], regs[12], 4); + hexvalue (ctx->uc_mcontext.gregs[REG_FS], regs[13], 4); + hexvalue (ctx->uc_mcontext.gregs[REG_GS], regs[14], 4); + hexvalue (ctx->uc_mcontext.gregs[REG_SS], regs[15], 4); + hexvalue (ctx->uc_mcontext.gregs[REG_TRAPNO], regs[16], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_ERR], regs[17], 8); + hexvalue (ctx->uc_mcontext.oldmask, regs[18], 8); + hexvalue (ctx->uc_mcontext.gregs[REG_UESP], regs[19], 8); + hexvalue (ctx->uc_mcontext.cr2, regs[20], 8); /* Generate the output. */ ADD_STRING ("Register dump:\n\n EAX: "); @@ -134,116 +134,112 @@ register_dump (int fd, struct sigcontext *ctx) ADD_STRING (" CR2: "); ADD_MEM (regs[20], 8); - if (ctx->fpstate != NULL) - { - - /* Generate output for the FPU control/status registers. */ - hexvalue (ctx->fpstate->cw, fpregs[0], 8); - hexvalue (ctx->fpstate->sw, fpregs[1], 8); - hexvalue (ctx->fpstate->tag, fpregs[2], 8); - hexvalue (ctx->fpstate->ipoff, fpregs[3], 8); - hexvalue (ctx->fpstate->cssel, fpregs[4], 4); - hexvalue (ctx->fpstate->dataoff, fpregs[5], 8); - hexvalue (ctx->fpstate->datasel, fpregs[6], 4); - - ADD_STRING ("\n\n FPUCW: "); - ADD_MEM (fpregs[0], 8); - ADD_STRING (" FPUSW: "); - ADD_MEM (fpregs[1], 8); - ADD_STRING (" TAG: "); - ADD_MEM (fpregs[2], 8); - ADD_STRING ("\n IPOFF: "); - ADD_MEM (fpregs[3], 8); - ADD_STRING (" CSSEL: "); - ADD_MEM (fpregs[4], 4); - ADD_STRING (" DATAOFF: "); - ADD_MEM (fpregs[5], 8); - ADD_STRING (" DATASEL: "); - ADD_MEM (fpregs[6], 4); - - /* Now the real FPU registers. */ - hexvalue (ctx->fpstate->_st[0].exponent, fpregs[7], 8); - hexvalue (ctx->fpstate->_st[0].significand[3] << 16 - | ctx->fpstate->_st[0].significand[2], fpregs[8], 8); - hexvalue (ctx->fpstate->_st[0].significand[1] << 16 - | ctx->fpstate->_st[0].significand[0], fpregs[9], 8); - hexvalue (ctx->fpstate->_st[1].exponent, fpregs[10], 8); - hexvalue (ctx->fpstate->_st[1].significand[3] << 16 - | ctx->fpstate->_st[1].significand[2], fpregs[11], 8); - hexvalue (ctx->fpstate->_st[1].significand[1] << 16 - | ctx->fpstate->_st[1].significand[0], fpregs[12], 8); - hexvalue (ctx->fpstate->_st[2].exponent, fpregs[13], 8); - hexvalue (ctx->fpstate->_st[2].significand[3] << 16 - | ctx->fpstate->_st[2].significand[2], fpregs[14], 8); - hexvalue (ctx->fpstate->_st[2].significand[1] << 16 - | ctx->fpstate->_st[2].significand[0], fpregs[15], 8); - hexvalue (ctx->fpstate->_st[3].exponent, fpregs[16], 8); - hexvalue (ctx->fpstate->_st[3].significand[3] << 16 - | ctx->fpstate->_st[3].significand[2], fpregs[17], 8); - hexvalue (ctx->fpstate->_st[3].significand[1] << 16 - | ctx->fpstate->_st[3].significand[0], fpregs[18], 8); - hexvalue (ctx->fpstate->_st[4].exponent, fpregs[19], 8); - hexvalue (ctx->fpstate->_st[4].significand[3] << 16 - | ctx->fpstate->_st[4].significand[2], fpregs[20], 8); - hexvalue (ctx->fpstate->_st[4].significand[1] << 16 - | ctx->fpstate->_st[4].significand[0], fpregs[21], 8); - hexvalue (ctx->fpstate->_st[5].exponent, fpregs[22], 8); - hexvalue (ctx->fpstate->_st[5].significand[3] << 16 - | ctx->fpstate->_st[5].significand[2], fpregs[23], 8); - hexvalue (ctx->fpstate->_st[5].significand[1] << 16 - | ctx->fpstate->_st[5].significand[0], fpregs[24], 8); - hexvalue (ctx->fpstate->_st[6].exponent, fpregs[25], 8); - hexvalue (ctx->fpstate->_st[6].significand[3] << 16 - | ctx->fpstate->_st[6].significand[2], fpregs[26], 8); - hexvalue (ctx->fpstate->_st[6].significand[1] << 16 - | ctx->fpstate->_st[6].significand[0], fpregs[27], 8); - hexvalue (ctx->fpstate->_st[7].exponent, fpregs[28], 8); - hexvalue (ctx->fpstate->_st[7].significand[3] << 16 - | ctx->fpstate->_st[7].significand[2], fpregs[29], 8); - hexvalue (ctx->fpstate->_st[7].significand[1] << 16 - | ctx->fpstate->_st[7].significand[0], fpregs[30], 8); - - ADD_STRING ("\n\n ST(0) "); - ADD_MEM (fpregs[7], 4); - ADD_STRING (" "); - ADD_MEM (fpregs[8], 8); - ADD_MEM (fpregs[9], 8); - ADD_STRING (" ST(1) "); - ADD_MEM (fpregs[10], 4); - ADD_STRING (" "); - ADD_MEM (fpregs[11], 8); - ADD_MEM (fpregs[12], 8); - ADD_STRING ("\n ST(2) "); - ADD_MEM (fpregs[13], 4); - ADD_STRING (" "); - ADD_MEM (fpregs[14], 8); - ADD_MEM (fpregs[15], 8); - ADD_STRING (" ST(3) "); - ADD_MEM (fpregs[16], 4); - ADD_STRING (" "); - ADD_MEM (fpregs[17], 8); - ADD_MEM (fpregs[18], 8); - ADD_STRING ("\n ST(4) "); - ADD_MEM (fpregs[19], 4); - ADD_STRING (" "); - ADD_MEM (fpregs[20], 8); - ADD_MEM (fpregs[21], 8); - ADD_STRING (" ST(5) "); - ADD_MEM (fpregs[22], 4); - ADD_STRING (" "); - ADD_MEM (fpregs[23], 8); - ADD_MEM (fpregs[24], 8); - ADD_STRING ("\n ST(6) "); - ADD_MEM (fpregs[25], 4); - ADD_STRING (" "); - ADD_MEM (fpregs[26], 8); - ADD_MEM (fpregs[27], 8); - ADD_STRING (" ST(7) "); - ADD_MEM (fpregs[28], 4); - ADD_STRING (" "); - ADD_MEM (fpregs[29], 8); - ADD_MEM (fpregs[30], 8); - } + /* Generate output for the FPU control/status registers. */ + hexvalue (ctx->__fpregs_mem.cw, fpregs[0], 8); + hexvalue (ctx->__fpregs_mem.sw, fpregs[1], 8); + hexvalue (ctx->__fpregs_mem.tag, fpregs[2], 8); + hexvalue (ctx->__fpregs_mem.ipoff, fpregs[3], 8); + hexvalue (ctx->__fpregs_mem.cssel, fpregs[4], 4); + hexvalue (ctx->__fpregs_mem.dataoff, fpregs[5], 8); + hexvalue (ctx->__fpregs_mem.datasel, fpregs[6], 4); + + ADD_STRING ("\n\n FPUCW: "); + ADD_MEM (fpregs[0], 8); + ADD_STRING (" FPUSW: "); + ADD_MEM (fpregs[1], 8); + ADD_STRING (" TAG: "); + ADD_MEM (fpregs[2], 8); + ADD_STRING ("\n IPOFF: "); + ADD_MEM (fpregs[3], 8); + ADD_STRING (" CSSEL: "); + ADD_MEM (fpregs[4], 4); + ADD_STRING (" DATAOFF: "); + ADD_MEM (fpregs[5], 8); + ADD_STRING (" DATASEL: "); + ADD_MEM (fpregs[6], 4); + + /* Now the real FPU registers. */ + hexvalue (ctx->__fpregs_mem._st[0].exponent, fpregs[7], 8); + hexvalue (ctx->__fpregs_mem._st[0].significand[3] << 16 + | ctx->__fpregs_mem._st[0].significand[2], fpregs[8], 8); + hexvalue (ctx->__fpregs_mem._st[0].significand[1] << 16 + | ctx->__fpregs_mem._st[0].significand[0], fpregs[9], 8); + hexvalue (ctx->__fpregs_mem._st[1].exponent, fpregs[10], 8); + hexvalue (ctx->__fpregs_mem._st[1].significand[3] << 16 + | ctx->__fpregs_mem._st[1].significand[2], fpregs[11], 8); + hexvalue (ctx->__fpregs_mem._st[1].significand[1] << 16 + | ctx->__fpregs_mem._st[1].significand[0], fpregs[12], 8); + hexvalue (ctx->__fpregs_mem._st[2].exponent, fpregs[13], 8); + hexvalue (ctx->__fpregs_mem._st[2].significand[3] << 16 + | ctx->__fpregs_mem._st[2].significand[2], fpregs[14], 8); + hexvalue (ctx->__fpregs_mem._st[2].significand[1] << 16 + | ctx->__fpregs_mem._st[2].significand[0], fpregs[15], 8); + hexvalue (ctx->__fpregs_mem._st[3].exponent, fpregs[16], 8); + hexvalue (ctx->__fpregs_mem._st[3].significand[3] << 16 + | ctx->__fpregs_mem._st[3].significand[2], fpregs[17], 8); + hexvalue (ctx->__fpregs_mem._st[3].significand[1] << 16 + | ctx->__fpregs_mem._st[3].significand[0], fpregs[18], 8); + hexvalue (ctx->__fpregs_mem._st[4].exponent, fpregs[19], 8); + hexvalue (ctx->__fpregs_mem._st[4].significand[3] << 16 + | ctx->__fpregs_mem._st[4].significand[2], fpregs[20], 8); + hexvalue (ctx->__fpregs_mem._st[4].significand[1] << 16 + | ctx->__fpregs_mem._st[4].significand[0], fpregs[21], 8); + hexvalue (ctx->__fpregs_mem._st[5].exponent, fpregs[22], 8); + hexvalue (ctx->__fpregs_mem._st[5].significand[3] << 16 + | ctx->__fpregs_mem._st[5].significand[2], fpregs[23], 8); + hexvalue (ctx->__fpregs_mem._st[5].significand[1] << 16 + | ctx->__fpregs_mem._st[5].significand[0], fpregs[24], 8); + hexvalue (ctx->__fpregs_mem._st[6].exponent, fpregs[25], 8); + hexvalue (ctx->__fpregs_mem._st[6].significand[3] << 16 + | ctx->__fpregs_mem._st[6].significand[2], fpregs[26], 8); + hexvalue (ctx->__fpregs_mem._st[6].significand[1] << 16 + | ctx->__fpregs_mem._st[6].significand[0], fpregs[27], 8); + hexvalue (ctx->__fpregs_mem._st[7].exponent, fpregs[28], 8); + hexvalue (ctx->__fpregs_mem._st[7].significand[3] << 16 + | ctx->__fpregs_mem._st[7].significand[2], fpregs[29], 8); + hexvalue (ctx->__fpregs_mem._st[7].significand[1] << 16 + | ctx->__fpregs_mem._st[7].significand[0], fpregs[30], 8); + + ADD_STRING ("\n\n ST(0) "); + ADD_MEM (fpregs[7], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[8], 8); + ADD_MEM (fpregs[9], 8); + ADD_STRING (" ST(1) "); + ADD_MEM (fpregs[10], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[11], 8); + ADD_MEM (fpregs[12], 8); + ADD_STRING ("\n ST(2) "); + ADD_MEM (fpregs[13], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[14], 8); + ADD_MEM (fpregs[15], 8); + ADD_STRING (" ST(3) "); + ADD_MEM (fpregs[16], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[17], 8); + ADD_MEM (fpregs[18], 8); + ADD_STRING ("\n ST(4) "); + ADD_MEM (fpregs[19], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[20], 8); + ADD_MEM (fpregs[21], 8); + ADD_STRING (" ST(5) "); + ADD_MEM (fpregs[22], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[23], 8); + ADD_MEM (fpregs[24], 8); + ADD_STRING ("\n ST(6) "); + ADD_MEM (fpregs[25], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[26], 8); + ADD_MEM (fpregs[27], 8); + ADD_STRING (" ST(7) "); + ADD_MEM (fpregs[28], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[29], 8); + ADD_MEM (fpregs[30], 8); ADD_STRING ("\n"); @@ -252,4 +248,4 @@ register_dump (int fd, struct sigcontext *ctx) } -#define REGISTER_DUMP register_dump (fd, &ctx) +#define REGISTER_DUMP register_dump (fd, ctx) diff --git a/sysdeps/unix/sysv/linux/i386/setcontext.S b/sysdeps/unix/sysv/linux/i386/setcontext.S index a604fca0ac..dffe1d18e7 100644 --- a/sysdeps/unix/sysv/linux/i386/setcontext.S +++ b/sysdeps/unix/sysv/linux/i386/setcontext.S @@ -1,5 +1,5 @@ /* Install given context. - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2001. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c index df9fa0ca5b..4409ff5a31 100644 --- a/sysdeps/unix/sysv/linux/i386/sigaction.c +++ b/sysdeps/unix/sysv/linux/i386/sigaction.c @@ -1,5 +1,5 @@ /* POSIX.1 `sigaction' call for Linux/i386. - Copyright (C) 1991-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <signal.h> #include <ldsodefs.h> diff --git a/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h b/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h index 5dee976814..aabddf18d6 100644 --- a/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2018 Free Software Foundation, Inc. +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -14,7 +14,15 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ -#define SIGCONTEXT struct sigcontext -#define GET_PC(ctx) ((void *) ctx.eip) +#ifndef _SIGCONTEXTINFO_H +#define _SIGCONTEXTINFO_H + +static inline uintptr_t +sigcontext_get_pc (const ucontext_t *ctx) +{ + return ctx->uc_mcontext.gregs[REG_EIP]; +} + +#endif diff --git a/sysdeps/unix/sysv/linux/i386/smp.h b/sysdeps/unix/sysv/linux/i386/smp.h index 5457bb27d3..618191f629 100644 --- a/sysdeps/unix/sysv/linux/i386/smp.h +++ b/sysdeps/unix/sysv/linux/i386/smp.h @@ -1,5 +1,5 @@ /* Determine whether the host has multiple processors. Linux version. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If - not, see <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ #include <errno.h> #include <fcntl.h> diff --git a/sysdeps/unix/sysv/linux/i386/startup.h b/sysdeps/unix/sysv/linux/i386/startup.h index ecc82aa090..de0662a2a9 100644 --- a/sysdeps/unix/sysv/linux/i386/startup.h +++ b/sysdeps/unix/sysv/linux/i386/startup.h @@ -1,5 +1,5 @@ /* Linux/i386 definitions of functions used by static libc main startup. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if BUILD_PIE_DEFAULT # include <abort-instr.h> diff --git a/sysdeps/unix/sysv/linux/i386/swapcontext.S b/sysdeps/unix/sysv/linux/i386/swapcontext.S index 431f22c708..6fdc176535 100644 --- a/sysdeps/unix/sysv/linux/i386/swapcontext.S +++ b/sysdeps/unix/sysv/linux/i386/swapcontext.S @@ -1,5 +1,5 @@ /* Save current context and install the given one. - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2001. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> diff --git a/sysdeps/unix/sysv/linux/i386/syscall.S b/sysdeps/unix/sysv/linux/i386/syscall.S index 03d4573507..b2e00395c8 100644 --- a/sysdeps/unix/sysv/linux/i386/syscall.S +++ b/sysdeps/unix/sysv/linux/i386/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2018 Free Software Foundation, Inc. +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.c b/sysdeps/unix/sysv/linux/i386/sysdep.c index b809628901..1927a98434 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.c +++ b/sysdeps/unix/sysv/linux/i386/sysdep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2018 Free Software Foundation, Inc. +/* Copyright (C) 2015-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <errno.h> #include <sysdep.h> diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 3255cc78b8..7066ddc214 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2018 Free Software Foundation, Inc. +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINUX_I386_SYSDEP_H #define _LINUX_I386_SYSDEP_H 1 @@ -309,9 +309,12 @@ struct libc_do_syscall_args #define INLINE_SYSCALL_ERROR_RETURN_VALUE(resultvar) \ __syscall_error (-(resultvar)) +# define VDSO_NAME "LINUX_2.6" +# define VDSO_HASH 61765110 + /* List of system calls which are supported as vsyscalls. */ -# define HAVE_CLOCK_GETTIME_VSYSCALL 1 -# define HAVE_GETTIMEOFDAY_VSYSCALL 1 +# define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime" +# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" /* Define a macro which expands inline into the wrapper code for a system call. This use is for internal calls that do not need to handle errors diff --git a/sysdeps/unix/sysv/linux/i386/time.c b/sysdeps/unix/sysv/linux/i386/time.c deleted file mode 100644 index 5f6f8b7734..0000000000 --- a/sysdeps/unix/sysv/linux/i386/time.c +++ /dev/null @@ -1,34 +0,0 @@ -/* time -- Get number of seconds since Epoch. Linux/i386 version. - Copyright (C) 2015-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#ifdef SHARED -# define time __redirect_time -#endif - -#include <time.h> - -#ifdef SHARED -# undef time -# define time_type __redirect_time - -# undef libc_hidden_def -# define libc_hidden_def(name) \ - __hidden_ver1 (__time_syscall, __GI_time, __time_syscall); -#endif - -#include <sysdeps/unix/sysv/linux/x86/time.c> diff --git a/sysdeps/unix/sysv/linux/i386/tst-bz21269.c b/sysdeps/unix/sysv/linux/i386/tst-bz21269.c index 6ee3fc62be..8b82ccf43b 100644 --- a/sysdeps/unix/sysv/linux/i386/tst-bz21269.c +++ b/sysdeps/unix/sysv/linux/i386/tst-bz21269.c @@ -1,5 +1,5 @@ /* Test for i386 sigaction sa_restorer handling (BZ#21269) - Copyright (C) 2017 Free Software Foundation, Inc. + Copyright (C) 2017-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This is based on Linux test tools/testing/selftests/x86/ldt_gdt.c, more specifically in do_multicpu_tests function. The main changes diff --git a/sysdeps/unix/sysv/linux/i386/vfork.S b/sysdeps/unix/sysv/linux/i386/vfork.S index ce6dbfac48..d1e5fce6ff 100644 --- a/sysdeps/unix/sysv/linux/i386/vfork.S +++ b/sysdeps/unix/sysv/linux/i386/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2018 Free Software Foundation, Inc. +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab <schwab@gnu.org>. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> #define _ERRNO_H 1 diff --git a/sysdeps/unix/sysv/linux/i386/xstat.c b/sysdeps/unix/sysv/linux/i386/xstat.c index eea1bea046..5adda11c86 100644 --- a/sysdeps/unix/sysv/linux/i386/xstat.c +++ b/sysdeps/unix/sysv/linux/i386/xstat.c @@ -1,5 +1,5 @@ /* xstat using old-style Unix stat system call. - Copyright (C) 1991-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Ho hum, if xstat == xstat64 we must get rid of the prototype or gcc will complain since they don't strictly match. */ |