authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-01-31 14:30:19+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-01-31 14:38:21+01:00
log5702d67af60602bdfe955c4ccfa1b13238d36516
treea20349de2cbca64b891cacda84222fd2f83a92e8
parent2ba137b02be42285bdff53d85f19e82cb74802e7
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

glibc: Update source files to 2.41.


187 files changed, 611 insertions(+), 397 deletions(-)

lib/libc/glibc/LICENSES+26-38
......@@ -165,44 +165,8 @@ The file if_ppp.h is under the following CMU license:
165165 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
166166 IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
167167
168The following license covers the files from Intel's "Highly Optimized
169Mathematical Functions for Itanium" collection:
170
171Intel License Agreement
172
173Copyright (c) 2000, Intel Corporation
174
175All rights reserved.
176
177Redistribution and use in source and binary forms, with or without
178modification, are permitted provided that the following conditions are
179met:
180
181* Redistributions of source code must retain the above copyright
182notice, this list of conditions and the following disclaimer.
183
184* Redistributions in binary form must reproduce the above copyright
185notice, this list of conditions and the following disclaimer in the
186documentation and/or other materials provided with the distribution.
187
188* The name of Intel Corporation may not be used to endorse or promote
189products derived from this software without specific prior written
190permission.
191
192THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
193"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
194LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
195A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
196CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
197EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
198PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
199PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
200LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
201NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
202SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
203
204The files inet/getnameinfo.c and sysdeps/posix/getaddrinfo.c are copyright
205(C) by Craig Metz and are distributed under the following license:
168The files nss/getnameinfo.c and nss/getaddrinfo.c are copyright (C) by
169Craig Metz and are distributed under the following license:
206170
207171/* The Inner Net License, Version 2.00
208172
......@@ -410,3 +374,27 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
410374CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
411375TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
412376SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
377
378Various files in sysdeps/ieee754/flt-32, taken from the CORE-MATH project
379<https://core-math.gitlabpages.inria.fr/>, are distributed under the
380following license:
381
382Copyright (c) 2022-2024 Alexei Sibidanov. Paul Zimmermann.
383
384Permission is hereby granted, free of charge, to any person obtaining a copy
385of this software and associated documentation files (the "Software"), to deal
386in the Software without restriction, including without limitation the rights
387to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
388copies of the Software, and to permit persons to whom the Software is
389furnished to do so, subject to the following conditions:
390
391The above copyright notice and this permission notice shall be included in all
392copies or substantial portions of the Software.
393
394THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
395IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
396FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
397AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
398LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
399OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
400SOFTWARE.
lib/libc/glibc/bits/byteswap.h+1-1
......@@ -1,5 +1,5 @@
11/* Macros and inline functions to swap the order of bytes in integer values.
2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 Copyright (C) 1997-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/floatn-common.h+1-1
......@@ -1,6 +1,6 @@
11/* Macros to control TS 18661-3 glibc features where the same
22 definitions are appropriate for all platforms.
3 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 Copyright (C) 2017-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/libc-header-start.h+1-1
......@@ -1,5 +1,5 @@
11/* Handle feature test macros at the start of a header.
2 Copyright (C) 2016-2024 Free Software Foundation, Inc.
2 Copyright (C) 2016-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2024 Free Software Foundation, Inc.
2 Copyright (C) 2016-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/select.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/signum-generic.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal number constants. Generic template.
2 Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 Copyright (C) 1991-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/stat.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/stdint-intn.h+1-1
......@@ -1,5 +1,5 @@
11/* Define intN_t types.
2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
2 Copyright (C) 2017-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/stdlib-bsearch.h+10-12
......@@ -1,5 +1,5 @@
11/* Perform binary search - inline version.
2 Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 Copyright (C) 1991-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -20,22 +20,14 @@ __extern_inline void *
2020bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
2121 __compar_fn_t __compar)
2222{
23 size_t __l, __u, __idx;
2423 const void *__p;
2524 int __comparison;
2625
27 __l = 0;
28 __u = __nmemb;
29 while (__l < __u)
26 while (__nmemb)
3027 {
31 __idx = (__l + __u) / 2;
32 __p = (const void *) (((const char *) __base) + (__idx * __size));
28 __p = (const void *) (((const char *) __base) + ((__nmemb >> 1) * __size));
3329 __comparison = (*__compar) (__key, __p);
34 if (__comparison < 0)
35 __u = __idx;
36 else if (__comparison > 0)
37 __l = __idx + 1;
38 else
30 if (__comparison == 0)
3931 {
4032#if __GNUC_PREREQ(4, 6)
4133# pragma GCC diagnostic push
......@@ -46,6 +38,12 @@ bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
4638# pragma GCC diagnostic pop
4739#endif
4840 }
41 if (__comparison > 0)
42 {
43 __base = ((const char *) __p) + __size;
44 --__nmemb;
45 }
46 __nmemb >>= 1;
4947 }
5048
5149 return NULL;
lib/libc/glibc/bits/time64.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/time64.h -- underlying types for __time64_t. Generic version.
2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
2 Copyright (C) 2018-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/timesize.h+1-1
......@@ -1,5 +1,5 @@
11/* Bit size of the time_t type at glibc build time, general case.
2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
2 Copyright (C) 2018-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/types/struct_sched_param.h+1-1
......@@ -1,5 +1,5 @@
11/* Sched parameter structure. Generic version.
2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 Copyright (C) 1996-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/typesizes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Generic version.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/uintn-identity.h+1-1
......@@ -1,5 +1,5 @@
11/* Inline functions to return unsigned integer values unchanged.
2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
2 Copyright (C) 2017-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/waitflags.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions of flag bits for `waitpid' et al.
2 Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 Copyright (C) 1992-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/waitstatus.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions of status bits for `wait' et al.
2 Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 Copyright (C) 1992-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/csu/errno.c+1-1
......@@ -1,5 +1,5 @@
11/* Definition of `errno' variable. Canonical version.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/csu/init.c+1-1
......@@ -1,5 +1,5 @@
11/* Special startup support.
2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 Copyright (C) 1997-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/debug/stack_chk_fail_local.c+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/elf/elf.h+4-1
......@@ -1,5 +1,5 @@
11/* This file defines standard ELF types, structures, and macros.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
2 Copyright (C) 1995-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -797,6 +797,7 @@ typedef struct
797797#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
798798#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
799799#define NT_X86_SHSTK 0x204 /* x86 SHSTK state */
800#define NT_X86_XSAVE_LAYOUT 0x205 /* XSAVE layout description. */
800801#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */
801802#define NT_S390_TIMER 0x301 /* s390 timer register */
802803#define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */
......@@ -835,6 +836,7 @@ typedef struct
835836#define NT_ARM_ZA 0x40c /* ARM SME ZA registers. */
836837#define NT_ARM_ZT 0x40d /* ARM SME ZT registers. */
837838#define NT_ARM_FPMR 0x40e /* ARM floating point mode register. */
839#define NT_ARM_POE 0x40f /* ARM POE registers. */
838840#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
839841#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
840842#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
......@@ -1389,6 +1391,7 @@ typedef struct
13891391
13901392#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0)
13911393#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC (1U << 1)
1394#define GNU_PROPERTY_AARCH64_FEATURE_1_GCS (1U << 2)
13921395
13931396/* The x86 instruction sets indicated by the corresponding bits are
13941397 used in program. Their support in the hardware is optional. */
lib/libc/glibc/include/errno.h+1-1
......@@ -20,7 +20,7 @@
2020# define errno rtld_errno
2121extern int rtld_errno attribute_hidden;
2222
23# elif IS_IN_LIB && !IS_IN (rtld)
23# elif IS_IN_LIB && !IS_IN (rtld) && !defined LIBC_NONSHARED
2424
2525# undef errno
2626# if IS_IN (libc)
lib/libc/glibc/include/libc-misc.h created+67
......@@ -0,0 +1,67 @@
1/* Miscellaneous definitions for both glibc build and test.
2 Copyright (C) 2024-2025 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _INCLUDE_MISC_H
20#define _INCLUDE_MISC_H
21
22#include <config.h>
23
24/* Add the compiler optimization to inhibit loop transformation to library
25 calls. This is used to avoid recursive calls in memset and memmove
26 default implementations in tests. */
27#ifdef HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
28# define inhibit_loop_to_libcall \
29 __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
30#else
31# define inhibit_loop_to_libcall
32#endif
33
34#ifdef HAVE_TEST_CC_INHIBIT_LOOP_TO_LIBCALL
35# define test_cc_inhibit_loop_to_libcall \
36 __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
37#else
38# define test_cc_inhibit_loop_to_libcall
39#endif
40
41/* Used to disable stack protection in sensitive places, like ifunc
42 resolvers and early static TLS init. */
43#ifdef __clang__
44# define cc_inhibit_stack_protector \
45 __attribute__((no_stack_protector))
46#else
47# define cc_inhibit_stack_protector \
48 __attribute__ ((__optimize__ ("-fno-stack-protector")))
49#endif
50
51#if IS_IN (testsuite) || IS_IN (testsuite_internal)
52# ifdef HAVE_TEST_CC_NO_STACK_PROTECTOR
53# define test_inhibit_stack_protector cc_inhibit_stack_protector
54# define inhibit_stack_protector cc_inhibit_stack_protector
55# else
56# define test_inhibit_stack_protector
57# define inhibit_stack_protector
58# endif
59#else
60# ifdef HAVE_CC_NO_STACK_PROTECTOR
61# define inhibit_stack_protector cc_inhibit_stack_protector
62# else
63# define inhibit_stack_protector
64# endif
65#endif
66
67#endif
lib/libc/glibc/include/libc-pointer-arith.h+1-1
......@@ -1,5 +1,5 @@
11/* Helper macros for pointer arithmetic.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
2 Copyright (C) 2012-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/include/libc-symbols.h+3-22
......@@ -1,6 +1,6 @@
11/* Support macros for making weak and strong aliases for symbols,
22 and for using symbol sets and linker warnings with GNU ld.
3 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 Copyright (C) 1995-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -59,6 +59,8 @@
5959# define IN_MODULE (-1)
6060#endif
6161
62#include <libc-misc.h>
63
6264#ifndef _ISOMAC
6365
6466/* This is defined for the compilation of all C library code. features.h
......@@ -82,8 +84,6 @@
8284# error "glibc must not be compiled with -ffast-math"
8385#endif
8486
85#include <config.h>
86
8787/* Obtain the definition of symbol_version_reference. */
8888#include <libc-symver.h>
8989
......@@ -374,15 +374,6 @@ for linking")
374374#define attribute_relro __attribute__ ((section (".data.rel.ro")))
375375
376376
377/* Used to disable stack protection in sensitive places, like ifunc
378 resolvers and early static TLS init. */
379#ifdef HAVE_CC_NO_STACK_PROTECTOR
380# define inhibit_stack_protector \
381 __attribute__ ((__optimize__ ("-fno-stack-protector")))
382#else
383# define inhibit_stack_protector
384#endif
385
386377/* The following macros are used for PLT bypassing within libc.so
387378 (and if needed other libraries similarly).
388379 First of all, you need to have the function prototyped somewhere,
......@@ -816,16 +807,6 @@ for linking")
816807#define libm_ifunc_init()
817808#define libm_ifunc(name, expr) \
818809 __ifunc (name, name, expr, void, libm_ifunc_init)
819
820/* Add the compiler optimization to inhibit loop transformation to library
821 calls. This is used to avoid recursive calls in memset and memmove
822 default implementations. */
823#ifdef HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
824# define inhibit_loop_to_libcall \
825 __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
826#else
827# define inhibit_loop_to_libcall
828#endif
829810
830811/* These macros facilitate sharing source files with gnulib.
831812
lib/libc/glibc/include/stap-probe.h+1-1
......@@ -1,5 +1,5 @@
11/* Macros for defining Systemtap <sys/sdt.h> static probe points.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
2 Copyright (C) 2012-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/include/stdlib.h+7
......@@ -20,6 +20,7 @@
2020# include <sys/stat.h>
2121
2222# include <rtld-malloc.h>
23# include <internal-sigset.h>
2324
2425extern __typeof (strtol_l) __strtol_l;
2526extern __typeof (strtoul_l) __strtoul_l;
......@@ -77,6 +78,12 @@ libc_hidden_proto (__isoc23_strtoull_l)
7778# define strtoull_l __isoc23_strtoull_l
7879#endif
7980
81extern void __abort_fork_reset_child (void) attribute_hidden;
82extern void __abort_lock_rdlock (internal_sigset_t *set) attribute_hidden;
83extern void __abort_lock_wrlock (internal_sigset_t *set) attribute_hidden;
84extern void __abort_lock_unlock (const internal_sigset_t *set)
85 attribute_hidden;
86
8087libc_hidden_proto (exit)
8188libc_hidden_proto (abort)
8289libc_hidden_proto (getenv)
lib/libc/glibc/include/sys/cdefs.h+7
......@@ -56,4 +56,11 @@ rtld_hidden_proto (__chk_fail)
5656
5757#endif /* !defined _ISOMAC */
5858
59/* Prevents a function from being considered for inlining and cloning. */
60#ifdef __clang__
61# define __attribute_optimization_barrier__ __attribute__ ((optnone))
62#else
63# define __attribute_optimization_barrier__ __attribute__ ((noinline, noclone))
64#endif
65
5966#endif
lib/libc/glibc/io/bits/statx.h+1-1
......@@ -1,5 +1,5 @@
11/* statx-related definitions and declarations. Generic version.
2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
2 Copyright (C) 2018-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/io/fcntl.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/io/mknod.c+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/io/sys/stat.h+9-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -26,7 +26,7 @@
2626
2727#include <bits/types.h> /* For __mode_t and __dev_t. */
2828
29#ifdef __USE_XOPEN2K8
29#if defined(__USE_ATFILE) || defined(__USE_XOPEN2K8)
3030# include <bits/types/struct_timespec.h>
3131#endif
3232
......@@ -263,14 +263,14 @@ extern int __REDIRECT_NTH (fstat64, (int __fd, struct stat64 *__buf),
263263# ifndef __USE_FILE_OFFSET64
264264extern int fstatat (int __fd, const char *__restrict __file,
265265 struct stat *__restrict __buf, int __flag)
266 __THROW __nonnull ((2, 3));
266 __THROW __nonnull ((3));
267267# else
268268# ifdef __USE_TIME64_REDIRECTS
269269# ifdef __REDIRECT_NTH
270270extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
271271 struct stat *__restrict __buf,
272272 int __flag),
273 __fstatat64_time64) __nonnull ((2, 3));
273 __fstatat64_time64) __nonnull ((3));
274274# else
275275# define fstatat __fstatat64_time64
276276# endif
......@@ -279,7 +279,7 @@ extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
279279extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
280280 struct stat *__restrict __buf,
281281 int __flag),
282 fstatat64) __nonnull ((2, 3));
282 fstatat64) __nonnull ((3));
283283# else
284284# define fstatat fstatat64
285285# endif
......@@ -290,7 +290,7 @@ extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
290290# ifndef __USE_TIME64_REDIRECTS
291291extern int fstatat64 (int __fd, const char *__restrict __file,
292292 struct stat64 *__restrict __buf, int __flag)
293 __THROW __nonnull ((2, 3));
293 __THROW __nonnull ((3));
294294# else
295295# ifdef __REDIRECT_NTH
296296extern int __REDIRECT_NTH (fstatat64, (int __fd,
......@@ -298,7 +298,7 @@ extern int __REDIRECT_NTH (fstatat64, (int __fd,
298298 struct stat64 *__restrict __buf,
299299 int __flag),
300300 __fstatat64_time64)
301 __nonnull ((2, 3));
301 __nonnull ((3));
302302# else
303303# define fstatat64 __fstatat64_time64
304304# endif
......@@ -433,13 +433,13 @@ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
433433extern int utimensat (int __fd, const char *__path,
434434 const struct timespec __times[2],
435435 int __flags)
436 __THROW __nonnull ((2));
436 __THROW;
437437# else
438438# ifdef __REDIRECT_NTH
439439extern int __REDIRECT_NTH (utimensat, (int fd, const char *__path,
440440 const struct timespec __times[2],
441441 int flags),
442 __utimensat64) __nonnull ((2));
442 __utimensat64);
443443# else
444444# define utimensat __utimensat64
445445# endif
lib/libc/glibc/locale/bits/types/__locale_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of struct __locale_struct and __locale_t.
2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 Copyright (C) 1997-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/locale/bits/types/locale_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of locale_t.
2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
2 Copyright (C) 2017-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/misc/sys/cdefs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22 Copyright The GNU Toolchain Authors.
33 This file is part of the GNU C Library.
44
lib/libc/glibc/misc/sys/select.h+1-1
......@@ -1,5 +1,5 @@
11/* `fd_set' type and related macros, and `select'/`pselect' declarations.
2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 Copyright (C) 1996-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/posix/bits/cpu-set.h+1-1
......@@ -1,6 +1,6 @@
11/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
22 scheduling interface.
3 Copyright (C) 1996-2024 Free Software Foundation, Inc.
3 Copyright (C) 1996-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/posix/bits/types.h+2-1
......@@ -1,5 +1,5 @@
11/* bits/types.h -- definitions of __*_t types underlying *_t types.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -217,6 +217,7 @@ typedef int __sig_atomic_t;
217217/* Seconds since the Epoch, visible to user code when time_t is too
218218 narrow only for consistency with the old way of widening too-narrow
219219 types. User code should never use __time64_t. */
220/* Zig patch: Don't check __LIBC here because it breaks fstatat.c on x86. */
220221#if __TIMESIZE == 64
221222# define __time64_t __time_t
222223#elif __TIMESIZE != 64
lib/libc/glibc/posix/sys/types.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/signal/signal.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/stdlib/alloca.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/stdlib/bits/stdlib-float.h+1-1
......@@ -1,5 +1,5 @@
11/* Floating-point inline functions for stdlib.h.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
2 Copyright (C) 2012-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/stdlib/errno.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/stdlib/exit.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/stdlib/stdlib.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
22 Copyright The GNU Toolchain Authors.
33 This file is part of the GNU C Library.
44
......@@ -727,7 +727,7 @@ extern void *aligned_alloc (size_t __alignment, size_t __size)
727727#endif
728728
729729/* Abort execution and generate a core-dump. */
730extern void abort (void) __THROW __attribute__ ((__noreturn__));
730extern void abort (void) __THROW __attribute__ ((__noreturn__)) __COLD;
731731
732732
733733/* Register a function to be called when `exit' is called. */
lib/libc/glibc/string/bits/endian.h+1-1
......@@ -1,5 +1,5 @@
11/* Endian macros for string.h functions
2 Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 Copyright (C) 1992-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/string/endian.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/glibc/sysdeps/aarch64/start.S+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/glibc/sysdeps/aarch64/sysdep.h+11-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -74,10 +74,18 @@ strip_pac (void *p)
7474#define PACIASP hint 25
7575#define AUTIASP hint 29
7676
77/* Guarded Control Stack support. */
78#define CHKFEAT_X16 hint 40
79#define MRS_GCSPR(x) mrs x, s3_3_c2_c5_1
80#define GCSPOPM(x) sysl x, #3, c7, c7, #1
81#define GCSSS1(x) sys #3, c7, c7, #2, x
82#define GCSSS2(x) sysl x, #3, c7, c7, #3
83
7784/* GNU_PROPERTY_AARCH64_* macros from elf.h for use in asm code. */
7885#define FEATURE_1_AND 0xc0000000
7986#define FEATURE_1_BTI 1
8087#define FEATURE_1_PAC 2
88#define FEATURE_1_GCS 4
8189
8290/* Add a NT_GNU_PROPERTY_TYPE_0 note. */
8391#define GNU_PROPERTY(type, value) \
......@@ -96,9 +104,9 @@ strip_pac (void *p)
96104/* Add GNU property note with the supported features to all asm code
97105 where sysdep.h is included. */
98106#if HAVE_AARCH64_BTI && HAVE_AARCH64_PAC_RET
99GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_PAC)
107GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_PAC|FEATURE_1_GCS)
100108#elif HAVE_AARCH64_BTI
101GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI)
109GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_GCS)
102110#endif
103111
104112/* Define an entry point visible from C. */
lib/libc/glibc/sysdeps/arc/bits/endianness.h+2-6
......@@ -5,11 +5,7 @@
55# error "Never use <bits/endian.h> directly; include <endian.h> instead."
66#endif
77
8/* ARC has selectable endianness. */
9#ifdef __BIG_ENDIAN__
10# define __BYTE_ORDER __BIG_ENDIAN
11#else
12# define __BYTE_ORDER __LITTLE_ENDIAN
13#endif
8/* Only little-endian ARC is supported. */
9#define __BYTE_ORDER __LITTLE_ENDIAN
1410
1511#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/arc/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code for ARC.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/arc/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for ARC.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/arm/arm-features.h+1-1
......@@ -1,5 +1,5 @@
11/* Macros to test for CPU features on ARM. Generic ARM version.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
2 Copyright (C) 2012-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/arm/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code for ARM & ELF
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
2 Copyright (C) 1995-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/arm/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for ARM.
2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 Copyright (C) 1997-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/csky/abiv2/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF C-SKY ABIV2.
2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
2 Copyright (C) 2018-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/csky/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for C-SKY.
2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
2 Copyright (C) 2018-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/generic/dl-dtprocnum.h+1-1
......@@ -1,5 +1,5 @@
11/* Configuration of lookup functions.
2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
2 Copyright (C) 2000-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/generic/dl-sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. Generic version.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/generic/dwarf2.h+1-1
......@@ -1,6 +1,6 @@
11/* Declarations and definitions of codes relating to the DWARF2 symbolic
22 debugging information format.
3 Copyright (C) 1992-2024 Free Software Foundation, Inc.
3 Copyright (C) 1992-2025 Free Software Foundation, Inc.
44
55 This file is part of the GNU C Library.
66
lib/libc/glibc/sysdeps/generic/libc-lock.h+1-1
......@@ -1,5 +1,5 @@
11/* libc-internal interface for mutex locks. Stub version.
2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 Copyright (C) 1996-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/generic/libc-symver.h+1-1
......@@ -1,5 +1,5 @@
11/* Symbol version management.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
2 Copyright (C) 1995-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/generic/single-thread.h+1-1
......@@ -1,5 +1,5 @@
11/* Single thread optimization, generic version.
2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
2 Copyright (C) 2019-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/generic/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Generic asm macros used on many machines.
2 Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 Copyright (C) 1991-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/generic/tls.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for thread-local data handling. Generic version.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/htl/bits/pthread.h+1-1
......@@ -1,5 +1,5 @@
11/* Pthread data structures. Generic version.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/htl/bits/thread-shared-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Common threading primitives definitions for both POSIX and C11.
2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
2 Copyright (C) 2017-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/htl/libc-lockP.h+4-7
......@@ -1,5 +1,5 @@
11/* Private libc-internal interface for mutex locks.
2 Copyright (C) 2015-2024 Free Software Foundation, Inc.
2 Copyright (C) 2015-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -77,6 +77,7 @@ extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
7777 const pthread_mutexattr_t *__mutex_attr);
7878
7979extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
80libc_hidden_proto (__pthread_mutex_destroy)
8081
8182extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
8283
......@@ -85,8 +86,10 @@ extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
8586extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
8687
8788extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr);
89libc_hidden_proto (__pthread_mutexattr_init)
8890
8991extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr);
92libc_hidden_proto (__pthread_mutexattr_destroy)
9093
9194extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr,
9295 int __kind);
......@@ -113,8 +116,6 @@ extern int __pthread_atfork (void (*__prepare) (void),
113116 void (*__parent) (void),
114117 void (*__child) (void));
115118
116
117
118119/* Make the pthread functions weak so that we can elide them from
119120 single-threaded processes. */
120121#if !defined(__NO_WEAK_PTHREAD_ALIASES) && !IS_IN (libpthread)
......@@ -124,8 +125,6 @@ weak_extern (__pthread_mutex_destroy)
124125weak_extern (__pthread_mutex_lock)
125126weak_extern (__pthread_mutex_trylock)
126127weak_extern (__pthread_mutex_unlock)
127weak_extern (__pthread_mutexattr_init)
128weak_extern (__pthread_mutexattr_destroy)
129128weak_extern (__pthread_mutexattr_settype)
130129weak_extern (__pthread_rwlock_init)
131130weak_extern (__pthread_rwlock_destroy)
......@@ -147,8 +146,6 @@ weak_extern (__pthread_setcancelstate)
147146# pragma weak __pthread_mutex_lock
148147# pragma weak __pthread_mutex_trylock
149148# pragma weak __pthread_mutex_unlock
150# pragma weak __pthread_mutexattr_init
151# pragma weak __pthread_mutexattr_destroy
152149# pragma weak __pthread_mutexattr_settype
153150# pragma weak __pthread_rwlock_destroy
154151# pragma weak __pthread_rwlock_rdlock
lib/libc/glibc/sysdeps/htl/pthread.h+1-1
......@@ -1,5 +1,5 @@
11/* Posix threads. Hurd version.
2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
2 Copyright (C) 2000-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/i386/htl/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. Hurd i386 version.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/i386/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF i386 ABI.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
2 Copyright (C) 1995-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/i386/symbol-hacks.h+1-1
......@@ -1,5 +1,5 @@
11/* Hacks needed for symbol manipulation. i386 version.
2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
2 Copyright (C) 2017-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/i386/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for i386.
2 Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 Copyright (C) 1991-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/loongarch/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF LoongArch ABI.
2 Copyright (C) 2022-2024 Free Software Foundation, Inc.
2 Copyright (C) 2022-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/loongarch/sys/regdef.h+1-1
......@@ -1,5 +1,5 @@
11/* Register Macro definitions
2 Copyright (C) 2022-2024 Free Software Foundation, Inc.
2 Copyright (C) 2022-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55
lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for Coldfire.
2 Copyright (C) 1998-2024 Free Software Foundation, Inc.
2 Copyright (C) 1998-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for m680x0.
2 Copyright (C) 2010-2024 Free Software Foundation, Inc.
2 Copyright (C) 2010-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2010-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2010-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/m68k/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF m68k ABI.
2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 Copyright (C) 1996-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/m68k/symbol-hacks.h+1-1
......@@ -1,5 +1,5 @@
11/* Hacks needed for symbol manipulation. m68k version.
2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
2 Copyright (C) 2017-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/m68k/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for m68k.
2 Copyright (C) 1998-2024 Free Software Foundation, Inc.
2 Copyright (C) 1998-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mach/libc-lock.h+1-1
......@@ -1,5 +1,5 @@
11/* libc-internal interface for mutex locks. Mach cthreads version.
2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 Copyright (C) 1996-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mach/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1994-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1994-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h+1-1
......@@ -1,5 +1,5 @@
11/* Configuration of lookup functions. MIPS version.
2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
2 Copyright (C) 2000-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mips/nptl/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2024 Free Software Foundation, Inc.
2 Copyright (C) 2005-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mips/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF Mips ABI.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
2 Copyright (C) 1995-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/nptl/bits/pthreadtypes.h+1-1
......@@ -1,5 +1,5 @@
11/* Declaration of common pthread types for all architectures.
2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
2 Copyright (C) 2017-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h+2-3
......@@ -1,5 +1,5 @@
11/* Common threading primitives definitions for both POSIX and C11.
2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
2 Copyright (C) 2017-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -95,8 +95,7 @@ struct __pthread_cond_s
9595{
9696 __atomic_wide_counter __wseq;
9797 __atomic_wide_counter __g1_start;
98 unsigned int __g_refs[2] __LOCK_ALIGNMENT;
99 unsigned int __g_size[2];
98 unsigned int __g_size[2] __LOCK_ALIGNMENT;
10099 unsigned int __g1_orig_size;
101100 unsigned int __wrefs;
102101 unsigned int __g_signals[2];
lib/libc/glibc/sysdeps/nptl/libc-lock.h+1-1
......@@ -1,5 +1,5 @@
11/* libc-internal interface for mutex locks. NPTL version.
2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 Copyright (C) 1996-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/nptl/libc-lockP.h+1-1
......@@ -1,5 +1,5 @@
11/* Private libc-internal interface for mutex locks. NPTL version.
2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 Copyright (C) 1996-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/nptl/pthread.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -152,7 +152,7 @@ enum
152152
153153
154154/* Conditional variable handling. */
155#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }
155#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, 0, 0, {0, 0} } }
156156
157157
158158/* Cleanup buffers */
lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code for programs linked with GNU libc.
2 Copyright (C) 1998-2024 Free Software Foundation, Inc.
2 Copyright (C) 1998-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc32/symbol-hacks.h+1-1
......@@ -1,5 +1,5 @@
11/* Hacks needed for symbol manipulation. powerpc version.
2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
2 Copyright (C) 2017-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h+4-1
......@@ -1,5 +1,5 @@
11/* Assembly macros for 32-bit PowerPC.
2 Copyright (C) 1999-2024 Free Software Foundation, Inc.
2 Copyright (C) 1999-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -104,6 +104,9 @@ GOT_LABEL: ; \
104104# define JUMPTARGET(name) name
105105#endif
106106
107#define TAIL_CALL_NO_RETURN(__func) \
108 b __func@local
109
107110#if defined SHARED && defined PIC && !defined NO_HIDDEN
108111# undef HIDDEN_JUMPTARGET
109112# define HIDDEN_JUMPTARGET(name) __GI_##name##@local
lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h+1-1
......@@ -1,5 +1,5 @@
11/* Configuration of lookup functions. PowerPC64 version.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc64/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code for programs linked with GNU libc. PowerPC64 version.
2 Copyright (C) 1998-2024 Free Software Foundation, Inc.
2 Copyright (C) 1998-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h+23-3
......@@ -1,5 +1,5 @@
11/* Assembly macros for 64-bit PowerPC.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,8 +31,9 @@
3131#define FRAME_TOC_SAVE 40
3232#define FRAME_PARM_SAVE 48
3333#else
34#define FRAME_MIN_SIZE 32
35#define FRAME_MIN_SIZE_PARM 96
34#define FRAME_ROP_SAVE -8
35#define FRAME_MIN_SIZE 48 /* Includes space for the ROP save slot */
36#define FRAME_MIN_SIZE_PARM 112 /* Includes space for the ROP save slot */
3637#define FRAME_TOC_SAVE 24
3738#define FRAME_PARM_SAVE 32
3839#endif
......@@ -352,6 +353,25 @@ LT_LABELSUFFIX(name,_name_end): ; \
352353 ENTRY (name); \
353354 DO_CALL (SYS_ify (syscall_name))
354355
356#ifdef SHARED
357# define TAIL_CALL_NO_RETURN(__func) \
358 b JUMPTARGET (NOTOC (__func))
359#else
360# define TAIL_CALL_NO_RETURN(__func) \
361 .ifdef .Local ## __func; \
362 b .Local ## __func; \
363 .else; \
364.Local ## __func: \
365 mflr 0; \
366 std 0,FRAME_LR_SAVE(1); \
367 stdu 1,-FRAME_MIN_SIZE(1); \
368 cfi_adjust_cfa_offset(FRAME_MIN_SIZE); \
369 cfi_offset(lr,FRAME_LR_SAVE); \
370 bl JUMPTARGET(__func); \
371 nop; \
372 .endif
373#endif
374
355375#ifdef SHARED
356376#define TAIL_CALL_SYSCALL_ERROR \
357377 b JUMPTARGET (NOTOC (__syscall_error))
lib/libc/glibc/sysdeps/powerpc/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. RISC-V version.
2 Copyright (C) 2011-2024 Free Software Foundation, Inc.
2 Copyright (C) 2011-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/riscv/start.S+2-1
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF RISC-V ABI.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
2 Copyright (C) 1995-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -87,6 +87,7 @@ load_gp:
8787 ret
8888
8989 .section .preinit_array,"aw"
90 .align PTRLOG
9091 .dc.a load_gp
9192
9293/* Define a symbol for the first piece of initialized data. */
lib/libc/glibc/sysdeps/s390/s390-64/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the 64 bit S/390 ELF ABI.
2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
2 Copyright (C) 2001-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/s390/s390-64/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for 64 bit S/390.
2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
2 Copyright (C) 2001-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/sparc/dl-dtprocnum.h+1-1
......@@ -1,5 +1,5 @@
11/* Configuration of lookup functions. SPARC version.
2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
2 Copyright (C) 2000-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/sparc/sparc32/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code for elf32-sparc
2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 Copyright (C) 1997-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/sparc/sparc64/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code for elf64-sparc
2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 Copyright (C) 1997-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/sparc/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/arm/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/i386/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/mips/mips32/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/mips/mips64/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/mips/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/powerpc/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sh/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysdep.h+142-33
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -24,6 +24,9 @@
2424#define SYSCALL__(name, args) PSEUDO (__##name, name, args)
2525#define SYSCALL(name, args) PSEUDO (name, name, args)
2626
27#ifndef __ASSEMBLER__
28# include <errno.h>
29
2730#define __SYSCALL_CONCAT_X(a,b) a##b
2831#define __SYSCALL_CONCAT(a,b) __SYSCALL_CONCAT_X (a, b)
2932
......@@ -108,42 +111,148 @@
108111#define INLINE_SYSCALL_CALL(...) \
109112 __INLINE_SYSCALL_DISP (__INLINE_SYSCALL, __VA_ARGS__)
110113
111#if IS_IN (rtld)
112/* All cancellation points are compiled out in the dynamic loader. */
113# define NO_SYSCALL_CANCEL_CHECKING 1
114#define __INTERNAL_SYSCALL_NCS0(name) \
115 INTERNAL_SYSCALL_NCS (name, 0)
116#define __INTERNAL_SYSCALL_NCS1(name, a1) \
117 INTERNAL_SYSCALL_NCS (name, 1, a1)
118#define __INTERNAL_SYSCALL_NCS2(name, a1, a2) \
119 INTERNAL_SYSCALL_NCS (name, 2, a1, a2)
120#define __INTERNAL_SYSCALL_NCS3(name, a1, a2, a3) \
121 INTERNAL_SYSCALL_NCS (name, 3, a1, a2, a3)
122#define __INTERNAL_SYSCALL_NCS4(name, a1, a2, a3, a4) \
123 INTERNAL_SYSCALL_NCS (name, 4, a1, a2, a3, a4)
124#define __INTERNAL_SYSCALL_NCS5(name, a1, a2, a3, a4, a5) \
125 INTERNAL_SYSCALL_NCS (name, 5, a1, a2, a3, a4, a5)
126#define __INTERNAL_SYSCALL_NCS6(name, a1, a2, a3, a4, a5, a6) \
127 INTERNAL_SYSCALL_NCS (name, 6, a1, a2, a3, a4, a5, a6)
128#define __INTERNAL_SYSCALL_NCS7(name, a1, a2, a3, a4, a5, a6, a7) \
129 INTERNAL_SYSCALL_NCS (name, 7, a1, a2, a3, a4, a5, a6, a7)
130
131/* Issue a syscall defined by syscall number plus any other argument required.
132 It is similar to INTERNAL_SYSCALL_NCS macro, but without the need to pass
133 the expected argument number as third parameter. */
134#define INTERNAL_SYSCALL_NCS_CALL(...) \
135 __INTERNAL_SYSCALL_DISP (__INTERNAL_SYSCALL_NCS, __VA_ARGS__)
136
137/* Cancellation macros. */
138#include <syscall_types.h>
139
140/* Adjust both the __syscall_cancel and the SYSCALL_CANCEL macro to support
141 7 arguments instead of default 6 (curently only mip32). It avoid add
142 the requirement to each architecture to support 7 argument macros
143 {INTERNAL,INLINE}_SYSCALL. */
144#ifdef HAVE_CANCELABLE_SYSCALL_WITH_7_ARGS
145# define __SYSCALL_CANCEL7_ARG_DEF __syscall_arg_t a7,
146# define __SYSCALL_CANCEL7_ARCH_ARG_DEF ,__syscall_arg_t a7
147# define __SYSCALL_CANCEL7_ARG 0,
148# define __SYSCALL_CANCEL7_ARG7 a7,
149# define __SYSCALL_CANCEL7_ARCH_ARG7 , a7
114150#else
115# define NO_SYSCALL_CANCEL_CHECKING SINGLE_THREAD_P
151# define __SYSCALL_CANCEL7_ARG_DEF
152# define __SYSCALL_CANCEL7_ARCH_ARG_DEF
153# define __SYSCALL_CANCEL7_ARG
154# define __SYSCALL_CANCEL7_ARG7
155# define __SYSCALL_CANCEL7_ARCH_ARG7
116156#endif
157long int __internal_syscall_cancel (__syscall_arg_t a1, __syscall_arg_t a2,
158 __syscall_arg_t a3, __syscall_arg_t a4,
159 __syscall_arg_t a5, __syscall_arg_t a6,
160 __SYSCALL_CANCEL7_ARG_DEF
161 __syscall_arg_t nr) attribute_hidden;
117162
118#define SYSCALL_CANCEL(...) \
119 ({ \
120 long int sc_ret; \
121 if (NO_SYSCALL_CANCEL_CHECKING) \
122 sc_ret = INLINE_SYSCALL_CALL (__VA_ARGS__); \
123 else \
124 { \
125 int sc_cancel_oldtype = LIBC_CANCEL_ASYNC (); \
126 sc_ret = INLINE_SYSCALL_CALL (__VA_ARGS__); \
127 LIBC_CANCEL_RESET (sc_cancel_oldtype); \
128 } \
129 sc_ret; \
130 })
163long int __syscall_cancel (__syscall_arg_t arg1, __syscall_arg_t arg2,
164 __syscall_arg_t arg3, __syscall_arg_t arg4,
165 __syscall_arg_t arg5, __syscall_arg_t arg6,
166 __SYSCALL_CANCEL7_ARG_DEF
167 __syscall_arg_t nr) attribute_hidden;
131168
132/* Issue a syscall defined by syscall number plus any other argument
133 required. Any error will be returned unmodified (including errno). */
134#define INTERNAL_SYSCALL_CANCEL(...) \
135 ({ \
136 long int sc_ret; \
137 if (NO_SYSCALL_CANCEL_CHECKING) \
138 sc_ret = INTERNAL_SYSCALL_CALL (__VA_ARGS__); \
139 else \
140 { \
141 int sc_cancel_oldtype = LIBC_CANCEL_ASYNC (); \
142 sc_ret = INTERNAL_SYSCALL_CALL (__VA_ARGS__); \
143 LIBC_CANCEL_RESET (sc_cancel_oldtype); \
144 } \
145 sc_ret; \
146 })
169#define __SYSCALL_CANCEL0(name) \
170 __syscall_cancel (0, 0, 0, 0, 0, 0, __SYSCALL_CANCEL7_ARG __NR_##name)
171#define __SYSCALL_CANCEL1(name, a1) \
172 __syscall_cancel (__SSC (a1), 0, 0, 0, 0, 0, \
173 __SYSCALL_CANCEL7_ARG __NR_##name)
174#define __SYSCALL_CANCEL2(name, a1, a2) \
175 __syscall_cancel (__SSC (a1), __SSC (a2), 0, 0, 0, 0, \
176 __SYSCALL_CANCEL7_ARG __NR_##name)
177#define __SYSCALL_CANCEL3(name, a1, a2, a3) \
178 __syscall_cancel (__SSC (a1), __SSC (a2), __SSC (a3), 0, 0, 0, \
179 __SYSCALL_CANCEL7_ARG __NR_##name)
180#define __SYSCALL_CANCEL4(name, a1, a2, a3, a4) \
181 __syscall_cancel (__SSC (a1), __SSC (a2), __SSC (a3), \
182 __SSC(a4), 0, 0, __SYSCALL_CANCEL7_ARG __NR_##name)
183#define __SYSCALL_CANCEL5(name, a1, a2, a3, a4, a5) \
184 __syscall_cancel (__SSC (a1), __SSC (a2), __SSC (a3), __SSC(a4), \
185 __SSC (a5), 0, __SYSCALL_CANCEL7_ARG __NR_##name)
186#define __SYSCALL_CANCEL6(name, a1, a2, a3, a4, a5, a6) \
187 __syscall_cancel (__SSC (a1), __SSC (a2), __SSC (a3), __SSC (a4), \
188 __SSC (a5), __SSC (a6), __SYSCALL_CANCEL7_ARG \
189 __NR_##name)
190#define __SYSCALL_CANCEL7(name, a1, a2, a3, a4, a5, a6, a7) \
191 __syscall_cancel (__SSC (a1), __SSC (a2), __SSC (a3), __SSC (a4), \
192 __SSC (a5), __SSC (a6), __SSC (a7), __NR_##name)
193
194#define __SYSCALL_CANCEL_NARGS_X(a,b,c,d,e,f,g,h,n,...) n
195#define __SYSCALL_CANCEL_NARGS(...) \
196 __SYSCALL_CANCEL_NARGS_X (__VA_ARGS__,7,6,5,4,3,2,1,0,)
197#define __SYSCALL_CANCEL_CONCAT_X(a,b) a##b
198#define __SYSCALL_CANCEL_CONCAT(a,b) __SYSCALL_CANCEL_CONCAT_X (a, b)
199#define __SYSCALL_CANCEL_DISP(b,...) \
200 __SYSCALL_CANCEL_CONCAT (b,__SYSCALL_CANCEL_NARGS(__VA_ARGS__))(__VA_ARGS__)
201
202/* Issue a cancellable syscall defined first argument plus any other argument
203 required. If and error occurs its value, the macro returns -1 and sets
204 errno accordingly. */
205#define __SYSCALL_CANCEL_CALL(...) \
206 __SYSCALL_CANCEL_DISP (__SYSCALL_CANCEL, __VA_ARGS__)
207
208#define __INTERNAL_SYSCALL_CANCEL0(name) \
209 __internal_syscall_cancel (0, 0, 0, 0, 0, 0, __SYSCALL_CANCEL7_ARG \
210 __NR_##name)
211#define __INTERNAL_SYSCALL_CANCEL1(name, a1) \
212 __internal_syscall_cancel (__SSC (a1), 0, 0, 0, 0, 0, \
213 __SYSCALL_CANCEL7_ARG __NR_##name)
214#define __INTERNAL_SYSCALL_CANCEL2(name, a1, a2) \
215 __internal_syscall_cancel (__SSC (a1), __SSC (a2), 0, 0, 0, 0, \
216 __SYSCALL_CANCEL7_ARG __NR_##name)
217#define __INTERNAL_SYSCALL_CANCEL3(name, a1, a2, a3) \
218 __internal_syscall_cancel (__SSC (a1), __SSC (a2), __SSC (a3), 0, \
219 0, 0, __SYSCALL_CANCEL7_ARG __NR_##name)
220#define __INTERNAL_SYSCALL_CANCEL4(name, a1, a2, a3, a4) \
221 __internal_syscall_cancel (__SSC (a1), __SSC (a2), __SSC (a3), \
222 __SSC(a4), 0, 0, \
223 __SYSCALL_CANCEL7_ARG __NR_##name)
224#define __INTERNAL_SYSCALL_CANCEL5(name, a1, a2, a3, a4, a5) \
225 __internal_syscall_cancel (__SSC (a1), __SSC (a2), __SSC (a3), \
226 __SSC(a4), __SSC (a5), 0, \
227 __SYSCALL_CANCEL7_ARG __NR_##name)
228#define __INTERNAL_SYSCALL_CANCEL6(name, a1, a2, a3, a4, a5, a6) \
229 __internal_syscall_cancel (__SSC (a1), __SSC (a2), __SSC (a3), \
230 __SSC (a4), __SSC (a5), __SSC (a6), \
231 __SYSCALL_CANCEL7_ARG __NR_##name)
232#define __INTERNAL_SYSCALL_CANCEL7(name, a1, a2, a3, a4, a5, a6, a7) \
233 __internal_syscall_cancel (__SSC (a1), __SSC (a2), __SSC (a3), \
234 __SSC (a4), __SSC (a5), __SSC (a6), \
235 __SSC (a7), __NR_##name)
236
237/* Issue a cancellable syscall defined by syscall number NAME plus any other
238 argument required. If an error occurs its value is returned as an negative
239 number unmodified and errno is not set. */
240#define __INTERNAL_SYSCALL_CANCEL_CALL(...) \
241 __SYSCALL_CANCEL_DISP (__INTERNAL_SYSCALL_CANCEL, __VA_ARGS__)
242
243#if IS_IN (rtld)
244/* The loader does not need to handle thread cancellation, use direct
245 syscall instead. */
246# define INTERNAL_SYSCALL_CANCEL(...) INTERNAL_SYSCALL_CALL(__VA_ARGS__)
247# define SYSCALL_CANCEL(...) INLINE_SYSCALL_CALL (__VA_ARGS__)
248#else
249# define INTERNAL_SYSCALL_CANCEL(...) \
250 __INTERNAL_SYSCALL_CANCEL_CALL (__VA_ARGS__)
251# define SYSCALL_CANCEL(...) \
252 __SYSCALL_CANCEL_CALL (__VA_ARGS__)
253#endif
254
255#endif /* __ASSEMBLER__ */
147256
148257/* Machine-dependent sysdep.h files are expected to define the macro
149258 PSEUDO (function_name, syscall_name) to emit assembly code to define the
lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h+1-1
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. AArch64 version.
3 Copyright (C) 2018-2024 Free Software Foundation, Inc.
3 Copyright (C) 2018-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h+2-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -164,6 +164,7 @@
164164# define HAVE_CLOCK_GETRES64_VSYSCALL "__kernel_clock_getres"
165165# define HAVE_CLOCK_GETTIME64_VSYSCALL "__kernel_clock_gettime"
166166# define HAVE_GETTIMEOFDAY_VSYSCALL "__kernel_gettimeofday"
167# define HAVE_GETRANDOM_VSYSCALL "__kernel_getrandom"
167168
168169# define HAVE_CLONE3_WRAPPER 1
169170
lib/libc/glibc/sysdeps/unix/sysv/linux/arc/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for ARC.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h+1-1
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number.
3 Copyright (C) 2006-2024 Free Software Foundation, Inc.
3 Copyright (C) 2006-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/csky/kernel_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Internal definitions for stat functions. Linux/csky.
2 Copyright (C) 2011-2024 Free Software Foundation, Inc.
2 Copyright (C) 2011-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/csky/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembly macros for C-SKY.
2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
2 Copyright (C) 2018-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. Linux version.
2 Copyright (C) 2005-2024 Free Software Foundation, Inc.
2 Copyright (C) 2005-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/fstat.c+1-1
......@@ -1,5 +1,5 @@
11/* Get file status. Linux version.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/fstat64.c+3-3
......@@ -1,5 +1,5 @@
11/* Get file status. Linux version.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@ __fstat64_time64 (int fd, struct __stat64_t64 *buf)
3030{
3131#if !FSTATAT_USE_STATX
3232# if XSTAT_IS_XSTAT64
33 /* The __NR_stat macro is defined for all ABIs that also define
33 /* The __NR_stat macro is defined for all ABIs that also define
3434 XSTAT_IS_STAT64, so to correctly identify alpha and sparc check
3535 __NR_newfstatat (similar to what fstatat64 does). */
3636# ifdef __NR_newfstatat
......@@ -60,7 +60,7 @@ __fstat64_time64 (int fd, struct __stat64_t64 *buf)
6060# endif
6161#else /* !FSTATAT_USE_STATX */
6262 /* All kABIs with non-LFS support and with old 32-bit time_t support
63 e.g. arm, csky, i386, hppa, m68k, microblaze, nios2, sh, powerpc32,
63 e.g. arm, csky, i386, hppa, m68k, microblaze, sh, powerpc32,
6464 and sparc32. */
6565 if (fd < 0)
6666 {
lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat.c+3-1
......@@ -1,5 +1,5 @@
11/* Get file status. Linux version.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -16,6 +16,8 @@
1616 License along with the GNU C Library; if not, see
1717 <https://www.gnu.org/licenses/>. */
1818
19/* zig patch: fixes to make this file compile */
20
1921#include <inttypes.h>
2022#include <sys/stat.h>
2123#include <kernel_stat.h>
lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat64.c+4-2
......@@ -1,5 +1,5 @@
11/* Get file status. Linux version.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -16,6 +16,8 @@
1616 License along with the GNU C Library; if not, see
1717 <https://www.gnu.org/licenses/>. */
1818
19/* zig patch: fixes to make this file compile */
20
1921#define __fstatat __redirect___fstatat
2022#define fstatat __redirect_fstatat
2123#include <inttypes.h>
......@@ -104,7 +106,7 @@ fstatat64_time64_stat (int fd, const char *file, struct __stat64_t64 *buf,
104106#else
105107# ifdef __NR_fstatat64
106108 /* All kABIs with non-LFS support and with old 32-bit time_t support
107 e.g. arm, csky, i386, hppa, m68k, microblaze, nios2, sh, powerpc32,
109 e.g. arm, csky, i386, hppa, m68k, microblaze, sh, powerpc32,
108110 and sparc32. */
109111 struct stat64 st64;
110112 r = INTERNAL_SYSCALL_CALL (fstatat64, fd, file, &st64, flag);
lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. i386 version.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h+1-1
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. i386 version.
3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 Copyright (C) 1999-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h+1-1
......@@ -1,5 +1,5 @@
11/* Internal declarations for sys/timex.h.
2 Copyright (C) 2014-2024 Free Software Foundation, Inc.
2 Copyright (C) 2014-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h+1-1
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number.
3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 Copyright (C) 1999-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/kernel_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Internal definitions for stat functions.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
2 Copyright (C) 2021-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/loongarch/sysdep.h+2-1
......@@ -1,5 +1,5 @@
11/* Assembly macros for LoongArch.
2 Copyright (C) 2022-2024 Free Software Foundation, Inc.
2 Copyright (C) 2022-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -119,6 +119,7 @@
119119#define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime"
120120#define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
121121#define HAVE_GETCPU_VSYSCALL "__vdso_getcpu"
122#define HAVE_GETRANDOM_VSYSCALL "__vdso_getrandom"
122123
123124#define HAVE_CLONE3_WRAPPER 1
124125
lib/libc/glibc/sysdeps/unix/sysv/linux/lstat.c+1-1
......@@ -1,5 +1,5 @@
11/* Get file status. Linux version.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/lstat64.c+1-1
......@@ -1,5 +1,5 @@
11/* Get file status.
2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 Copyright (C) 1996-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2010-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2010-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h+1-1
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number.
3 Copyright (C) 2008-2024 Free Software Foundation, Inc.
3 Copyright (C) 2008-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2010-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2010-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h+1-1
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number.
3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 Copyright (C) 1999-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h+5-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -18,6 +18,10 @@
1818#ifndef _LINUX_MIPS_MIPS32_SYSDEP_H
1919#define _LINUX_MIPS_MIPS32_SYSDEP_H 1
2020
21/* mips32 have cancelable syscalls with 7 arguments (currently only
22 sync_file_range). */
23#define HAVE_CANCELABLE_SYSCALL_WITH_7_ARGS 1
24
2125/* There is some commonality. */
2226#include <sysdeps/unix/sysv/linux/mips/sysdep.h>
2327#include <sysdeps/unix/sysv/linux/sysdep.h>
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/kstat_cp.h+1-1
......@@ -1,5 +1,5 @@
11/* Struct stat/stat64 to stat/stat64 conversion for Linux.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h+23-31
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -44,15 +44,7 @@
4444#undef HAVE_INTERNAL_BRK_ADDR_SYMBOL
4545#define HAVE_INTERNAL_BRK_ADDR_SYMBOL 1
4646
47#if _MIPS_SIM == _ABIN32
48/* Convert X to a long long, without losing any bits if it is one
49 already or warning if it is a 32-bit pointer. */
50# define ARGIFY(X) ((long long int) (__typeof__ ((X) - (X))) (X))
51typedef long long int __syscall_arg_t;
52#else
53# define ARGIFY(X) ((long int) (X))
54typedef long int __syscall_arg_t;
55#endif
47#include <syscall_types.h>
5648
5749/* Note that the original Linux syscall restart convention required the
5850 instruction immediately preceding SYSCALL to initialize $v0 with the
......@@ -120,7 +112,7 @@ typedef long int __syscall_arg_t;
120112 long int _sys_result; \
121113 \
122114 { \
123 __syscall_arg_t _arg1 = ARGIFY (arg1); \
115 __syscall_arg_t _arg1 = __SSC (arg1); \
124116 register __syscall_arg_t __s0 asm ("$16") __attribute__ ((unused))\
125117 = (number); \
126118 register __syscall_arg_t __v0 asm ("$2"); \
......@@ -144,8 +136,8 @@ typedef long int __syscall_arg_t;
144136 long int _sys_result; \
145137 \
146138 { \
147 __syscall_arg_t _arg1 = ARGIFY (arg1); \
148 __syscall_arg_t _arg2 = ARGIFY (arg2); \
139 __syscall_arg_t _arg1 = __SSC (arg1); \
140 __syscall_arg_t _arg2 = __SSC (arg2); \
149141 register __syscall_arg_t __s0 asm ("$16") __attribute__ ((unused))\
150142 = (number); \
151143 register __syscall_arg_t __v0 asm ("$2"); \
......@@ -170,9 +162,9 @@ typedef long int __syscall_arg_t;
170162 long int _sys_result; \
171163 \
172164 { \
173 __syscall_arg_t _arg1 = ARGIFY (arg1); \
174 __syscall_arg_t _arg2 = ARGIFY (arg2); \
175 __syscall_arg_t _arg3 = ARGIFY (arg3); \
165 __syscall_arg_t _arg1 = __SSC (arg1); \
166 __syscall_arg_t _arg2 = __SSC (arg2); \
167 __syscall_arg_t _arg3 = __SSC (arg3); \
176168 register __syscall_arg_t __s0 asm ("$16") __attribute__ ((unused))\
177169 = (number); \
178170 register __syscall_arg_t __v0 asm ("$2"); \
......@@ -199,10 +191,10 @@ typedef long int __syscall_arg_t;
199191 long int _sys_result; \
200192 \
201193 { \
202 __syscall_arg_t _arg1 = ARGIFY (arg1); \
203 __syscall_arg_t _arg2 = ARGIFY (arg2); \
204 __syscall_arg_t _arg3 = ARGIFY (arg3); \
205 __syscall_arg_t _arg4 = ARGIFY (arg4); \
194 __syscall_arg_t _arg1 = __SSC (arg1); \
195 __syscall_arg_t _arg2 = __SSC (arg2); \
196 __syscall_arg_t _arg3 = __SSC (arg3); \
197 __syscall_arg_t _arg4 = __SSC (arg4); \
206198 register __syscall_arg_t __s0 asm ("$16") __attribute__ ((unused))\
207199 = (number); \
208200 register __syscall_arg_t __v0 asm ("$2"); \
......@@ -229,11 +221,11 @@ typedef long int __syscall_arg_t;
229221 long int _sys_result; \
230222 \
231223 { \
232 __syscall_arg_t _arg1 = ARGIFY (arg1); \
233 __syscall_arg_t _arg2 = ARGIFY (arg2); \
234 __syscall_arg_t _arg3 = ARGIFY (arg3); \
235 __syscall_arg_t _arg4 = ARGIFY (arg4); \
236 __syscall_arg_t _arg5 = ARGIFY (arg5); \
224 __syscall_arg_t _arg1 = __SSC (arg1); \
225 __syscall_arg_t _arg2 = __SSC (arg2); \
226 __syscall_arg_t _arg3 = __SSC (arg3); \
227 __syscall_arg_t _arg4 = __SSC (arg4); \
228 __syscall_arg_t _arg5 = __SSC (arg5); \
237229 register __syscall_arg_t __s0 asm ("$16") __attribute__ ((unused))\
238230 = (number); \
239231 register __syscall_arg_t __v0 asm ("$2"); \
......@@ -261,12 +253,12 @@ typedef long int __syscall_arg_t;
261253 long int _sys_result; \
262254 \
263255 { \
264 __syscall_arg_t _arg1 = ARGIFY (arg1); \
265 __syscall_arg_t _arg2 = ARGIFY (arg2); \
266 __syscall_arg_t _arg3 = ARGIFY (arg3); \
267 __syscall_arg_t _arg4 = ARGIFY (arg4); \
268 __syscall_arg_t _arg5 = ARGIFY (arg5); \
269 __syscall_arg_t _arg6 = ARGIFY (arg6); \
256 __syscall_arg_t _arg1 = __SSC (arg1); \
257 __syscall_arg_t _arg2 = __SSC (arg2); \
258 __syscall_arg_t _arg3 = __SSC (arg3); \
259 __syscall_arg_t _arg4 = __SSC (arg4); \
260 __syscall_arg_t _arg5 = __SSC (arg5); \
261 __syscall_arg_t _arg6 = __SSC (arg6); \
270262 register __syscall_arg_t __s0 asm ("$16") __attribute__ ((unused))\
271263 = (number); \
272264 register __syscall_arg_t __v0 asm ("$2"); \
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Syscall definitions, Linux MIPS generic version.
2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
2 Copyright (C) 2019-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/mknodat.c+3-1
......@@ -1,5 +1,5 @@
11/* Create a special or ordinary file. Linux version.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -16,6 +16,8 @@
1616 License along with the GNU C Library; if not, see
1717 <https://www.gnu.org/licenses/>. */
1818
19/* zig patch: fixes to make this file compile */
20
1921#include <inttypes.h>
2022#include <sys/types.h>
2123#include <sys/stat.h>
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h+1-1
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. PowerPC version.
3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 Copyright (C) 1999-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of `struct stat' used in the kernel.
2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 Copyright (C) 1997-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/sysdep.h+24-21
......@@ -1,5 +1,5 @@
11/* Syscall definitions, Linux PowerPC generic version.
2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
2 Copyright (C) 2019-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -32,6 +32,18 @@
3232#undef SYS_ify
3333#define SYS_ify(syscall_name) __NR_##syscall_name
3434
35#define tostring(s) #s
36#define stringify(s) tostring(s)
37
38#ifdef _ARCH_PWR4
39/* Power4 and later cpus introduced a faster instruction to copy one
40 CR field, rather than the slower microcoded mfcr which copies all
41 CR fields. */
42# define MFCR0(REG) "mfocrf " stringify(REG) ",0x80"
43#else
44# define MFCR0(REG) "mfcr " stringify(REG)
45#endif
46
3547/* Define a macro which expands inline into the wrapper code for a system
3648 call. This use is for internal calls that do not need to handle errors
3749 normally. It will never touch errno. This returns just what the kernel
......@@ -52,7 +64,7 @@
5264 __asm__ __volatile__ \
5365 ("mtctr %0\n\t" \
5466 "bctrl\n\t" \
55 "mfcr %0\n\t" \
67 MFCR0(%0) "\n\t" \
5668 "0:" \
5769 : "+r" (r0), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), \
5870 "+r" (r7), "+r" (r8) \
......@@ -83,11 +95,10 @@
8395 "scv 0\n\t" \
8496 ".machine \"pop\"\n\t" \
8597 "0:" \
86 : "=&r" (r0), \
87 "=&r" (r3), "=&r" (r4), "=&r" (r5), \
88 "=&r" (r6), "=&r" (r7), "=&r" (r8) \
89 : ASM_INPUT_##nr \
90 : "r9", "r10", "r11", "r12", \
98 : "+r" (r0), \
99 "+r" (r3), "+r" (r4), "+r" (r5), \
100 "+r" (r6), "+r" (r7), "+r" (r8) \
101 : : "r9", "r10", "r11", "r12", \
91102 "cr0", "cr1", "cr5", "cr6", "cr7", \
92103 "xer", "lr", "ctr", "memory"); \
93104 r3; \
......@@ -97,13 +108,12 @@
97108 ({ \
98109 __asm__ __volatile__ \
99110 ("sc\n\t" \
100 "mfcr %0\n\t" \
111 MFCR0(%0) "\n\t" \
101112 "0:" \
102 : "=&r" (r0), \
103 "=&r" (r3), "=&r" (r4), "=&r" (r5), \
104 "=&r" (r6), "=&r" (r7), "=&r" (r8) \
105 : ASM_INPUT_##nr \
106 : "r9", "r10", "r11", "r12", \
113 : "+r" (r0), \
114 "+r" (r3), "+r" (r4), "+r" (r5), \
115 "+r" (r6), "+r" (r7), "+r" (r8) \
116 : : "r9", "r10", "r11", "r12", \
107117 "xer", "cr0", "ctr", "memory"); \
108118 r0 & (1 << 28) ? -r3 : r3; \
109119 })
......@@ -199,14 +209,6 @@
199209 __illegally_sized_syscall_arg6 (); \
200210 r8 = _arg6
201211
202#define ASM_INPUT_0 "0" (r0)
203#define ASM_INPUT_1 ASM_INPUT_0, "1" (r3)
204#define ASM_INPUT_2 ASM_INPUT_1, "2" (r4)
205#define ASM_INPUT_3 ASM_INPUT_2, "3" (r5)
206#define ASM_INPUT_4 ASM_INPUT_3, "4" (r6)
207#define ASM_INPUT_5 ASM_INPUT_4, "5" (r7)
208#define ASM_INPUT_6 ASM_INPUT_5, "6" (r8)
209
210212/* List of system calls which are supported as vsyscalls. */
211213#define VDSO_NAME "LINUX_2.6.15"
212214#define VDSO_HASH 123718565
......@@ -223,5 +225,6 @@
223225#define HAVE_TIME_VSYSCALL "__kernel_time"
224226#define HAVE_GETTIMEOFDAY_VSYSCALL "__kernel_gettimeofday"
225227#define HAVE_GET_TBFREQ "__kernel_get_tbfreq"
228#define HAVE_GETRANDOM_VSYSCALL "__kernel_getrandom"
226229
227230#endif /* _LINUX_POWERPC_SYSDEP_H */
lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h+1-1
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. RISC-V version.
3 Copyright (C) 2018-2024 Free Software Foundation, Inc.
3 Copyright (C) 2018-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/s390 version.
2 Copyright (C) 2003-2024 Free Software Foundation, Inc.
2 Copyright (C) 2003-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h+1-1
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. S/390 version.
3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 Copyright (C) 1999-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for 64 bit S/390.
2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
2 Copyright (C) 2001-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sys/elf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sysdep.h+2-1
......@@ -1,5 +1,5 @@
11/* Syscall definitions, Linux s390 version.
2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
2 Copyright (C) 2019-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -72,6 +72,7 @@
7272#ifdef __s390x__
7373#define HAVE_CLOCK_GETRES64_VSYSCALL "__kernel_clock_getres"
7474#define HAVE_CLOCK_GETTIME64_VSYSCALL "__kernel_clock_gettime"
75#define HAVE_GETRANDOM_VSYSCALL "__kernel_getrandom"
7576#else
7677#define HAVE_CLOCK_GETRES_VSYSCALL "__kernel_clock_getres"
7778#define HAVE_CLOCK_GETTIME_VSYSCALL "__kernel_clock_gettime"
lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h+1-1
......@@ -1,5 +1,5 @@
11/* Single thread optimization, Linux version.
2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
2 Copyright (C) 2019-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h+1-1
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. SPARC version.
3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 Copyright (C) 1999-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h+3-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -107,6 +107,7 @@ ENTRY(name); \
107107#else /* __ASSEMBLER__ */
108108
109109#define __SYSCALL_STRING \
110 "mov %[scn], %%g1;" \
110111 "ta 0x10;" \
111112 "bcc 1f;" \
112113 " nop;" \
......@@ -114,7 +115,7 @@ ENTRY(name); \
114115 "1:"
115116
116117#define __SYSCALL_CLOBBERS \
117 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
118 "g1", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
118119 "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
119120 "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
120121 "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/kstat_cp.h+1-1
......@@ -1,5 +1,5 @@
11/* Struct kernel_stat64 to stat64. Linux/SPARC version.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h+3-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -106,6 +106,7 @@ ENTRY(name); \
106106#else /* __ASSEMBLER__ */
107107
108108#define __SYSCALL_STRING \
109 "mov %[scn], %%g1;" \
109110 "ta 0x6d;" \
110111 "bcc,pt %%xcc, 1f;" \
111112 " nop;" \
......@@ -113,7 +114,7 @@ ENTRY(name); \
113114 "1:"
114115
115116#define __SYSCALL_CLOBBERS \
116 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
117 "g1", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
117118 "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
118119 "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
119120 "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h+45-31
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -50,97 +50,109 @@
5050
5151#undef INTERNAL_SYSCALL_NCS
5252#define INTERNAL_SYSCALL_NCS(name, nr, args...) \
53 internal_syscall##nr(__SYSCALL_STRING, name, args)
53 _internal_syscall##nr(__SYSCALL_STRING, "p", name, args)
5454
55#define internal_syscall0(string,name,dummy...) \
55#define _internal_syscall0(string,nc,name,dummy...) \
5656({ \
57 register long int __g1 __asm__ ("g1") = (name); \
5857 register long __o0 __asm__ ("o0"); \
58 long int _name = (long int) (name); \
5959 __asm __volatile (string : "=r" (__o0) : \
60 "r" (__g1) : \
60 [scn] nc (_name) : \
6161 __SYSCALL_CLOBBERS); \
6262 __o0; \
6363})
64#define internal_syscall0(string,name,args...) \
65 _internal_syscall0(string, "i", name, args)
6466
65#define internal_syscall1(string,name,arg1) \
67#define _internal_syscall1(string,nc,name,arg1) \
6668({ \
6769 long int _arg1 = (long int) (arg1); \
68 register long int __g1 __asm__("g1") = (name); \
70 long int _name = (long int) (name); \
6971 register long int __o0 __asm__ ("o0") = _arg1; \
70 __asm __volatile (string : "=r" (__o0) : \
71 "r" (__g1), "0" (__o0) : \
72 __asm __volatile (string : "+r" (__o0) : \
73 [scn] nc (_name) : \
7274 __SYSCALL_CLOBBERS); \
7375 __o0; \
7476})
77#define internal_syscall1(string,name,args...) \
78 _internal_syscall1(string, "i", name, args)
7579
76#define internal_syscall2(string,name,arg1,arg2) \
80#define _internal_syscall2(string,nc,name,arg1,arg2) \
7781({ \
7882 long int _arg1 = (long int) (arg1); \
7983 long int _arg2 = (long int) (arg2); \
80 register long int __g1 __asm__("g1") = (name); \
84 long int _name = (long int) (name); \
8185 register long int __o0 __asm__ ("o0") = _arg1; \
8286 register long int __o1 __asm__ ("o1") = _arg2; \
83 __asm __volatile (string : "=r" (__o0) : \
84 "r" (__g1), "0" (__o0), "r" (__o1) : \
87 __asm __volatile (string : "+r" (__o0) : \
88 [scn] nc (_name), "r" (__o1) : \
8589 __SYSCALL_CLOBBERS); \
8690 __o0; \
8791})
92#define internal_syscall2(string,name,args...) \
93 _internal_syscall2(string, "i", name, args)
8894
89#define internal_syscall3(string,name,arg1,arg2,arg3) \
95#define _internal_syscall3(string,nc,name,arg1,arg2,arg3) \
9096({ \
9197 long int _arg1 = (long int) (arg1); \
9298 long int _arg2 = (long int) (arg2); \
9399 long int _arg3 = (long int) (arg3); \
94 register long int __g1 __asm__("g1") = (name); \
100 long int _name = (long int) (name); \
95101 register long int __o0 __asm__ ("o0") = _arg1; \
96102 register long int __o1 __asm__ ("o1") = _arg2; \
97103 register long int __o2 __asm__ ("o2") = _arg3; \
98 __asm __volatile (string : "=r" (__o0) : \
99 "r" (__g1), "0" (__o0), "r" (__o1), \
104 __asm __volatile (string : "+r" (__o0) : \
105 [scn] nc (_name), "r" (__o1), \
100106 "r" (__o2) : \
101107 __SYSCALL_CLOBBERS); \
102108 __o0; \
103109})
110#define internal_syscall3(string,name,args...) \
111 _internal_syscall3(string, "i", name, args)
104112
105#define internal_syscall4(string,name,arg1,arg2,arg3,arg4) \
113#define _internal_syscall4(string,nc,name,arg1,arg2,arg3,arg4) \
106114({ \
107115 long int _arg1 = (long int) (arg1); \
108116 long int _arg2 = (long int) (arg2); \
109117 long int _arg3 = (long int) (arg3); \
110118 long int _arg4 = (long int) (arg4); \
111 register long int __g1 __asm__("g1") = (name); \
119 long int _name = (long int) (name); \
112120 register long int __o0 __asm__ ("o0") = _arg1; \
113121 register long int __o1 __asm__ ("o1") = _arg2; \
114122 register long int __o2 __asm__ ("o2") = _arg3; \
115123 register long int __o3 __asm__ ("o3") = _arg4; \
116 __asm __volatile (string : "=r" (__o0) : \
117 "r" (__g1), "0" (__o0), "r" (__o1), \
124 __asm __volatile (string : "+r" (__o0) : \
125 [scn] nc (_name), "r" (__o1), \
118126 "r" (__o2), "r" (__o3) : \
119127 __SYSCALL_CLOBBERS); \
120128 __o0; \
121129})
130#define internal_syscall4(string,name,args...) \
131 _internal_syscall4(string, "i", name, args)
122132
123#define internal_syscall5(string,name,arg1,arg2,arg3,arg4,arg5) \
133#define _internal_syscall5(string,nc,name,arg1,arg2,arg3,arg4,arg5) \
124134({ \
125135 long int _arg1 = (long int) (arg1); \
126136 long int _arg2 = (long int) (arg2); \
127137 long int _arg3 = (long int) (arg3); \
128138 long int _arg4 = (long int) (arg4); \
129139 long int _arg5 = (long int) (arg5); \
130 register long int __g1 __asm__("g1") = (name); \
140 long int _name = (long int) (name); \
131141 register long int __o0 __asm__ ("o0") = _arg1; \
132142 register long int __o1 __asm__ ("o1") = _arg2; \
133143 register long int __o2 __asm__ ("o2") = _arg3; \
134144 register long int __o3 __asm__ ("o3") = _arg4; \
135145 register long int __o4 __asm__ ("o4") = _arg5; \
136 __asm __volatile (string : "=r" (__o0) : \
137 "r" (__g1), "0" (__o0), "r" (__o1), \
146 __asm __volatile (string : "+r" (__o0) : \
147 [scn] nc (_name), "r" (__o1), \
138148 "r" (__o2), "r" (__o3), "r" (__o4) : \
139149 __SYSCALL_CLOBBERS); \
140150 __o0; \
141151})
152#define internal_syscall5(string,name,args...) \
153 _internal_syscall5(string, "i", name, args)
142154
143#define internal_syscall6(string,name,arg1,arg2,arg3,arg4,arg5,arg6) \
155#define _internal_syscall6(string,nc,name,arg1,arg2,arg3,arg4,arg5,arg6)\
144156({ \
145157 long int _arg1 = (long int) (arg1); \
146158 long int _arg2 = (long int) (arg2); \
......@@ -148,20 +160,22 @@
148160 long int _arg4 = (long int) (arg4); \
149161 long int _arg5 = (long int) (arg5); \
150162 long int _arg6 = (long int) (arg6); \
151 register long int __g1 __asm__("g1") = (name); \
163 long int _name = (long int) (name); \
152164 register long int __o0 __asm__ ("o0") = _arg1; \
153165 register long int __o1 __asm__ ("o1") = _arg2; \
154166 register long int __o2 __asm__ ("o2") = _arg3; \
155167 register long int __o3 __asm__ ("o3") = _arg4; \
156168 register long int __o4 __asm__ ("o4") = _arg5; \
157169 register long int __o5 __asm__ ("o5") = _arg6; \
158 __asm __volatile (string : "=r" (__o0) : \
159 "r" (__g1), "0" (__o0), "r" (__o1), \
170 __asm __volatile (string : "+r" (__o0) : \
171 [scn] nc (_name), "r" (__o1), \
160172 "r" (__o2), "r" (__o3), "r" (__o4), \
161173 "r" (__o5) : \
162174 __SYSCALL_CLOBBERS); \
163175 __o0; \
164176})
177#define internal_syscall6(string,name,args...) \
178 _internal_syscall6(string, "i", name, args)
165179
166180#define INLINE_CLONE_SYSCALL(arg1,arg2,arg3,arg4,arg5) \
167181({ \
......@@ -170,15 +184,15 @@
170184 long int _arg3 = (long int) (arg3); \
171185 long int _arg4 = (long int) (arg4); \
172186 long int _arg5 = (long int) (arg5); \
187 long int _name = __NR_clone; \
173188 register long int __o0 __asm__ ("o0") = _arg1; \
174189 register long int __o1 __asm__ ("o1") = _arg2; \
175190 register long int __o2 __asm__ ("o2") = _arg3; \
176191 register long int __o3 __asm__ ("o3") = _arg4; \
177192 register long int __o4 __asm__ ("o4") = _arg5; \
178 register long int __g1 __asm__ ("g1") = __NR_clone; \
179193 __asm __volatile (__SYSCALL_STRING : \
180194 "=r" (__o0), "=r" (__o1) : \
181 "r" (__g1), "0" (__o0), "1" (__o1), \
195 [scn] "i" (_name), "0" (__o0), "1" (__o1), \
182196 "r" (__o2), "r" (__o3), "r" (__o4) : \
183197 __SYSCALL_CLOBBERS); \
184198 if (__glibc_unlikely ((unsigned long int) (__o0) > -4096UL)) \
lib/libc/glibc/sysdeps/unix/sysv/linux/stat.c+1-1
......@@ -1,5 +1,5 @@
11/* Get file status. Linux version.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/stat64.c+1-1
......@@ -1,5 +1,5 @@
11/* Get file status. Linux version.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.c+1-1
......@@ -1,5 +1,5 @@
11/* Struct stat/stat64 to stat/stat64 conversion for Linux.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.h+1-1
......@@ -1,5 +1,5 @@
11/* Copy to/from struct stat with and without 64-bit time_t support.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/struct_stat_time64.h+1-1
......@@ -1,5 +1,5 @@
11/* Struct stat with 64-bit time support.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
2 Copyright (C) 2020-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sys/syscall.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2015-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2015-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
2 Copyright (C) 2012-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h+1-1
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. x86-64 version.
3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 Copyright (C) 1999-2025 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h+2-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -376,6 +376,7 @@
376376# define HAVE_TIME_VSYSCALL "__vdso_time"
377377# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu"
378378# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres"
379# define HAVE_GETRANDOM_VSYSCALL "__vdso_getrandom"
379380
380381# define HAVE_CLONE3_WRAPPER 1
381382
lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2012-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2012-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/x86_64/sysdep.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h+1-1
......@@ -1,5 +1,5 @@
11/* Hacks needed for divdi3 symbol manipulation.
2 Copyright (C) 2004-2024 Free Software Foundation, Inc.
2 Copyright (C) 2004-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/x86/nptl/bits/pthreadtypes-arch.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2024 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/x86/sysdep.h+1-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for x86.
2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
2 Copyright (C) 2017-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/x86_64/start.S+1-1
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF x86-64 ABI.
2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
2 Copyright (C) 2001-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/x86_64/sysdep.h+3-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for x86-64.
2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
2 Copyright (C) 2001-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -19,6 +19,8 @@
1919#ifndef _X86_64_SYSDEP_H
2020#define _X86_64_SYSDEP_H 1
2121
22/* zig patch: inline x86-lp_size.h */
23
2224#include <sysdeps/x86/sysdep.h>
2325#ifdef __ASSEMBLER__
2426# define LP_SIZE 8
lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h+3-1
......@@ -1,5 +1,5 @@
11/* Assembler macros for x32.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
2 Copyright (C) 2012-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -16,6 +16,8 @@
1616 License along with the GNU C Library; if not, see
1717 <https://www.gnu.org/licenses/>. */
1818
19/* zig patch: inline x86-lp_size.h */
20
1921#include <sysdeps/x86_64/sysdep.h>
2022#undef LP_SIZE
2123#ifdef __ASSEMBLER__