diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc')
114 files changed, 1028 insertions, 414 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile index 24827ef..cddb624 100644 --- a/sysdeps/unix/sysv/linux/powerpc/Makefile +++ b/sysdeps/unix/sysv/linux/powerpc/Makefile @@ -13,6 +13,10 @@ gen-as-const-headers += ucontext_i.sym endif ifeq ($(subdir),elf) +dl-routines += \ + dl-hwcap-info \ + # dl-routines + # Otherwise tst-tls-dlinfo fails due to tst-tlsmod2.so using static tls. ifeq ($(have-tls-get-addr-optimize),yes) LDFLAGS-tst-tlsmod2.so += -Wl,--no-tls-get-addr-optimize diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/environments.h b/sysdeps/unix/sysv/linux/powerpc/bits/environments.h index d31d5c2..d8339e6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/environments.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/environments.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2024 Free Software Foundation, Inc. +/* Copyright (C) 1999-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h index 2f17fe9..24fd3b7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/PowerPC. - Copyright (C) 1995-2024 Free Software Foundation, Inc. + Copyright (C) 1995-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h index 4044c00..267fa09 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/powerpc version. - Copyright (C) 2014-2024 Free Software Foundation, Inc. + Copyright (C) 2014-2025 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 @@ -32,17 +32,6 @@ struct winsize unsigned short int ws_ypixel; }; -#define NCC 10 -struct termio - { - unsigned short int c_iflag; /* input mode flags */ - unsigned short int c_oflag; /* output mode flags */ - unsigned short int c_cflag; /* control mode flags */ - unsigned short int c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - /* modem lines */ #define TIOCM_LE 0x001 #define TIOCM_DTR 0x002 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/ioctls.h b/sysdeps/unix/sysv/linux/powerpc/bits/ioctls.h new file mode 100644 index 0000000..e1921df --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/bits/ioctls.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1996-2025 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 + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_IOCTL_H +# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." +#endif + +/* Use the definitions from the kernel header files. */ +#include <asm/ioctls.h> + +/* PowerPC quirk: on PowerPC only, ioctl() emulates the TCGETS/TCSETS* + ioctls with tcgetattr/tcsetattr using the glibc struct termios. + As struct termios2 is the same as the kernel struct termios on PowerPC, + simply consider the kernel ones as the termios2 interface, even + though the kernel doesn't call it that. */ + +#define TCGETS2 _IOR ('t', 19, struct termios2) +#define TCSETS2 _IOW ('t', 20, struct termios2) +#define TCSETSW2 _IOW ('t', 21, struct termios2) +#define TCSETSF2 _IOW ('t', 22, struct termios2) + +#include <linux/sockios.h> diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/ipc-perm.h b/sysdeps/unix/sysv/linux/powerpc/bits/ipc-perm.h index d2a2b5b..0c281d8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/ipc-perm.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/ipc-perm.h @@ -1,5 +1,5 @@ /* struct ipc_perm definition. Linux/powerpc version. - Copyright (C) 1995-2024 Free Software Foundation, Inc. + Copyright (C) 1995-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h index 2b392cc..99c8e52 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/PowerPC version. - Copyright (C) 1997-2024 Free Software Foundation, Inc. + Copyright (C) 1997-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h b/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h index 21843fb..7749db6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h @@ -1,5 +1,5 @@ /* Facilities specific to the PowerPC architecture on Linux - Copyright (C) 2012-2024 Free Software Foundation, Inc. + Copyright (C) 2012-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/procfs.h b/sysdeps/unix/sysv/linux/powerpc/bits/procfs.h index 4e21788..501464b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/procfs.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. PowerPC version. - Copyright (C) 1996-2024 Free Software Foundation, Inc. + Copyright (C) 1996-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/pthread_stack_min.h b/sysdeps/unix/sysv/linux/powerpc/bits/pthread_stack_min.h index 509919d..540cdbb 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/pthread_stack_min.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/pthread_stack_min.h @@ -1,5 +1,5 @@ /* Definition of PTHREAD_STACK_MIN. Linux/PPC version. - Copyright (C) 2021-2024 Free Software Foundation, Inc. + Copyright (C) 2021-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/rseq.h b/sysdeps/unix/sysv/linux/powerpc/bits/rseq.h index 85544aa..d2d6216 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/rseq.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/rseq.h @@ -1,5 +1,5 @@ /* Restartable Sequences Linux powerpc architecture header. - Copyright (C) 2021-2024 Free Software Foundation, Inc. + Copyright (C) 2021-2025 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h b/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h index 2c198eb..17a17ce 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h b/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h index 0d3e095..fee5674 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for POWER. - Copyright (C) 2019-2024 Free Software Foundation, Inc. + Copyright (C) 2019-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h b/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h index 2cf3315..f0721f9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h @@ -1,5 +1,5 @@ /* Definition for struct stat. - Copyright (C) 2020-2024 Free Software Foundation, Inc. + Copyright (C) 2020-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h index c5f395a..20f1661 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/powerpc version. - Copyright (C) 2019-2024 Free Software Foundation, Inc. + Copyright (C) 2019-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h index 6607bb0..a90d581 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h @@ -1,5 +1,5 @@ /* termios control mode definitions. Linux/powerpc version. - Copyright (C) 2019-2024 Free Software Foundation, Inc. + Copyright (C) 2019-2025 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 @@ -35,5 +35,7 @@ #define CLOCAL 00100000 #ifdef __USE_MISC -# define ADDRB 04000000000 +# define ADDRB 04000000000 +# define CMSPAR 010000000000 /* Mark or space (stick) parity. */ +# define CRTSCTS 020000000000 /* Flow control. */ #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h index b5e066d..ef076dc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h @@ -1,5 +1,5 @@ /* termios input mode definitions. Linux/powerpc version. - Copyright (C) 2019-2024 Free Software Foundation, Inc. + Copyright (C) 2019-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h index 9f6b0ad5..9b67040 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/powerpc version. - Copyright (C) 2019-2024 Free Software Foundation, Inc. + Copyright (C) 2019-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h index 99a0bd0..67f52df 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h @@ -1,5 +1,5 @@ /* termios output mode definitions. Linux/powerpc version. - Copyright (C) 2019-2024 Free Software Foundation, Inc. + Copyright (C) 2019-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-baud.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-cbaud.h index 6862050..7bcbba4 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios-baud.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-cbaud.h @@ -1,5 +1,5 @@ /* termios baud rate selection definitions. Linux/powerpc version. - Copyright (C) 2019-2024 Free Software Foundation, Inc. + Copyright (C) 2019-2025 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,29 +17,29 @@ <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H -# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead." +# error "Never include <bits/termios-cbaud.h> directly; use <termios.h> instead." #endif #ifdef __USE_MISC -# define CBAUD 0000377 -# define CBAUDEX 0000020 -# define CMSPAR 010000000000 /* mark or space (stick) parity */ -# define CRTSCTS 020000000000 /* flow control */ +# define CBAUD 000000377 +# define CBAUDEX 000000020 +# define CIBAUD 077600000 +# define IBSHIFT 16 #endif -#define B57600 00020 -#define B115200 00021 -#define B230400 00022 -#define B460800 00023 -#define B500000 00024 -#define B576000 00025 -#define B921600 00026 -#define B1000000 00027 -#define B1152000 00030 -#define B1500000 00031 -#define B2000000 00032 -#define B2500000 00033 -#define B3000000 00034 -#define B3500000 00035 -#define B4000000 00036 -#define __MAX_BAUD B4000000 +#define __B57600 00020 +#define __B115200 00021 +#define __B230400 00022 +#define __B460800 00023 +#define __B500000 00024 +#define __B576000 00025 +#define __B921600 00026 +#define __B1000000 00027 +#define __B1152000 00030 +#define __B1500000 00031 +#define __B2000000 00032 +#define __B2500000 00033 +#define __B3000000 00034 +#define __B3500000 00035 +#define __B4000000 00036 +#define __BOTHER 00037 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h index aec8ac9..fe74858 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h @@ -1,5 +1,5 @@ /* termios baud platform specific definitions. Linux/powerpc version. - Copyright (C) 2019-2024 Free Software Foundation, Inc. + Copyright (C) 2019-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/timesize.h b/sysdeps/unix/sysv/linux/powerpc/bits/timesize.h index d25cff2..31edb4b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/timesize.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/timesize.h @@ -1,5 +1,5 @@ /* Bit size of the time_t type at glibc build time, Linux/PowerPC. - Copyright (C) 2021-2024 Free Software Foundation, Inc. + Copyright (C) 2021-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h index 44ae082..43e1827 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h @@ -1,5 +1,5 @@ /* Linux/PowerPC implementation of the SysV message struct msqid_ds. - Copyright (C) 2020-2024 Free Software Foundation, Inc. + Copyright (C) 2020-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h index ccee57c..d5c40f5 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h @@ -1,5 +1,5 @@ /* PowerPC implementation of the semaphore struct semid_ds. - Copyright (C) 1995-2024 Free Software Foundation, Inc. + Copyright (C) 1995-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_shmid_ds.h b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_shmid_ds.h index 58145d0..9a751fe 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_shmid_ds.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_shmid_ds.h @@ -1,5 +1,5 @@ /* Linux/PowerPC implementation of the shared memory struct shmid_ds. - Copyright (C) 2020-2024 Free Software Foundation, Inc. + Copyright (C) 2020-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/typesizes.h b/sysdeps/unix/sysv/linux/powerpc/bits/typesizes.h index 065ede2..9db989d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. PowerPC version. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/cancellation-pc-check.h b/sysdeps/unix/sysv/linux/powerpc/cancellation-pc-check.h new file mode 100644 index 0000000..709882d --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/cancellation-pc-check.h @@ -0,0 +1,65 @@ +/* Architecture specific code for pthread cancellation handling. + Linux/PowerPC version. + Copyright (C) 2023-2025 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/>. */ + +#ifndef _NPTL_CANCELLATION_PC_CHECK +#define _NPTL_CANCELLATION_PC_CHECK + +#include <sigcontextinfo.h> + +/* For syscalls with side-effects (e.g read that might return partial read), + the kernel cannot restart the syscall when interrupted by a signal, it must + return from the call with whatever partial result. In this case, the saved + program counter is set just after the syscall instruction, so the SIGCANCEL + handler should not act on cancellation. + + The __syscall_cancel_arch function, used for all cancellable syscalls, + contains two extra markers, __syscall_cancel_arch_start and + __syscall_cancel_arch_end. The former points to just before the initial + conditional branch that checks if the thread has received a cancellation + request, while former points to the instruction after the one responsible + to issue the syscall. + + The function check if the program counter (PC) from ucontext_t CTX is + within the start and then end boundary from the __syscall_cancel_arch + bridge. Return TRUE if the PC is within the boundary, meaning the + syscall does not have any side effects; or FALSE otherwise. */ + +static __always_inline bool +cancellation_pc_check (void *ctx) +{ + /* Both are defined in syscall_cancel.S. */ + extern const char __syscall_cancel_arch_start[1]; + extern const char __syscall_cancel_arch_end_sc[1]; +#if defined(USE_PPC_SVC) && defined(__powerpc64__) + extern const char __syscall_cancel_arch_end_svc[1]; +#endif + + uintptr_t pc = sigcontext_get_pc (ctx); + + return pc >= (uintptr_t) __syscall_cancel_arch_start +#if defined(USE_PPC_SVC) && defined(__powerpc64__) + && THREAD_GET_HWCAP() & PPC_FEATURE2_SCV + ? pc < (uintptr_t) __syscall_cancel_arch_end_sc + : pc < (uintptr_t) __syscall_cancel_arch_end_svc; +#else + && pc < (uintptr_t) __syscall_cancel_arch_end_sc; +#endif +} + +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/configure b/sysdeps/unix/sysv/linux/powerpc/configure index 61ae675..ef2055d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/configure +++ b/sysdeps/unix/sysv/linux/powerpc/configure @@ -40,48 +40,7 @@ fi printf "%s\n" "$libc_cv_mlong_double_128ibm" >&6; } if test "$libc_cv_mlong_double_128ibm" = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC $CFLAGS supports -mabi=ibmlongdouble" >&5 -printf %s "checking whether $CC $CFLAGS supports -mabi=ibmlongdouble... " >&6; } -if test ${libc_cv_mabi_ibmlongdouble+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mlong-double-128 -mabi=ibmlongdouble" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <float.h> -int -main (void) -{ - -#if LDBL_MANT_DIG != 106 -# error "compiler doesn't implement IBM extended format of long double" -#endif -long double foobar (long double x) { return x; } - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - libc_cv_mabi_ibmlongdouble=yes -else case e in #( - e) libc_cv_mabi_ibmlongdouble=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS="$save_CFLAGS" ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mabi_ibmlongdouble" >&5 -printf "%s\n" "$libc_cv_mabi_ibmlongdouble" >&6; } - - if test "$libc_cv_mabi_ibmlongdouble" = yes; then - CFLAGS="$CFLAGS -mabi=ibmlongdouble" - else - as_fn_error $? "this configuration requires -mlong-double-128 IBM extended format support" "$LINENO" 5 - fi + CFLAGS="$CFLAGS -mabi=ibmlongdouble" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linker that supports --no-tls-get-addr-optimize" >&5 diff --git a/sysdeps/unix/sysv/linux/powerpc/configure.ac b/sysdeps/unix/sysv/linux/powerpc/configure.ac index 8d2ec60..42347a6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/configure.ac +++ b/sysdeps/unix/sysv/linux/powerpc/configure.ac @@ -16,24 +16,7 @@ long double foobar (long double x) { return x; }]])], CFLAGS="$save_CFLAGS"]) if test "$libc_cv_mlong_double_128ibm" = no; then - AC_CACHE_CHECK(whether $CC $CFLAGS supports -mabi=ibmlongdouble, - libc_cv_mabi_ibmlongdouble, [dnl - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mlong-double-128 -mabi=ibmlongdouble" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <float.h>]], [[ -#if LDBL_MANT_DIG != 106 -# error "compiler doesn't implement IBM extended format of long double" -#endif -long double foobar (long double x) { return x; }]])], - libc_cv_mabi_ibmlongdouble=yes, - libc_cv_mabi_ibmlongdouble=no) - CFLAGS="$save_CFLAGS"]) - - if test "$libc_cv_mabi_ibmlongdouble" = yes; then - CFLAGS="$CFLAGS -mabi=ibmlongdouble" - else - AC_MSG_ERROR([this configuration requires -mlong-double-128 IBM extended format support]) - fi + CFLAGS="$CFLAGS -mabi=ibmlongdouble" fi LIBC_LINKER_FEATURE([--no-tls-get-addr-optimize], [-Wl,--no-tls-get-addr-optimize], diff --git a/sysdeps/unix/sysv/linux/powerpc/cpu-features.c b/sysdeps/unix/sysv/linux/powerpc/cpu-features.c index a947d62..88fe55f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/cpu-features.c +++ b/sysdeps/unix/sysv/linux/powerpc/cpu-features.c @@ -1,5 +1,5 @@ /* Initialize cpu feature data. PowerPC version. - Copyright (C) 2017-2024 Free Software Foundation, Inc. + Copyright (C) 2017-2025 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,8 +21,19 @@ #include <cpu-features.h> #include <elf/dl-tunables.h> #include <dl-tunables-parse.h> +#include <dl-hwcap-info.h> #include <unistd.h> #include <string.h> +#include <ldsodefs.h> + +static void set_hwcap_bit (unsigned long int *hwcap, bool disable, + unsigned long int tcb_value, unsigned int value) +{ + if (disable) + *hwcap &= ~value; + else + *hwcap |= tcb_value & value; +} static void TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *valp) @@ -55,32 +66,27 @@ TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *valp) continue; size_t offset = 0; - for (int i = 0; i < array_length (hwcap_tunables); ++i) + for (int i = 0; i < __dl_hwcap_info_size; ++i) { - const char *hwcap_name = hwcap_names + offset; + const char *hwcap_name = __dl_hwcap_names + offset; size_t hwcap_name_len = strlen (hwcap_name); /* Check the tunable name on the supported list. */ if (tunable_str_comma_strcmp (&t, hwcap_name, hwcap_name_len)) { - /* Update the hwcap and hwcap2 bits. */ - if (t.disable) + switch (__dl_hwcap_info[i].hwcap) { - /* Id is 1 for hwcap2 tunable. */ - if (hwcap_tunables[i].id) - cpu_features->hwcap2 &= ~(hwcap_tunables[i].mask); - else - cpu_features->hwcap &= ~(hwcap_tunables[i].mask); - } - else - { - /* Enable the features and also check that no unsupported - features were enabled by user. */ - if (hwcap_tunables[i].id) - cpu_features->hwcap2 |= (tcbv_hwcap2 & hwcap_tunables[i].mask); - else - cpu_features->hwcap |= (tcbv_hwcap & hwcap_tunables[i].mask); + case AT_HWCAP: + set_hwcap_bit (&cpu_features->hwcap, t.disable, tcbv_hwcap, + __dl_hwcap_info[i].value); + break; + + case AT_HWCAP2: + set_hwcap_bit (&cpu_features->hwcap2, t.disable, tcbv_hwcap2, + __dl_hwcap_info[i].value); + break; + + /* Ignore unknown values. */ } - break; } offset += hwcap_name_len + 1; } diff --git a/sysdeps/unix/sysv/linux/powerpc/cpu-features.h b/sysdeps/unix/sysv/linux/powerpc/cpu-features.h index e9eb6a1..f15a803 100644 --- a/sysdeps/unix/sysv/linux/powerpc/cpu-features.h +++ b/sysdeps/unix/sysv/linux/powerpc/cpu-features.h @@ -1,5 +1,5 @@ /* Initialize cpu feature data. PowerPC version. - Copyright (C) 2017-2024 Free Software Foundation, Inc. + Copyright (C) 2017-2025 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -30,103 +30,4 @@ struct cpu_features unsigned long int hwcap4; }; -static const char hwcap_names[] = { - "4xxmac\0" - "altivec\0" - "arch_2_05\0" - "arch_2_06\0" - "archpmu\0" - "booke\0" - "cellbe\0" - "dfp\0" - "efpdouble\0" - "efpsingle\0" - "fpu\0" - "ic_snoop\0" - "mmu\0" - "notb\0" - "pa6t\0" - "power4\0" - "power5\0" - "power5+\0" - "power6x\0" - "ppc32\0" - "ppc601\0" - "ppc64\0" - "ppcle\0" - "smt\0" - "spe\0" - "true_le\0" - "ucache\0" - "vsx\0" - "arch_2_07\0" - "dscr\0" - "ebb\0" - "htm\0" - "htm-nosc\0" - "htm-no-suspend\0" - "isel\0" - "tar\0" - "vcrypto\0" - "arch_3_00\0" - "ieee128\0" - "darn\0" - "scv\0" - "arch_3_1\0" - "mma\0" -}; - -static const struct -{ - unsigned int mask; - bool id; -} hwcap_tunables[] = { - /* AT_HWCAP tunable masks. */ - { PPC_FEATURE_HAS_4xxMAC, 0 }, - { PPC_FEATURE_HAS_ALTIVEC, 0 }, - { PPC_FEATURE_ARCH_2_05, 0 }, - { PPC_FEATURE_ARCH_2_06, 0 }, - { PPC_FEATURE_PSERIES_PERFMON_COMPAT, 0 }, - { PPC_FEATURE_BOOKE, 0 }, - { PPC_FEATURE_CELL_BE, 0 }, - { PPC_FEATURE_HAS_DFP, 0 }, - { PPC_FEATURE_HAS_EFP_DOUBLE, 0 }, - { PPC_FEATURE_HAS_EFP_SINGLE, 0 }, - { PPC_FEATURE_HAS_FPU, 0 }, - { PPC_FEATURE_ICACHE_SNOOP, 0 }, - { PPC_FEATURE_HAS_MMU, 0 }, - { PPC_FEATURE_NO_TB, 0 }, - { PPC_FEATURE_PA6T, 0 }, - { PPC_FEATURE_POWER4, 0 }, - { PPC_FEATURE_POWER5, 0 }, - { PPC_FEATURE_POWER5_PLUS, 0 }, - { PPC_FEATURE_POWER6_EXT, 0 }, - { PPC_FEATURE_32, 0 }, - { PPC_FEATURE_601_INSTR, 0 }, - { PPC_FEATURE_64, 0 }, - { PPC_FEATURE_PPC_LE, 0 }, - { PPC_FEATURE_SMT, 0 }, - { PPC_FEATURE_HAS_SPE, 0 }, - { PPC_FEATURE_TRUE_LE, 0 }, - { PPC_FEATURE_UNIFIED_CACHE, 0 }, - { PPC_FEATURE_HAS_VSX, 0 }, - - /* AT_HWCAP2 tunable masks. */ - { PPC_FEATURE2_ARCH_2_07, 1 }, - { PPC_FEATURE2_HAS_DSCR, 1 }, - { PPC_FEATURE2_HAS_EBB, 1 }, - { PPC_FEATURE2_HAS_HTM, 1 }, - { PPC_FEATURE2_HTM_NOSC, 1 }, - { PPC_FEATURE2_HTM_NO_SUSPEND, 1 }, - { PPC_FEATURE2_HAS_ISEL, 1 }, - { PPC_FEATURE2_HAS_TAR, 1 }, - { PPC_FEATURE2_HAS_VEC_CRYPTO, 1 }, - { PPC_FEATURE2_ARCH_3_00, 1 }, - { PPC_FEATURE2_HAS_IEEE128, 1 }, - { PPC_FEATURE2_DARN, 1 }, - { PPC_FEATURE2_SCV, 1 }, - { PPC_FEATURE2_ARCH_3_1, 1 }, - { PPC_FEATURE2_MMA, 1 }, -}; - #endif /* __CPU_FEATURES_H */ diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h b/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h index e47dac6..ddb9328 100644 --- a/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h +++ b/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h @@ -1,5 +1,5 @@ /* Auxiliary vector processing. Linux/PPC version. - Copyright (C) 2020-2024 Free Software Foundation, Inc. + Copyright (C) 2020-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.c b/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.c new file mode 100644 index 0000000..1178828 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.c @@ -0,0 +1,117 @@ +/* HWCAP string information. PowerPC version. + Copyright (C) 2017-2025 Free Software Foundation, Inc. + + 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 + <https://www.gnu.org/licenses/>. */ + +#include <array_length.h> +#include <dl-hwcap-info.h> + +const char __dl_hwcap_names[] = { + "4xxmac\0" + "altivec\0" + "arch_2_05\0" + "arch_2_06\0" + "archpmu\0" + "booke\0" + "cellbe\0" + "dfp\0" + "efpdouble\0" + "efpsingle\0" + "fpu\0" + "ic_snoop\0" + "mmu\0" + "notb\0" + "pa6t\0" + "power4\0" + "power5\0" + "power5+\0" + "power6x\0" + "ppc32\0" + "ppc601\0" + "ppc64\0" + "ppcle\0" + "smt\0" + "spe\0" + "true_le\0" + "ucache\0" + "vsx\0" + "arch_2_07\0" + "dscr\0" + "ebb\0" + "htm\0" + "htm-nosc\0" + "htm-no-suspend\0" + "isel\0" + "tar\0" + "vcrypto\0" + "arch_3_00\0" + "ieee128\0" + "darn\0" + "scv\0" + "arch_3_1\0" + "mma\0" +}; + +const struct hwcap_info_t __dl_hwcap_info[] = +{ + /* AT_HWCAP tunable masks. */ + { PPC_FEATURE_HAS_4xxMAC, AT_HWCAP }, + { PPC_FEATURE_HAS_ALTIVEC, AT_HWCAP }, + { PPC_FEATURE_ARCH_2_05, AT_HWCAP }, + { PPC_FEATURE_ARCH_2_06, AT_HWCAP }, + { PPC_FEATURE_PSERIES_PERFMON_COMPAT, AT_HWCAP }, + { PPC_FEATURE_BOOKE, AT_HWCAP }, + { PPC_FEATURE_CELL_BE, AT_HWCAP }, + { PPC_FEATURE_HAS_DFP, AT_HWCAP }, + { PPC_FEATURE_HAS_EFP_DOUBLE, AT_HWCAP }, + { PPC_FEATURE_HAS_EFP_SINGLE, AT_HWCAP }, + { PPC_FEATURE_HAS_FPU, AT_HWCAP }, + { PPC_FEATURE_ICACHE_SNOOP, AT_HWCAP }, + { PPC_FEATURE_HAS_MMU, AT_HWCAP }, + { PPC_FEATURE_NO_TB, AT_HWCAP }, + { PPC_FEATURE_PA6T, AT_HWCAP }, + { PPC_FEATURE_POWER4, AT_HWCAP }, + { PPC_FEATURE_POWER5, AT_HWCAP }, + { PPC_FEATURE_POWER5_PLUS, AT_HWCAP }, + { PPC_FEATURE_POWER6_EXT, AT_HWCAP }, + { PPC_FEATURE_32, AT_HWCAP }, + { PPC_FEATURE_601_INSTR, AT_HWCAP }, + { PPC_FEATURE_64, AT_HWCAP }, + { PPC_FEATURE_PPC_LE, AT_HWCAP }, + { PPC_FEATURE_SMT, AT_HWCAP }, + { PPC_FEATURE_HAS_SPE, AT_HWCAP }, + { PPC_FEATURE_TRUE_LE, AT_HWCAP }, + { PPC_FEATURE_UNIFIED_CACHE, AT_HWCAP }, + { PPC_FEATURE_HAS_VSX, AT_HWCAP }, + + /* AT_HWCAP2 tunable masks. */ + { PPC_FEATURE2_ARCH_2_07, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_DSCR, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_EBB, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_HTM, AT_HWCAP2 }, + { PPC_FEATURE2_HTM_NOSC, AT_HWCAP2 }, + { PPC_FEATURE2_HTM_NO_SUSPEND, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_ISEL, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_TAR, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_VEC_CRYPTO, AT_HWCAP2 }, + { PPC_FEATURE2_ARCH_3_00, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_IEEE128, AT_HWCAP2 }, + { PPC_FEATURE2_DARN, AT_HWCAP2 }, + { PPC_FEATURE2_SCV, AT_HWCAP2 }, + { PPC_FEATURE2_ARCH_3_1, AT_HWCAP2 }, + { PPC_FEATURE2_MMA, AT_HWCAP2 }, +}; + +size_t __dl_hwcap_info_size = array_length (__dl_hwcap_info); diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.h b/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.h new file mode 100644 index 0000000..194f40c --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.h @@ -0,0 +1,34 @@ +/* HWCAP string information. PowerPC version. + Copyright (C) 2017-2025 Free Software Foundation, Inc. + + 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 + <https://www.gnu.org/licenses/>. */ + +#ifndef _DL_HWCAP_INFO_H +#define _DL_HWCAP_INFO_H + +#include <stddef.h> +#include <sys/auxv.h> + +extern const char __dl_hwcap_names[] attribute_hidden; + +struct hwcap_info_t +{ + unsigned int value; + int hwcap; +}; +extern const struct hwcap_info_t __dl_hwcap_info[] attribute_hidden; +extern size_t __dl_hwcap_info_size attribute_hidden; + +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-conf.c b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c index a85d25c..451897b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-conf.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c @@ -1,5 +1,5 @@ /* elision-conf.c: Lock elision tunable parameters. - Copyright (C) 2015-2024 Free Software Foundation, Inc. + Copyright (C) 2015-2025 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 @@ -20,7 +20,7 @@ #include <pthreadP.h> #include <elision-conf.h> #include <unistd.h> -#include <dl-procinfo.h> +#include <ldsodefs.h> #define TUNABLE_NAMESPACE elision #include <elf/dl-tunables.h> diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-conf.h b/sysdeps/unix/sysv/linux/powerpc/elision-conf.h index bb7cbb4..11bc7ed 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-conf.h +++ b/sysdeps/unix/sysv/linux/powerpc/elision-conf.h @@ -1,5 +1,5 @@ /* elision-conf.h: Lock elision tunable parameters. - Copyright (C) 2015-2024 Free Software Foundation, Inc. + Copyright (C) 2015-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-lock.c b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c index 0715f69..8eb7c3e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-lock.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c @@ -1,5 +1,5 @@ /* elision-lock.c: Elided pthread mutex lock. - Copyright (C) 2015-2024 Free Software Foundation, Inc. + Copyright (C) 2015-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-timed.c b/sysdeps/unix/sysv/linux/powerpc/elision-timed.c index 0b7d5bc..6442408 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-timed.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-timed.c @@ -1,5 +1,5 @@ /* elision-timed.c: Lock elision timed lock. - Copyright (C) 2015-2024 Free Software Foundation, Inc. + Copyright (C) 2015-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c b/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c index 2eaa413..d252799 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c @@ -1,5 +1,5 @@ /* elision-trylock.c: Lock eliding trylock for pthreads. - Copyright (C) 2015-2024 Free Software Foundation, Inc. + Copyright (C) 2015-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c b/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c index 40322ab..7741514 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c @@ -1,5 +1,5 @@ /* elision-unlock.c: Commit an elided pthread lock. - Copyright (C) 2015-2024 Free Software Foundation, Inc. + Copyright (C) 2015-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c b/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c index 12b609c..0c64a62 100644 --- a/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c +++ b/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c @@ -1,5 +1,5 @@ /* Get the frequency of the time base. - Copyright (C) 2012-2024 Free Software Foundation, Inc. + Copyright (C) 2012-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c index 41a8f4e..1ff9f1e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2024 Free Software Foundation, Inc. +/* Copyright (C) 2005-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/htm.h b/sysdeps/unix/sysv/linux/powerpc/htm.h index a256c65..672b197 100644 --- a/sysdeps/unix/sysv/linux/powerpc/htm.h +++ b/sysdeps/unix/sysv/linux/powerpc/htm.h @@ -2,7 +2,7 @@ compilers and assemblers that do not support the intrinsics and instructions yet. - Copyright (C) 2015-2024 Free Software Foundation, Inc. + Copyright (C) 2015-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/internal-ioctl.h b/sysdeps/unix/sysv/linux/powerpc/internal-ioctl.h index 6f68946..6c21357 100644 --- a/sysdeps/unix/sysv/linux/powerpc/internal-ioctl.h +++ b/sysdeps/unix/sysv/linux/powerpc/internal-ioctl.h @@ -1,5 +1,5 @@ /* Linux internal definitions for ioctl. - Copyright (C) 2021-2024 Free Software Foundation, Inc. + Copyright (C) 2021-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h b/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h index 0d15f04..24b7202 100644 --- a/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h +++ b/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h @@ -1,5 +1,5 @@ /* Old SysV permission definition for Linux. PowerPC version. - Copyright (C) 1995-2024 Free Software Foundation, Inc. + Copyright (C) 1995-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h index 9ddfe82..6e5adb9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. PowerPC version. - Copyright (C) 1999-2024 Free Software Foundation, Inc. + Copyright (C) 1999-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel_termios.h b/sysdeps/unix/sysv/linux/powerpc/kernel_termios.h deleted file mode 100644 index 6047297..0000000 --- a/sysdeps/unix/sysv/linux/powerpc/kernel_termios.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 1997-2024 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 - <https://www.gnu.org/licenses/>. */ - -#ifndef _KERNEL_TERMIOS_H -#define _KERNEL_TERMIOS_H 1 - -/* We need the definition of tcflag_t, cc_t, and speed_t. */ -#include <termios.h> - -#define __KERNEL_NCCS 19 - -struct __kernel_termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_cc[__KERNEL_NCCS]; /* control characters */ - cc_t c_line; /* line discipline */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ - }; - -#define _HAVE_C_ISPEED 1 -#define _HAVE_C_OSPEED 1 - -/* We have the kernel termios structure, so we can presume this code knows - what it's doing... */ - -#undef TCGETS -#undef TCSETS -#undef TCSETSW -#undef TCSETSF -#define TCGETS _IOR ('t', 19, struct __kernel_termios) -#define TCSETS _IOW ('t', 20, struct __kernel_termios) -#define TCSETSW _IOW ('t', 21, struct __kernel_termios) -#define TCSETSF _IOW ('t', 22, struct __kernel_termios) - -#endif /* kernel_termios.h */ diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c index 6a00cd8..852efce 100644 --- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c +++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2024 Free Software Foundation, Inc. +/* Copyright (C) 1998-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.h b/sysdeps/unix/sysv/linux/powerpc/libc-start.h index 309eef3..f137cd3 100644 --- a/sysdeps/unix/sysv/linux/powerpc/libc-start.h +++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.h @@ -1,5 +1,5 @@ /* PowerPC definitions for libc main startup. - Copyright (C) 2017-2024 Free Software Foundation, Inc. + Copyright (C) 2017-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h b/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h index 3fe5252..b976355 100644 --- a/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h +++ b/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h @@ -1,5 +1,5 @@ /* Resolve function pointers to VDSO functions. - Copyright (C) 2005-2024 Free Software Foundation, Inc. + Copyright (C) 2005-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/libpthread-compat.c b/sysdeps/unix/sysv/linux/powerpc/libpthread-compat.c index 08545e3..da2467e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/libpthread-compat.c +++ b/sysdeps/unix/sysv/linux/powerpc/libpthread-compat.c @@ -1,5 +1,5 @@ /* Placeholder definitions for removed symbol versions. powerpc version. - Copyright (C) 2021-2024 Free Software Foundation, Inc. + Copyright (C) 2021-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/pointer_guard.h b/sysdeps/unix/sysv/linux/powerpc/pointer_guard.h index 0db0f0d..19da93d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/pointer_guard.h +++ b/sysdeps/unix/sysv/linux/powerpc/pointer_guard.h @@ -1,5 +1,5 @@ /* Pointer obfuscation implenentation. PowerpC version. - Copyright (C) 2005-2024 Free Software Foundation, Inc. + Copyright (C) 2005-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S index 9255568..fca4423 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2024 Free Software Foundation, Inc. +/* Copyright (C) 2009-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h index 206d9fd..c371df8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h @@ -130,6 +130,7 @@ #define __NR_gettimeofday 78 #define __NR_getuid 24 #define __NR_getxattr 212 +#define __NR_getxattrat 464 #define __NR_gtty 32 #define __NR_idle 112 #define __NR_init_module 128 @@ -168,6 +169,7 @@ #define __NR_listen 329 #define __NR_listmount 458 #define __NR_listxattr 215 +#define __NR_listxattrat 465 #define __NR_llistxattr 216 #define __NR_lock 53 #define __NR_lookup_dcookie 235 @@ -233,6 +235,7 @@ #define __NR_open 5 #define __NR_open_by_handle_at 346 #define __NR_open_tree 428 +#define __NR_open_tree_attr 467 #define __NR_openat 286 #define __NR_openat2 437 #define __NR_pause 29 @@ -288,6 +291,7 @@ #define __NR_recvmsg 342 #define __NR_remap_file_pages 239 #define __NR_removexattr 218 +#define __NR_removexattrat 466 #define __NR_rename 38 #define __NR_renameat 293 #define __NR_renameat2 357 @@ -353,6 +357,7 @@ #define __NR_settimeofday 79 #define __NR_setuid 23 #define __NR_setxattr 209 +#define __NR_setxattrat 463 #define __NR_sgetmask 68 #define __NR_shmat 397 #define __NR_shmctl 396 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S index ddd0f46..20b8f8b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S @@ -1,5 +1,5 @@ /* Wrapper around clone system call. - Copyright (C) 1997-2024 Free Software Foundation, Inc. + Copyright (C) 1997-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c index 7137e06..1a70df5 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c @@ -1,5 +1,5 @@ /* Procedure definition for FE_MASK_ENV for Linux/ppc. - Copyright (C) 2007-2024 Free Software Foundation, Inc. + Copyright (C) 2007-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c index 6f96a17..08dfcae 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c @@ -1,5 +1,5 @@ /* Procedure definition for FE_NOMASK_ENV for Linux/ppc. - Copyright (C) 2000-2024 Free Software Foundation, Inc. + Copyright (C) 2000-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 9714305..883e66f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -3138,6 +3138,25 @@ GLIBC_2.4 wcstold F GLIBC_2.4 wcstold_l F GLIBC_2.4 wprintf F GLIBC_2.4 wscanf F +GLIBC_2.41 sched_getattr F +GLIBC_2.41 sched_setattr F +GLIBC_2.42 __inet_ntop_chk F +GLIBC_2.42 __inet_pton_chk F +GLIBC_2.42 cfgetibaud F +GLIBC_2.42 cfgetispeed F +GLIBC_2.42 cfgetobaud F +GLIBC_2.42 cfgetospeed F +GLIBC_2.42 cfsetbaud F +GLIBC_2.42 cfsetibaud F +GLIBC_2.42 cfsetispeed F +GLIBC_2.42 cfsetobaud F +GLIBC_2.42 cfsetospeed F +GLIBC_2.42 cfsetspeed F +GLIBC_2.42 pthread_gettid_np F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist index cbadcef..7f584d3 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist @@ -1025,3 +1025,75 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acospi F +GLIBC_2.41 acospif F +GLIBC_2.41 acospif32 F +GLIBC_2.41 acospif32x F +GLIBC_2.41 acospif64 F +GLIBC_2.41 acospil F +GLIBC_2.41 asinpi F +GLIBC_2.41 asinpif F +GLIBC_2.41 asinpif32 F +GLIBC_2.41 asinpif32x F +GLIBC_2.41 asinpif64 F +GLIBC_2.41 asinpil F +GLIBC_2.41 atan2pi F +GLIBC_2.41 atan2pif F +GLIBC_2.41 atan2pif32 F +GLIBC_2.41 atan2pif32x F +GLIBC_2.41 atan2pif64 F +GLIBC_2.41 atan2pil F +GLIBC_2.41 atanpi F +GLIBC_2.41 atanpif F +GLIBC_2.41 atanpif32 F +GLIBC_2.41 atanpif32x F +GLIBC_2.41 atanpif64 F +GLIBC_2.41 atanpil F +GLIBC_2.41 cospi F +GLIBC_2.41 cospif F +GLIBC_2.41 cospif32 F +GLIBC_2.41 cospif32x F +GLIBC_2.41 cospif64 F +GLIBC_2.41 cospil F +GLIBC_2.41 sinpi F +GLIBC_2.41 sinpif F +GLIBC_2.41 sinpif32 F +GLIBC_2.41 sinpif32x F +GLIBC_2.41 sinpif64 F +GLIBC_2.41 sinpil F +GLIBC_2.41 tanpi F +GLIBC_2.41 tanpif F +GLIBC_2.41 tanpif32 F +GLIBC_2.41 tanpif32x F +GLIBC_2.41 tanpif64 F +GLIBC_2.41 tanpil F +GLIBC_2.42 compoundn F +GLIBC_2.42 compoundnf F +GLIBC_2.42 compoundnf32 F +GLIBC_2.42 compoundnf32x F +GLIBC_2.42 compoundnf64 F +GLIBC_2.42 compoundnl F +GLIBC_2.42 pown F +GLIBC_2.42 pownf F +GLIBC_2.42 pownf32 F +GLIBC_2.42 pownf32x F +GLIBC_2.42 pownf64 F +GLIBC_2.42 pownl F +GLIBC_2.42 powr F +GLIBC_2.42 powrf F +GLIBC_2.42 powrf32 F +GLIBC_2.42 powrf32x F +GLIBC_2.42 powrf64 F +GLIBC_2.42 powrl F +GLIBC_2.42 rootn F +GLIBC_2.42 rootnf F +GLIBC_2.42 rootnf32 F +GLIBC_2.42 rootnf32x F +GLIBC_2.42 rootnf64 F +GLIBC_2.42 rootnl F +GLIBC_2.42 rsqrt F +GLIBC_2.42 rsqrtf F +GLIBC_2.42 rsqrtf32 F +GLIBC_2.42 rsqrtf32x F +GLIBC_2.42 rsqrtf64 F +GLIBC_2.42 rsqrtl F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S index 34e6d07..8482e47 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S @@ -1,5 +1,5 @@ /* Save current context, powerpc32 common. - Copyright (C) 2005-2024 Free Software Foundation, Inc. + Copyright (C) 2005-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S index 06cf8b2..27befc7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S @@ -1,5 +1,5 @@ /* Save current context. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h index 6e2a5c2..40b5163 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h @@ -1,5 +1,5 @@ /* Definition of `struct stat' used in the kernel. - Copyright (C) 1997-2024 Free Software Foundation, Inc. + Copyright (C) 1997-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S index 1f6d0a1..2ab64b5 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S @@ -1,5 +1,5 @@ /* Set up a context to call a function. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S index 8ee39fe..c64f9dc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S @@ -1,5 +1,5 @@ /* Save current context. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index 0beb52c..84cd9e0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -3183,6 +3183,25 @@ GLIBC_2.4 wcstold F GLIBC_2.4 wcstold_l F GLIBC_2.4 wprintf F GLIBC_2.4 wscanf F +GLIBC_2.41 sched_getattr F +GLIBC_2.41 sched_setattr F +GLIBC_2.42 __inet_ntop_chk F +GLIBC_2.42 __inet_pton_chk F +GLIBC_2.42 cfgetibaud F +GLIBC_2.42 cfgetispeed F +GLIBC_2.42 cfgetobaud F +GLIBC_2.42 cfgetospeed F +GLIBC_2.42 cfsetbaud F +GLIBC_2.42 cfsetibaud F +GLIBC_2.42 cfsetispeed F +GLIBC_2.42 cfsetobaud F +GLIBC_2.42 cfsetospeed F +GLIBC_2.42 cfsetspeed F +GLIBC_2.42 pthread_gettid_np F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist index d0078a4..d1cd4b1 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist @@ -1024,3 +1024,75 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acospi F +GLIBC_2.41 acospif F +GLIBC_2.41 acospif32 F +GLIBC_2.41 acospif32x F +GLIBC_2.41 acospif64 F +GLIBC_2.41 acospil F +GLIBC_2.41 asinpi F +GLIBC_2.41 asinpif F +GLIBC_2.41 asinpif32 F +GLIBC_2.41 asinpif32x F +GLIBC_2.41 asinpif64 F +GLIBC_2.41 asinpil F +GLIBC_2.41 atan2pi F +GLIBC_2.41 atan2pif F +GLIBC_2.41 atan2pif32 F +GLIBC_2.41 atan2pif32x F +GLIBC_2.41 atan2pif64 F +GLIBC_2.41 atan2pil F +GLIBC_2.41 atanpi F +GLIBC_2.41 atanpif F +GLIBC_2.41 atanpif32 F +GLIBC_2.41 atanpif32x F +GLIBC_2.41 atanpif64 F +GLIBC_2.41 atanpil F +GLIBC_2.41 cospi F +GLIBC_2.41 cospif F +GLIBC_2.41 cospif32 F +GLIBC_2.41 cospif32x F +GLIBC_2.41 cospif64 F +GLIBC_2.41 cospil F +GLIBC_2.41 sinpi F +GLIBC_2.41 sinpif F +GLIBC_2.41 sinpif32 F +GLIBC_2.41 sinpif32x F +GLIBC_2.41 sinpif64 F +GLIBC_2.41 sinpil F +GLIBC_2.41 tanpi F +GLIBC_2.41 tanpif F +GLIBC_2.41 tanpif32 F +GLIBC_2.41 tanpif32x F +GLIBC_2.41 tanpif64 F +GLIBC_2.41 tanpil F +GLIBC_2.42 compoundn F +GLIBC_2.42 compoundnf F +GLIBC_2.42 compoundnf32 F +GLIBC_2.42 compoundnf32x F +GLIBC_2.42 compoundnf64 F +GLIBC_2.42 compoundnl F +GLIBC_2.42 pown F +GLIBC_2.42 pownf F +GLIBC_2.42 pownf32 F +GLIBC_2.42 pownf32x F +GLIBC_2.42 pownf64 F +GLIBC_2.42 pownl F +GLIBC_2.42 powr F +GLIBC_2.42 powrf F +GLIBC_2.42 powrf32 F +GLIBC_2.42 powrf32x F +GLIBC_2.42 powrf64 F +GLIBC_2.42 powrl F +GLIBC_2.42 rootn F +GLIBC_2.42 rootnf F +GLIBC_2.42 rootnf32 F +GLIBC_2.42 rootnf32x F +GLIBC_2.42 rootnf64 F +GLIBC_2.42 rootnl F +GLIBC_2.42 rsqrt F +GLIBC_2.42 rsqrtf F +GLIBC_2.42 rsqrtf32 F +GLIBC_2.42 rsqrtf32x F +GLIBC_2.42 rsqrtf64 F +GLIBC_2.42 rsqrtl F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S index 09f3c65..e4d161e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S @@ -1,5 +1,5 @@ /* Jump to a new context. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S index 53e4c4f..053e939 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S @@ -1,5 +1,5 @@ /* Save current context and jump to a new context. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S index 7ec73cc..3c78d26 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S @@ -1,5 +1,5 @@ /* Jump to a new context powerpc32 common. - Copyright (C) 2005-2024 Free Software Foundation, Inc. + Copyright (C) 2005-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S index 6457871..98241ff 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S @@ -1,5 +1,5 @@ /* Jump to a new context. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S index 5a397d7..2afd519 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S @@ -1,5 +1,5 @@ /* Save current context and jump to a new context. - Copyright (C) 2005-2024 Free Software Foundation, Inc. + Copyright (C) 2005-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S index 96e4b6f..91efdfc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S @@ -1,5 +1,5 @@ /* Save current context and jump to a new context. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S index 04ebc31..0461a3f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2024 Free Software Foundation, Inc. +/* Copyright (C) 2003-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S index 71b381d..5ada298 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2024 Free Software Foundation, Inc. +/* Copyright (C) 2009-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-pkey.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-pkey.h index 4fe77a3..1f66411 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-pkey.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-pkey.h @@ -1,5 +1,5 @@ /* Helper functions for manipulating memory protection keys, for powerpc64. - Copyright (C) 2017-2024 Free Software Foundation, Inc. + Copyright (C) 2017-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h index 19f72a7..df8844d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h @@ -119,6 +119,7 @@ #define __NR_gettimeofday 78 #define __NR_getuid 24 #define __NR_getxattr 212 +#define __NR_getxattrat 464 #define __NR_gtty 32 #define __NR_idle 112 #define __NR_init_module 128 @@ -156,6 +157,7 @@ #define __NR_listen 329 #define __NR_listmount 458 #define __NR_listxattr 215 +#define __NR_listxattrat 465 #define __NR_llistxattr 216 #define __NR_lock 53 #define __NR_lookup_dcookie 235 @@ -218,6 +220,7 @@ #define __NR_open 5 #define __NR_open_by_handle_at 346 #define __NR_open_tree 428 +#define __NR_open_tree_attr 467 #define __NR_openat 286 #define __NR_openat2 437 #define __NR_pause 29 @@ -270,6 +273,7 @@ #define __NR_recvmsg 342 #define __NR_remap_file_pages 239 #define __NR_removexattr 218 +#define __NR_removexattrat 466 #define __NR_rename 38 #define __NR_renameat 293 #define __NR_renameat2 357 @@ -332,6 +336,7 @@ #define __NR_settimeofday 79 #define __NR_setuid 23 #define __NR_setxattr 209 +#define __NR_setxattrat 463 #define __NR_sgetmask 68 #define __NR_shmat 397 #define __NR_shmctl 396 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist index cfc2ebd..8832568 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist @@ -2892,6 +2892,25 @@ GLIBC_2.4 wcstold F GLIBC_2.4 wcstold_l F GLIBC_2.4 wprintf F GLIBC_2.4 wscanf F +GLIBC_2.41 sched_getattr F +GLIBC_2.41 sched_setattr F +GLIBC_2.42 __inet_ntop_chk F +GLIBC_2.42 __inet_pton_chk F +GLIBC_2.42 cfgetibaud F +GLIBC_2.42 cfgetispeed F +GLIBC_2.42 cfgetobaud F +GLIBC_2.42 cfgetospeed F +GLIBC_2.42 cfsetbaud F +GLIBC_2.42 cfsetibaud F +GLIBC_2.42 cfsetispeed F +GLIBC_2.42 cfsetobaud F +GLIBC_2.42 cfsetospeed F +GLIBC_2.42 cfsetspeed F +GLIBC_2.42 pthread_gettid_np F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist index 86fdb9f..bfc5310 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist @@ -1018,3 +1018,75 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acospi F +GLIBC_2.41 acospif F +GLIBC_2.41 acospif32 F +GLIBC_2.41 acospif32x F +GLIBC_2.41 acospif64 F +GLIBC_2.41 acospil F +GLIBC_2.41 asinpi F +GLIBC_2.41 asinpif F +GLIBC_2.41 asinpif32 F +GLIBC_2.41 asinpif32x F +GLIBC_2.41 asinpif64 F +GLIBC_2.41 asinpil F +GLIBC_2.41 atan2pi F +GLIBC_2.41 atan2pif F +GLIBC_2.41 atan2pif32 F +GLIBC_2.41 atan2pif32x F +GLIBC_2.41 atan2pif64 F +GLIBC_2.41 atan2pil F +GLIBC_2.41 atanpi F +GLIBC_2.41 atanpif F +GLIBC_2.41 atanpif32 F +GLIBC_2.41 atanpif32x F +GLIBC_2.41 atanpif64 F +GLIBC_2.41 atanpil F +GLIBC_2.41 cospi F +GLIBC_2.41 cospif F +GLIBC_2.41 cospif32 F +GLIBC_2.41 cospif32x F +GLIBC_2.41 cospif64 F +GLIBC_2.41 cospil F +GLIBC_2.41 sinpi F +GLIBC_2.41 sinpif F +GLIBC_2.41 sinpif32 F +GLIBC_2.41 sinpif32x F +GLIBC_2.41 sinpif64 F +GLIBC_2.41 sinpil F +GLIBC_2.41 tanpi F +GLIBC_2.41 tanpif F +GLIBC_2.41 tanpif32 F +GLIBC_2.41 tanpif32x F +GLIBC_2.41 tanpif64 F +GLIBC_2.41 tanpil F +GLIBC_2.42 compoundn F +GLIBC_2.42 compoundnf F +GLIBC_2.42 compoundnf32 F +GLIBC_2.42 compoundnf32x F +GLIBC_2.42 compoundnf64 F +GLIBC_2.42 compoundnl F +GLIBC_2.42 pown F +GLIBC_2.42 pownf F +GLIBC_2.42 pownf32 F +GLIBC_2.42 pownf32x F +GLIBC_2.42 pownf64 F +GLIBC_2.42 pownl F +GLIBC_2.42 powr F +GLIBC_2.42 powrf F +GLIBC_2.42 powrf32 F +GLIBC_2.42 powrf32x F +GLIBC_2.42 powrf64 F +GLIBC_2.42 powrl F +GLIBC_2.42 rootn F +GLIBC_2.42 rootnf F +GLIBC_2.42 rootnf32 F +GLIBC_2.42 rootnf32x F +GLIBC_2.42 rootnf64 F +GLIBC_2.42 rootnl F +GLIBC_2.42 rsqrt F +GLIBC_2.42 rsqrtf F +GLIBC_2.42 rsqrtf32 F +GLIBC_2.42 rsqrtf32x F +GLIBC_2.42 rsqrtf64 F +GLIBC_2.42 rsqrtl F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S index 164311d..878c807 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S @@ -1,5 +1,5 @@ /* Wrapper around clone system call. PowerPC64 version. - Copyright (C) 1997-2024 Free Software Foundation, Inc. + Copyright (C) 1997-2025 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 @@ -56,7 +56,6 @@ ENTRY (__clone) /* Save fn, args, stack across syscall. */ mr r30,r3 /* Function in r30. */ - mr r29,r5 /* Flags in r29. */ mr r31,r6 /* Argument in r31. */ /* 'flags' argument is first parameter to clone syscall. @@ -77,14 +76,12 @@ ENTRY (__clone) CHECK_SCV_SUPPORT r28 0f /* This is equivalent to DO_CALL_SCV, but we cannot use the macro here because it uses CFI directives and we just called cfi_endproc. */ - mflr r9 - std r9,FRAME_LR_SAVE(r1) + mflr r29 .machine "push" .machine "power9" scv 0 .machine "pop" - ld r9,FRAME_LR_SAVE(r1) - mtlr r9 + mtlr r29 /* Check for child process. */ /* When using scv, error is indicated by negative r3. */ diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone3.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone3.S index 900c354..332f3d9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone3.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone3.S @@ -1,5 +1,5 @@ /* The clone3 syscall wrapper. Linux/powerpc64 version. - Copyright (C) 2023-2024 Free Software Foundation, Inc. + Copyright (C) 2023-2025 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -39,14 +39,12 @@ because it uses CFI directives and we just called cfi_endproc. */ # define DO_CLONE3_SVC_CALL(jumpfalse) \ CHECK_SCV_SUPPORT r28 jumpfalse; \ - mflr r9; \ - std r9, FRAME_LR_SAVE(r1); \ + mflr r31; \ .machine "push"; \ .machine "power9"; \ scv 0; \ .machine "pop"; \ - ld r9, FRAME_LR_SAVE(r1); \ - mtlr r9; \ + mtlr r31; \ /* With scv an, an error is a value -4095 <= x < 0. */ \ cmpdi cr1, r3, 0; \ b 1f; @@ -66,13 +64,15 @@ ENTRY(__clone3) /* Save some regs in the "red zone". */ #ifdef USE_PPC_SCV - std r28, -24(r1) - cfi_offset (r28, -24) + std r28, -32(r1) + cfi_offset (r28, -32) #endif - std r29, -16(r1) - std r30, -8(r1) - cfi_offset (r29, -16) - cfi_offset (r30, -8) + std r29, -24(r1) + std r30, -16(r1) + std r31, -8(r1) + cfi_offset (r29, -24) + cfi_offset (r30, -16) + cfi_offset (r31, -8) /* Save func and arg across syscall. */ mr r30, r5 /* Function in r30. */ @@ -132,16 +132,19 @@ L(parent): /* Parent. Restore registers & return. */ #ifdef USE_PPC_SCV - cfi_offset (r28, -24) - ld r28, -24(r1) + cfi_offset (r28, -32) + ld r28, -32(r1) cfi_restore (r28) #endif - cfi_offset (r29,-16) - cfi_offset (r30,-8) - ld r29, -16(r1) - ld r30, -8(r1) + cfi_offset (r29,-24) + cfi_offset (r30,-16) + cfi_offset (r31,-8) + ld r29, -24(r1) + ld r30, -16(r1) + ld r31, -8(r1) cfi_restore (r29) cfi_restore (r30) + cfi_restore (r31) #ifdef USE_PPC_SCV beq cr1, 0f diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h index a72f8ce..1b8ae1b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h @@ -1,5 +1,5 @@ /* Support for reading /etc/ld.so.cache files written by Linux ldconfig. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c index d8b938d..8714aea 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c @@ -1,5 +1,5 @@ /* Procedure definition for FE_MASK_ENV for Linux/ppc64. - Copyright (C) 2007-2024 Free Software Foundation, Inc. + Copyright (C) 2007-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c index 50e5704..4cf946d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c @@ -1,5 +1,5 @@ /* Procedure definition for FE_NOMASK_ENV for Linux/ppc64. - Copyright (C) 2003-2024 Free Software Foundation, Inc. + Copyright (C) 2003-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S index 96d6005..9d8f021 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S @@ -1,5 +1,5 @@ /* Save current context. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 @@ -32,6 +32,9 @@ ENTRY(__novec_getcontext) std r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3) std r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3) mflr r0 +#ifdef __ROP_PROTECT__ + hashst r0,FRAME_ROP_SAVE(r1) +#endif std r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r3) std r0,FRAME_LR_SAVE(r1) cfi_offset (lr, FRAME_LR_SAVE) @@ -139,6 +142,9 @@ ENTRY(__novec_getcontext) ld r0,128+FRAME_LR_SAVE(r1) addi r1,r1,128 mtlr r0 +#ifdef __ROP_PROTECT__ + hashchk r0,FRAME_ROP_SAVE(r1) +#endif blr PSEUDO_END(__novec_getcontext) @@ -161,6 +167,9 @@ ENTRY(__getcontext) std r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3) std r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3) mflr r0 +#ifdef __ROP_PROTECT__ + hashst r0,FRAME_ROP_SAVE(r1) +#endif std r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r3) std r0,FRAME_LR_SAVE(r1) cfi_offset (lr, FRAME_LR_SAVE) @@ -377,6 +386,9 @@ L(has_no_vec): ld r0,128+FRAME_LR_SAVE(r1) addi r1,r1,128 mtlr r0 +#ifdef __ROP_PROTECT__ + hashchk r0,FRAME_ROP_SAVE(r1) +#endif blr PSEUDO_END(__getcontext) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h index 5a4bc7f..f34e798 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 2005-2024 Free Software Foundation, Inc. + Copyright (C) 2005-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist index 8c9efc5..b6ff801 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist @@ -2968,3 +2968,22 @@ GLIBC_2.39 stdc_trailing_zeros_ui F GLIBC_2.39 stdc_trailing_zeros_ul F GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F +GLIBC_2.41 sched_getattr F +GLIBC_2.41 sched_setattr F +GLIBC_2.42 __inet_ntop_chk F +GLIBC_2.42 __inet_pton_chk F +GLIBC_2.42 cfgetibaud F +GLIBC_2.42 cfgetispeed F +GLIBC_2.42 cfgetobaud F +GLIBC_2.42 cfgetospeed F +GLIBC_2.42 cfsetbaud F +GLIBC_2.42 cfsetibaud F +GLIBC_2.42 cfsetispeed F +GLIBC_2.42 cfsetobaud F +GLIBC_2.42 cfsetospeed F +GLIBC_2.42 cfsetspeed F +GLIBC_2.42 pthread_gettid_np F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist index 34568bd..dedfefc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist @@ -1366,3 +1366,111 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 __acospiieee128 F +GLIBC_2.41 __asinpiieee128 F +GLIBC_2.41 __atan2piieee128 F +GLIBC_2.41 __atanpiieee128 F +GLIBC_2.41 __cospiieee128 F +GLIBC_2.41 __sinpiieee128 F +GLIBC_2.41 __tanpiieee128 F +GLIBC_2.41 acospi F +GLIBC_2.41 acospif F +GLIBC_2.41 acospif128 F +GLIBC_2.41 acospif32 F +GLIBC_2.41 acospif32x F +GLIBC_2.41 acospif64 F +GLIBC_2.41 acospif64x F +GLIBC_2.41 acospil F +GLIBC_2.41 asinpi F +GLIBC_2.41 asinpif F +GLIBC_2.41 asinpif128 F +GLIBC_2.41 asinpif32 F +GLIBC_2.41 asinpif32x F +GLIBC_2.41 asinpif64 F +GLIBC_2.41 asinpif64x F +GLIBC_2.41 asinpil F +GLIBC_2.41 atan2pi F +GLIBC_2.41 atan2pif F +GLIBC_2.41 atan2pif128 F +GLIBC_2.41 atan2pif32 F +GLIBC_2.41 atan2pif32x F +GLIBC_2.41 atan2pif64 F +GLIBC_2.41 atan2pif64x F +GLIBC_2.41 atan2pil F +GLIBC_2.41 atanpi F +GLIBC_2.41 atanpif F +GLIBC_2.41 atanpif128 F +GLIBC_2.41 atanpif32 F +GLIBC_2.41 atanpif32x F +GLIBC_2.41 atanpif64 F +GLIBC_2.41 atanpif64x F +GLIBC_2.41 atanpil F +GLIBC_2.41 cospi F +GLIBC_2.41 cospif F +GLIBC_2.41 cospif128 F +GLIBC_2.41 cospif32 F +GLIBC_2.41 cospif32x F +GLIBC_2.41 cospif64 F +GLIBC_2.41 cospif64x F +GLIBC_2.41 cospil F +GLIBC_2.41 sinpi F +GLIBC_2.41 sinpif F +GLIBC_2.41 sinpif128 F +GLIBC_2.41 sinpif32 F +GLIBC_2.41 sinpif32x F +GLIBC_2.41 sinpif64 F +GLIBC_2.41 sinpif64x F +GLIBC_2.41 sinpil F +GLIBC_2.41 tanpi F +GLIBC_2.41 tanpif F +GLIBC_2.41 tanpif128 F +GLIBC_2.41 tanpif32 F +GLIBC_2.41 tanpif32x F +GLIBC_2.41 tanpif64 F +GLIBC_2.41 tanpif64x F +GLIBC_2.41 tanpil F +GLIBC_2.42 __compoundnieee128 F +GLIBC_2.42 __pownieee128 F +GLIBC_2.42 __powrieee128 F +GLIBC_2.42 __rootnieee128 F +GLIBC_2.42 __rsqrtieee128 F +GLIBC_2.42 compoundn F +GLIBC_2.42 compoundnf F +GLIBC_2.42 compoundnf128 F +GLIBC_2.42 compoundnf32 F +GLIBC_2.42 compoundnf32x F +GLIBC_2.42 compoundnf64 F +GLIBC_2.42 compoundnf64x F +GLIBC_2.42 compoundnl F +GLIBC_2.42 pown F +GLIBC_2.42 pownf F +GLIBC_2.42 pownf128 F +GLIBC_2.42 pownf32 F +GLIBC_2.42 pownf32x F +GLIBC_2.42 pownf64 F +GLIBC_2.42 pownf64x F +GLIBC_2.42 pownl F +GLIBC_2.42 powr F +GLIBC_2.42 powrf F +GLIBC_2.42 powrf128 F +GLIBC_2.42 powrf32 F +GLIBC_2.42 powrf32x F +GLIBC_2.42 powrf64 F +GLIBC_2.42 powrf64x F +GLIBC_2.42 powrl F +GLIBC_2.42 rootn F +GLIBC_2.42 rootnf F +GLIBC_2.42 rootnf128 F +GLIBC_2.42 rootnf32 F +GLIBC_2.42 rootnf32x F +GLIBC_2.42 rootnf64 F +GLIBC_2.42 rootnf64x F +GLIBC_2.42 rootnl F +GLIBC_2.42 rsqrt F +GLIBC_2.42 rsqrtf F +GLIBC_2.42 rsqrtf128 F +GLIBC_2.42 rsqrtf32 F +GLIBC_2.42 rsqrtf32x F +GLIBC_2.42 rsqrtf64 F +GLIBC_2.42 rsqrtf64x F +GLIBC_2.42 rsqrtl F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/sysctl.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/sysctl.c index d91b441..c4e2b75 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/sysctl.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/sysctl.c @@ -1,5 +1,5 @@ /* sysctl function stub. powerpc64le version. - Copyright (C) 2020-2024 Free Software Foundation, Inc. + Copyright (C) 2020-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S index 97ea557..7d0cede 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S @@ -1,5 +1,5 @@ /* Create new context. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 @@ -39,6 +39,9 @@ ENTRY (__makecontext) addi r6,r1,FRAME_PARM_SAVE+24 std r0,FRAME_LR_SAVE(r1) cfi_offset (lr, FRAME_LR_SAVE) +#ifdef __ROP_PROTECT__ + hashst r0,FRAME_ROP_SAVE(r1) +#endif stdu r1,-128(r1) cfi_adjust_cfa_offset (128) @@ -181,6 +184,9 @@ L(gotexitcodeaddr): ld r0,128+FRAME_LR_SAVE(r1) addi r1,r1,128 mtlr r0 +#ifdef __ROP_PROTECT__ + hashchk r0,FRAME_ROP_SAVE(r1) +#endif blr END(__makecontext) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pkey_get.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pkey_get.c index 217ecd0..cd4635a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pkey_get.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pkey_get.c @@ -1,5 +1,5 @@ /* Reading the per-thread memory protection key, powerpc64 version. - Copyright (C) 2017-2024 Free Software Foundation, Inc. + Copyright (C) 2017-2025 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,7 +21,7 @@ #include <sys/mman.h> int -pkey_get (int key) +__pkey_get (int key) { if (key < 0 || key > PKEY_MAX) { @@ -40,3 +40,5 @@ pkey_get (int key) return PKEY_DISABLE_WRITE; return 0; } +libc_hidden_def (__pkey_get) +weak_alias (__pkey_get, pkey_get) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pkey_set.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pkey_set.c index cc67b0a..371f827 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pkey_set.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pkey_set.c @@ -1,5 +1,5 @@ /* Changing the per-thread memory protection key, powerpc64 version. - Copyright (C) 2017-2024 Free Software Foundation, Inc. + Copyright (C) 2017-2025 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,7 +21,7 @@ #include <sys/mman.h> int -pkey_set (int key, unsigned int rights) +__pkey_set (int key, unsigned int rights) { if (key < 0 || key > PKEY_MAX || rights > 3) { @@ -46,3 +46,5 @@ pkey_set (int key, unsigned int rights) pkey_write (amr); return 0; } +libc_hidden_def (__pkey_set) +weak_alias (__pkey_set, pkey_set) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S index eb83d21..bd00f43 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S @@ -1,5 +1,5 @@ /* Switch to context. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 @@ -38,8 +38,11 @@ ENTRY(__novec_setcontext) CALL_MCOUNT 1 mflr r0 - std r31,-8(1) - cfi_offset(r31,-8) + std r31,-16(1) + cfi_offset(r31,-16) +#ifdef __ROP_PROTECT__ + hashst r0,FRAME_ROP_SAVE(r1) +#endif std r0,FRAME_LR_SAVE(r1) cfi_offset (lr, FRAME_LR_SAVE) stdu r1,-128(r1) @@ -184,7 +187,10 @@ L(nv_error_exit): ld r0,128+FRAME_LR_SAVE(r1) addi r1,r1,128 mtlr r0 - ld r31,-8(r1) +#ifdef __ROP_PROTECT__ + hashchk r0,FRAME_ROP_SAVE(r1) +#endif + ld r31,-16(r1) blr PSEUDO_END(__novec_setcontext) @@ -197,8 +203,11 @@ compat_symbol (libc, __novec_setcontext, setcontext, GLIBC_2_3) ENTRY(__setcontext) CALL_MCOUNT 1 mflr r0 - std r31,-8(1) - cfi_offset(r31,-8) + std r31,-16(1) + cfi_offset(r31,-16) +#ifdef __ROP_PROTECT__ + hashst r0,FRAME_ROP_SAVE(r1) +#endif std r0,FRAME_LR_SAVE(r1) cfi_offset (lr, FRAME_LR_SAVE) stdu r1,-128(r1) @@ -446,7 +455,10 @@ L(error_exit): ld r0,128+FRAME_LR_SAVE(r1) addi r1,r1,128 mtlr r0 - ld r31,-8(r1) +#ifdef __ROP_PROTECT__ + hashchk r0,FRAME_ROP_SAVE(r1) +#endif + ld r31,-16(r1) blr PSEUDO_END(__setcontext) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S index b7133f0..4d98b4c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S @@ -1,5 +1,5 @@ /* Save current context and install the given one. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 @@ -40,8 +40,11 @@ ENTRY(__novec_swapcontext) std r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3) std r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3) mflr r0 - std r31,-8(1) - cfi_offset(r31,-8) + std r31,-16(1) + cfi_offset(r31,-16) +#ifdef __ROP_PROTECT__ + hashst r0,FRAME_ROP_SAVE(r1) +#endif std r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r3) std r0,FRAME_LR_SAVE(r1) cfi_offset (lr, FRAME_LR_SAVE) @@ -271,7 +274,10 @@ L(nv_error_exit): ld r0,128+FRAME_LR_SAVE(r1) addi r1,r1,128 mtlr r0 - ld r31,-8(r1) +#ifdef __ROP_PROTECT__ + hashchk r0,FRAME_ROP_SAVE(r1) +#endif + ld r31,-16(r1) blr PSEUDO_END(__novec_swapcontext) @@ -287,8 +293,11 @@ ENTRY(__swapcontext) std r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3) std r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3) mflr r0 - std r31,-8(1) - cfi_offset(r31,-8) + std r31,-16(1) + cfi_offset(r31,-16) +#ifdef __ROP_PROTECT__ + hashst r0,FRAME_ROP_SAVE(r1) +#endif std r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r3) std r0,FRAME_LR_SAVE(r1) cfi_offset (lr, FRAME_LR_SAVE) @@ -731,7 +740,10 @@ L(error_exit): ld r0,128+FRAME_LR_SAVE(r1) addi r1,r1,128 mtlr r0 - ld r31,-8(r1) +#ifdef __ROP_PROTECT__ + hashchk r0,FRAME_ROP_SAVE(r1) +#endif + ld r31,-16(r1) blr PSEUDO_END(__swapcontext) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index 41c4e0a..4018c30 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2024 Free Software Foundation, Inc. +/* Copyright (C) 1992-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_t_was_int_compat.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_t_was_int_compat.h index 582aac7..5d25815 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_t_was_int_compat.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_t_was_int_compat.h @@ -1,5 +1,5 @@ /* timer_t/int compatibility transition. powerpc64 version. - Copyright (C) 2021-2024 Free Software Foundation, Inc. + Copyright (C) 2021-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S index 4fbbc2b..1018f3e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2024 Free Software Foundation, Inc. +/* Copyright (C) 2003-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/readelflib.c b/sysdeps/unix/sysv/linux/powerpc/readelflib.c index d2e0e88..2996d08 100644 --- a/sysdeps/unix/sysv/linux/powerpc/readelflib.c +++ b/sysdeps/unix/sysv/linux/powerpc/readelflib.c @@ -1,5 +1,5 @@ /* Special checks on libraries for ldconfig. Linux/PowerPC version. - Copyright (C) 2002-2024 Free Software Foundation, Inc. + Copyright (C) 2002-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/rtld_static_init.h b/sysdeps/unix/sysv/linux/powerpc/rtld_static_init.h index 5ec1f2b..551f5ea 100644 --- a/sysdeps/unix/sysv/linux/powerpc/rtld_static_init.h +++ b/sysdeps/unix/sysv/linux/powerpc/rtld_static_init.h @@ -1,5 +1,5 @@ /* Partial initialization of ld.so loaded via static dlopen. powerpc helper. - Copyright (C) 2021-2024 Free Software Foundation, Inc. + Copyright (C) 2021-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h b/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h index 860c2e3..a96d4d7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2024 Free Software Foundation, Inc. +/* Copyright (C) 1998-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/socket-constants-time64.h b/sysdeps/unix/sysv/linux/powerpc/socket-constants-time64.h index f8ab6ff..c76a426 100644 --- a/sysdeps/unix/sysv/linux/powerpc/socket-constants-time64.h +++ b/sysdeps/unix/sysv/linux/powerpc/socket-constants-time64.h @@ -1,5 +1,5 @@ /* Compat socket constants used in 64-bit compat code. - Copyright (C) 2021-2024 Free Software Foundation, Inc. + Copyright (C) 2021-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h index 605ba3f..860a857 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/PowerPC version. - Copyright (C) 2001-2024 Free Software Foundation, Inc. + Copyright (C) 2001-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h index 8fe3975..0807a29 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2024 Free Software Foundation, Inc. +/* Copyright (C) 1998-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/user.h b/sysdeps/unix/sysv/linux/powerpc/sys/user.h index 1b207a3..529110c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/user.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/user.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2024 Free Software Foundation, Inc. +/* Copyright (C) 1998-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/syscall.S b/sysdeps/unix/sysv/linux/powerpc/syscall.S index 9d0cb54..ff33dd4 100644 --- a/sysdeps/unix/sysv/linux/powerpc/syscall.S +++ b/sysdeps/unix/sysv/linux/powerpc/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2024 Free Software Foundation, Inc. +/* Copyright (C) 1991-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/syscall_cancel.S b/sysdeps/unix/sysv/linux/powerpc/syscall_cancel.S new file mode 100644 index 0000000..33b0b7c --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/syscall_cancel.S @@ -0,0 +1,86 @@ +/* Cancellable syscall wrapper. Linux/powerpc version. + Copyright (C) 2023-2025 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 <sysdep.h> +#include <descr-const.h> + +/* long int [r3] __syscall_cancel_arch (int *cancelhandling [r3], + long int nr [r4], + long int arg1 [r5], + long int arg2 [r6], + long int arg3 [r7], + long int arg4 [r8], + long int arg5 [r9], + long int arg6 [r10]) */ + +ENTRY (__syscall_cancel_arch) + + .globl __syscall_cancel_arch_start +__syscall_cancel_arch_start: + + /* if (*cancelhandling & CANCELED_BITMASK) + __syscall_do_cancel() */ + lwz r0,0(r3) + andi. r0,r0,TCB_CANCELED_BITMASK + bne 1f + + /* Issue a 6 argument syscall, the nr [r4] being the syscall + number. */ + mr r0,r4 + mr r3,r5 + mr r4,r6 + mr r5,r7 + mr r6,r8 + mr r7,r9 + mr r8,r10 + +#if defined(USE_PPC_SVC) && defined(__powerpc64__) + CHECK_SCV_SUPPORT r9 0f + + stdu r1, -SCV_FRAME_SIZE(r1) + cfi_adjust_cfa_offset (SCV_FRAME_SIZE) + .machine "push" + .machine "power9" + scv 0 + .machine "pop" + .globl __syscall_cancel_arch_end_svc +__syscall_cancel_arch_end_svc: + ld r9, SCV_FRAME_SIZE + FRAME_LR_SAVE(r1) + mtlr r9 + addi r1, r1, SCV_FRAME_SIZE + cfi_restore (lr) + li r9, -4095 + cmpld r3, r9 + bnslr+ + neg r3,r3 + blr +0: +#endif + sc + .globl __syscall_cancel_arch_end_sc +__syscall_cancel_arch_end_sc: + bnslr+ + neg r3,r3 + blr + + /* Although the __syscall_do_cancel do not return, we need to stack + being set correctly for unwind. */ +1: + TAIL_CALL_NO_RETURN (__syscall_do_cancel) + +END (__syscall_cancel_arch) diff --git a/sysdeps/unix/sysv/linux/powerpc/sysconf.c b/sysdeps/unix/sysv/linux/powerpc/sysconf.c index f769a21..7d2b00b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sysconf.c +++ b/sysdeps/unix/sysv/linux/powerpc/sysconf.c @@ -1,5 +1,5 @@ /* Get system-specific information at run-time. Linux/powerpc version. - Copyright (C) 2017-2024 Free Software Foundation, Inc. + Copyright (C) 2017-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/sysdep.c b/sysdeps/unix/sysv/linux/powerpc/sysdep.c index a7a55c0..21d48cff 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sysdep.c +++ b/sysdeps/unix/sysv/linux/powerpc/sysdep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2024 Free Software Foundation, Inc. +/* Copyright (C) 1997-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/sysdep.h index a69b7db..929784d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/sysdep.h @@ -1,5 +1,5 @@ /* Syscall definitions, Linux PowerPC generic version. - Copyright (C) 2019-2024 Free Software Foundation, Inc. + Copyright (C) 2019-2025 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 @@ -32,6 +32,18 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name +#define tostring(s) #s +#define stringify(s) tostring(s) + +#ifdef _ARCH_PWR4 +/* Power4 and later cpus introduced a faster instruction to copy one + CR field, rather than the slower microcoded mfcr which copies all + CR fields. */ +# define MFCR0(REG) "mfocrf " stringify(REG) ",0x80" +#else +# define MFCR0(REG) "mfcr " stringify(REG) +#endif + /* 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 normally. It will never touch errno. This returns just what the kernel @@ -52,7 +64,7 @@ __asm__ __volatile__ \ ("mtctr %0\n\t" \ "bctrl\n\t" \ - "mfcr %0\n\t" \ + MFCR0(%0) "\n\t" \ "0:" \ : "+r" (r0), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), \ "+r" (r7), "+r" (r8) \ @@ -83,11 +95,10 @@ "scv 0\n\t" \ ".machine \"pop\"\n\t" \ "0:" \ - : "=&r" (r0), \ - "=&r" (r3), "=&r" (r4), "=&r" (r5), \ - "=&r" (r6), "=&r" (r7), "=&r" (r8) \ - : ASM_INPUT_##nr \ - : "r9", "r10", "r11", "r12", \ + : "+r" (r0), \ + "+r" (r3), "+r" (r4), "+r" (r5), \ + "+r" (r6), "+r" (r7), "+r" (r8) \ + : : "r9", "r10", "r11", "r12", \ "cr0", "cr1", "cr5", "cr6", "cr7", \ "xer", "lr", "ctr", "memory"); \ r3; \ @@ -97,13 +108,12 @@ ({ \ __asm__ __volatile__ \ ("sc\n\t" \ - "mfcr %0\n\t" \ + MFCR0(%0) "\n\t" \ "0:" \ - : "=&r" (r0), \ - "=&r" (r3), "=&r" (r4), "=&r" (r5), \ - "=&r" (r6), "=&r" (r7), "=&r" (r8) \ - : ASM_INPUT_##nr \ - : "r9", "r10", "r11", "r12", \ + : "+r" (r0), \ + "+r" (r3), "+r" (r4), "+r" (r5), \ + "+r" (r6), "+r" (r7), "+r" (r8) \ + : : "r9", "r10", "r11", "r12", \ "xer", "cr0", "ctr", "memory"); \ r0 & (1 << 28) ? -r3 : r3; \ }) @@ -199,14 +209,6 @@ __illegally_sized_syscall_arg6 (); \ r8 = _arg6 -#define ASM_INPUT_0 "0" (r0) -#define ASM_INPUT_1 ASM_INPUT_0, "1" (r3) -#define ASM_INPUT_2 ASM_INPUT_1, "2" (r4) -#define ASM_INPUT_3 ASM_INPUT_2, "3" (r5) -#define ASM_INPUT_4 ASM_INPUT_3, "4" (r6) -#define ASM_INPUT_5 ASM_INPUT_4, "5" (r7) -#define ASM_INPUT_6 ASM_INPUT_5, "6" (r8) - /* List of system calls which are supported as vsyscalls. */ #define VDSO_NAME "LINUX_2.6.15" #define VDSO_HASH 123718565 @@ -223,5 +225,6 @@ #define HAVE_TIME_VSYSCALL "__kernel_time" #define HAVE_GETTIMEOFDAY_VSYSCALL "__kernel_gettimeofday" #define HAVE_GET_TBFREQ "__kernel_get_tbfreq" +#define HAVE_GETRANDOM_VSYSCALL "__kernel_getrandom" #endif /* _LINUX_POWERPC_SYSDEP_H */ diff --git a/sysdeps/unix/sysv/linux/powerpc/termios_arch.h b/sysdeps/unix/sysv/linux/powerpc/termios_arch.h new file mode 100644 index 0000000..20025f2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/termios_arch.h @@ -0,0 +1,26 @@ +/* Architectural parameters for Linux termios - Alpha/PowerPC version + + Copyright (C) 1997-2025 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 + <https://www.gnu.org/licenses/>. */ + +#ifndef TERMIOS_INTERNALS_H +# error "<termios_arch.h> should only be included from <termios_internals.h>" +#endif + +#define _TERMIOS2_NCCS 19 +#define _HAVE_TERMIOS2_C_CC_BEFORE_C_LINE 1 +#define _HAVE_STRUCT_OLD_TERMIOS 0 diff --git a/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq-static.c b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq-static.c index 455a244..4298cab 100644 --- a/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq-static.c +++ b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq-static.c @@ -1,5 +1,5 @@ /* Check __ppc_get_timebase_freq() for architecture changes - Copyright (C) 2019-2024 Free Software Foundation, Inc. + Copyright (C) 2019-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c index 6610ac1..a720c54 100644 --- a/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c +++ b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c @@ -1,5 +1,5 @@ /* Check __ppc_get_timebase_freq() for architecture changes - Copyright (C) 2012-2024 Free Software Foundation, Inc. + Copyright (C) 2012-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/test-powerpc-linux-sysconf.c b/sysdeps/unix/sysv/linux/powerpc/test-powerpc-linux-sysconf.c index 31d055f..2dd4770 100644 --- a/sysdeps/unix/sysv/linux/powerpc/test-powerpc-linux-sysconf.c +++ b/sysdeps/unix/sysv/linux/powerpc/test-powerpc-linux-sysconf.c @@ -1,5 +1,5 @@ /* Check use of sysconf() for cache geometries. - Copyright (C) 2017-2024 Free Software Foundation, Inc. + Copyright (C) 2017-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/time.c b/sysdeps/unix/sysv/linux/powerpc/time.c index 96ae60b..41c09c7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/time.c +++ b/sysdeps/unix/sysv/linux/powerpc/time.c @@ -1,5 +1,5 @@ /* time system call for Linux/PowerPC. - Copyright (C) 2013-2024 Free Software Foundation, Inc. + Copyright (C) 2013-2025 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 diff --git a/sysdeps/unix/sysv/linux/powerpc/tst-hwcap-tunables.c b/sysdeps/unix/sysv/linux/powerpc/tst-hwcap-tunables.c index f2fee35..2b0dc45 100644 --- a/sysdeps/unix/sysv/linux/powerpc/tst-hwcap-tunables.c +++ b/sysdeps/unix/sysv/linux/powerpc/tst-hwcap-tunables.c @@ -1,5 +1,5 @@ /* Tests for powerpc GLIBC_TUNABLES=glibc.cpu.hwcaps filter. - Copyright (C) 2023-2024 Free Software Foundation, Inc. + Copyright (C) 2023-2025 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 |