libc: update glibc crt0 code to 2.43

This commit is contained in:
Alex Rønne Petersen 2026-01-26 05:30:07 +01:00
parent e4058f2c27
commit ff8dbd010f
No known key found for this signature in database
188 changed files with 439 additions and 246 deletions

View file

@ -1,5 +1,5 @@
/* Macros and inline functions to swap the order of bytes in integer values.
Copyright (C) 1997-2025 Free Software Foundation, Inc.
Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* Macros to control TS 18661-3 glibc features where the same
definitions are appropriate for all platforms.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Handle feature test macros at the start of a header.
Copyright (C) 2016-2025 Free Software Foundation, Inc.
Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Properties of long double type.
Copyright (C) 2016-2025 Free Software Foundation, Inc.
Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Signal number constants. Generic template.
Copyright (C) 1991-2025 Free Software Foundation, Inc.
Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Define intN_t types.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Perform binary search - inline version.
Copyright (C) 1991-2025 Free Software Foundation, Inc.
Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* bits/time64.h -- underlying types for __time64_t. Generic version.
Copyright (C) 2018-2025 Free Software Foundation, Inc.
Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, general case.
Copyright (C) 2018-2025 Free Software Foundation, Inc.
Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Sched parameter structure. Generic version.
Copyright (C) 1996-2025 Free Software Foundation, Inc.
Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Generic version.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Inline functions to return unsigned integer values unchanged.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Definitions of flag bits for `waitpid' et al.
Copyright (C) 1992-2025 Free Software Foundation, Inc.
Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Definitions of status bits for `wait' et al.
Copyright (C) 1992-2025 Free Software Foundation, Inc.
Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Definition of `errno' variable. Canonical version.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Special startup support.
Copyright (C) 1997-2025 Free Software Foundation, Inc.
Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* This file defines standard ELF types, structures, and macros.
Copyright (C) 1995-2025 Free Software Foundation, Inc.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -924,7 +924,7 @@ typedef struct
#define DT_SYMTAB_SHNDX 34 /* Address of SYMTAB_SHNDX section */
#define DT_RELRSZ 35 /* Total size of RELR relative relocations */
#define DT_RELR 36 /* Address of RELR relative relocations */
#define DT_RELRENT 37 /* Size of one RELR relative relocaction */
#define DT_RELRENT 37 /* Size of one RELR relative relocation */
#define DT_NUM 38 /* Number used */
#define DT_LOOS 0x6000000d /* Start of OS-specific */
#define DT_HIOS 0x6ffff000 /* End of OS-specific */

View file

@ -4,7 +4,7 @@
# ifndef _ISOMAC
#include <stackinfo.h>
#include <elf.h>
#undef __alloca

99
lib/libc/glibc/include/libc-diag.h vendored Normal file
View file

@ -0,0 +1,99 @@
/* Macros for controlling diagnostic output from the compiler.
Copyright (C) 2014-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#ifndef _LIBC_DIAG_H
#define _LIBC_DIAG_H 1
/* Ignore the value of an expression when a cast to void does not
suffice (in particular, for a call to a function declared with
attribute warn_unused_result). */
#define ignore_value(x) \
({ __typeof__ (x) __ignored_value = (x); (void) __ignored_value; })
/* The macros to control diagnostics are structured like this, rather
than a single macro that both pushes and pops diagnostic state and
takes the affected code as an argument, because the GCC pragmas
work by disabling the diagnostic for a range of source locations
and do not work when all the pragmas and the affected code are in a
single macro expansion. */
/* Push diagnostic state. */
#define DIAG_PUSH_NEEDS_COMMENT _Pragma ("GCC diagnostic push")
/* Pop diagnostic state. */
#define DIAG_POP_NEEDS_COMMENT _Pragma ("GCC diagnostic pop")
/* These macros are used to push/pop diagnostic states for warnings only
supported by clang. */
#ifdef __clang__
# define DIAG_PUSH_NEEDS_COMMENT_CLANG _Pragma ("clang diagnostic push")
# define DIAG_POP_NEEDS_COMMENT_CLANG _Pragma ("clang diagnostic pop")
#else
# define DIAG_PUSH_NEEDS_COMMENT_CLANG
# define DIAG_POP_NEEDS_COMMENT_CLANG
#endif
#define _DIAG_STR1(s) #s
#define _DIAG_STR(s) _DIAG_STR1(s)
/* Ignore the diagnostic OPTION. VERSION is the most recent GCC
version for which the diagnostic has been confirmed to appear in
the absence of the pragma (in the form MAJOR.MINOR for GCC 4.x,
just MAJOR for GCC 5 and later). Uses of this pragma should be
reviewed when the GCC version given is no longer supported for
building glibc; the version number should always be on the same
source line as the macro name, so such uses can be found with grep.
Uses should come with a comment giving more details of the
diagnostic, and an architecture on which it is seen if possibly
optimization-related and not in architecture-specific code. This
macro should only be used if the diagnostic seems hard to fix (for
example, optimization-related false positives). */
#define DIAG_IGNORE_NEEDS_COMMENT(version, option) \
_Pragma (_DIAG_STR (GCC diagnostic ignored option))
/* Similar to DIAG_IGNORE_NEEDS_COMMENT the following macro ignores the
diagnostic OPTION but only if optimizations for size are enabled.
This is required because different warnings may be generated for
different optimization levels. For example a key piece of code may
only generate a warning when compiled at -Os, but at -O2 you could
still want the warning to be enabled to catch errors. In this case
you would use DIAG_IGNORE_Os_NEEDS_COMMENT to disable the warning
only for -Os. */
#ifdef __OPTIMIZE_SIZE__
# define DIAG_IGNORE_Os_NEEDS_COMMENT(version, option) \
_Pragma (_DIAG_STR (GCC diagnostic ignored option))
#else
# define DIAG_IGNORE_Os_NEEDS_COMMENT(version, option)
#endif
/* Similar to DIAG_IGNORE_NEEDS_COMMENT, these macros should be used
to suppress warning supported by the specific compiler. */
#ifndef __clang__
# define DIAG_IGNORE_NEEDS_COMMENT_GCC(VERSION, WARNING) \
DIAG_IGNORE_NEEDS_COMMENT (VERSION, WARNING)
# define DIAG_IGNORE_Os_NEEDS_COMMENT_GCC(VERSION, WARNING) \
DIAG_IGNORE_Os_NEEDS_COMMENT (VERSION, WARNING)
# define DIAG_IGNORE_NEEDS_COMMENT_CLANG(version, option)
#else
# define DIAG_IGNORE_NEEDS_COMMENT_GCC(VERSION, WARNING)
# define DIAG_IGNORE_Os_NEEDS_COMMENT_GCC(VERSION, WARNING)
# define DIAG_IGNORE_NEEDS_COMMENT_CLANG(version, option) \
_Pragma (_DIAG_STR (clang diagnostic ignored option))
#endif
#endif /* libc-diag.h */

View file

@ -1,5 +1,5 @@
/* Miscellaneous definitions for both glibc build and test.
Copyright (C) 2024-2025 Free Software Foundation, Inc.
Copyright (C) 2024-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Helper macros for pointer arithmetic.
Copyright (C) 2012-2025 Free Software Foundation, Inc.
Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* Support macros for making weak and strong aliases for symbols,
and for using symbol sets and linker warnings with GNU ld.
Copyright (C) 1995-2025 Free Software Foundation, Inc.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -86,6 +86,7 @@
/* Obtain the definition of symbol_version_reference. */
#include <libc-symver.h>
#include <libc-diag.h>
/* When PIC is defined and SHARED isn't defined, we are building PIE
by default. */
@ -167,6 +168,16 @@
__attribute_copy__ (name);
#endif
/* Define a strong_alias for SHARED, or weak_alias otherwise. It is used to
avoid potential compiler warnings for weak alias indirection (when a weak
alias is always resolved to a symbol even if a weak definition also
exists). */
# ifdef SHARED
# define static_weak_alias(name, aliasname) strong_alias (name, aliasname)
# else
# define static_weak_alias(name, aliasname) weak_alias (name, aliasname)
# endif
/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
# define weak_extern(symbol) _weak_extern (weak symbol)
# define _weak_extern(expr) _Pragma (#expr)
@ -280,7 +291,7 @@ for linking")
/*
*/
#ifdef HAVE_GNU_RETAIN
@ -683,7 +694,10 @@ for linking")
# define __ifunc_args(type_name, name, expr, init, ...) \
extern __typeof (type_name) name __attribute__ \
((ifunc (#name "_ifunc"))); \
__ifunc_resolver (type_name, name, expr, init, static, __VA_ARGS__)
DIAG_PUSH_NEEDS_COMMENT_CLANG; \
DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wunused-function"); \
__ifunc_resolver (type_name, name, expr, init, static, __VA_ARGS__); \
DIAG_POP_NEEDS_COMMENT_CLANG;
# define __ifunc_args_hidden(type_name, name, expr, init, ...) \
__ifunc_args (type_name, name, expr, init, __VA_ARGS__)
@ -807,7 +821,7 @@ for linking")
#define libm_ifunc_init()
#define libm_ifunc(name, expr) \
__ifunc (name, name, expr, void, libm_ifunc_init)
/* These macros facilitate sharing source files with gnulib.
They are here instead of sys/cdefs.h because they should not be

View file

@ -8,14 +8,10 @@ extern int __pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
const pthread_barrierattr_t *__restrict
__attr, unsigned int __count)
__THROW __nonnull ((1));
#if PTHREAD_IN_LIBC
libc_hidden_proto (__pthread_barrier_init)
#endif
extern int __pthread_barrier_wait (pthread_barrier_t *__barrier)
__THROWNL __nonnull ((1));
#if PTHREAD_IN_LIBC
libc_hidden_proto (__pthread_barrier_wait)
#endif
/* This function is called to initialize the pthread library. */
extern void __pthread_initialize (void) __attribute__ ((weak));

View file

@ -1,5 +1,5 @@
/* Macros for defining Systemtap <sys/sdt.h> static probe points.
Copyright (C) 2012-2025 Free Software Foundation, Inc.
Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* statx-related definitions and declarations. Generic version.
Copyright (C) 2018-2025 Free Software Foundation, Inc.
Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Definition of struct __locale_struct and __locale_t.
Copyright (C) 1997-2025 Free Software Foundation, Inc.
Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Definition of locale_t.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
@ -438,10 +438,10 @@
*/
#endif
/* GCC and clang have various useful declarations that can be made with
the '__attribute__' syntax. All of the ways we use this do fine if
they are omitted for compilers that don't understand it. */
#if !(defined __GNUC__ || defined __clang__)
/* GCC, clang, and compatible compilers have various useful declarations
that can be made with the '__attribute__' syntax. All of the ways we use
this do fine if they are omitted for compilers that don't understand it. */
#if !(defined __GNUC__ || defined __clang__ || defined __TINYC__)
# define __attribute__(xyz) /* Ignore */
#endif
@ -606,14 +606,14 @@
# define __attribute_artificial__ /* Ignore */
#endif
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline
semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ or
__GNUC_GNU_INLINE__ is not a good enough check for gcc because gcc versions
older than 4.3 may define these macros and still not guarantee GNU inlining
semantics.
clang++ identifies itself as gcc-4.2, but has support for GNU inlining
semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
semantics, that can be checked for by using the __GNUC_STDC_INLINE__ and
__GNUC_GNU_INLINE__ macro definitions. */
#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
|| (defined __clang__ && (defined __GNUC_STDC_INLINE__ \
@ -828,6 +828,18 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
# define __HAVE_GENERIC_SELECTION 0
#endif
#if __HAVE_GENERIC_SELECTION
/* If PTR is a pointer to const, return CALL cast to type CTYPE,
otherwise return CALL. Pointers to types with non-const qualifiers
are not valid. This should not be defined for C++, as macros are
not an appropriate way of implementing such qualifier-generic
operations for C++. */
# define __glibc_const_generic(PTR, CTYPE, CALL) \
_Generic (0 ? (PTR) : (void *) 1, \
const void *: (CTYPE) (CALL), \
default: CALL)
#endif
#if __GNUC_PREREQ (10, 0)
/* Designates a 1-based positional argument ref-index of pointer type
that can be used to access size-index elements of the pointed-to

View file

@ -1,5 +1,5 @@
/* `fd_set' type and related macros, and `select'/`pselect' declarations.
Copyright (C) 1996-2025 Free Software Foundation, Inc.
Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
scheduling interface.
Copyright (C) 1996-2025 Free Software Foundation, Inc.
Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* bits/types.h -- definitions of __*_t types underlying *_t types.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Floating-point inline functions for stdlib.h.
Copyright (C) 2012-2025 Free Software Foundation, Inc.
Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
@ -35,6 +35,10 @@ __BEGIN_DECLS
#define _STDLIB_H 1
#if __GLIBC_USE (ISOC23)
# define __STDC_VERSION_STDLIB_H__ 202311L
#endif
#if (defined __USE_XOPEN || defined __USE_XOPEN2K8) && !defined _SYS_WAIT_H
/* XPG requires a few symbols from <sys/wait.h> being defined. */
# include <bits/waitflags.h>
@ -686,6 +690,24 @@ extern void *realloc (void *__ptr, size_t __size)
/* Free a block allocated by `malloc', `realloc' or `calloc'. */
extern void free (void *__ptr) __THROW;
#if __GLIBC_USE(ISOC23)
/* Free a block allocated by `malloc', `realloc' or `calloc' but not
`aligned_alloc', `memalign', `posix_memalign', `valloc' or
`pvalloc'. SIZE must be equal to the original requested size
provided to `malloc', `realloc' or `calloc'. For `calloc' SIZE is
NMEMB elements * SIZE bytes. It is forbidden to call `free_sized'
for allocations which the caller did not directly allocate but
must still deallocate, such as `strdup' or `strndup'. Instead
continue using `free` for these cases. */
extern void free_sized (void *__ptr, size_t __size) __THROW;
/* Free a block allocated by `aligned_alloc', `memalign' or
`posix_memalign'. ALIGNMENT and SIZE must be the same as the values
provided to `aligned_alloc', `memalign' or `posix_memalign'. */
extern void free_aligned_sized (void *__ptr, size_t __alignment, size_t __size)
__THROW;
#endif
#ifdef __USE_MISC
/* Re-allocate the previously allocated block in PTR, making the new
block large enough for NMEMB elements of SIZE bytes each. */
@ -965,6 +987,12 @@ extern void *bsearch (const void *__key, const void *__base,
# include <bits/stdlib-bsearch.h>
#endif
#if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
# define bsearch(KEY, BASE, NMEMB, SIZE, COMPAR) \
__glibc_const_generic (BASE, const void *, \
bsearch (KEY, BASE, NMEMB, SIZE, COMPAR))
#endif
/* Sort NMEMB elements of BASE, of SIZE bytes each,
using COMPAR to perform the comparisons. */
extern void qsort (void *__base, size_t __nmemb, size_t __size,
@ -1158,6 +1186,19 @@ extern int getloadavg (double __loadavg[], int __nelem)
extern int ttyslot (void) __THROW;
#endif
#if __GLIBC_USE (ISOC23)
# ifndef __cplusplus
# include <bits/types/once_flag.h>
/* Call function __FUNC exactly once, even if invoked from several threads.
All calls must be made with the same __FLAGS object. */
extern void call_once (once_flag *__flag, void (*__func)(void));
# endif /* !__cplusplus */
/* Return the alignment of P. */
extern size_t memalignment (const void *__p);
#endif
#include <bits/stdlib-float.h>
/* Define some macros helping to catch buffer overflows. */

View file

@ -1,5 +1,5 @@
/* Endian macros for string.h functions
Copyright (C) 1992-2025 Free Software Foundation, Inc.
Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.

View file

@ -1,5 +1,5 @@
/* Startup code for ARC.
Copyright (C) 2020-2025 Free Software Foundation, Inc.
Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Assembler macros for ARC.
Copyright (C) 2020-2025 Free Software Foundation, Inc.
Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Macros to test for CPU features on ARM. Generic ARM version.
Copyright (C) 2012-2025 Free Software Foundation, Inc.
Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Startup code for ARM & ELF
Copyright (C) 1995-2025 Free Software Foundation, Inc.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Assembler macros for ARM.
Copyright (C) 1997-2025 Free Software Foundation, Inc.
Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Startup code compliant to the ELF C-SKY ABIV2.
Copyright (C) 2018-2025 Free Software Foundation, Inc.
Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Assembler macros for C-SKY.
Copyright (C) 2018-2025 Free Software Foundation, Inc.
Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Configuration of lookup functions.
Copyright (C) 2000-2025 Free Software Foundation, Inc.
Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* System-specific settings for dynamic linker code. Generic version.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* Declarations and definitions of codes relating to the DWARF2 symbolic
debugging information format.
Copyright (C) 1992-2025 Free Software Foundation, Inc.
Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.

View file

@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. Stub version.
Copyright (C) 1996-2025 Free Software Foundation, Inc.
Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Symbol version management.
Copyright (C) 1995-2025 Free Software Foundation, Inc.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Single thread optimization, generic version.
Copyright (C) 2019-2025 Free Software Foundation, Inc.
Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -6,6 +6,22 @@ asm ("memmove = __GI_memmove");
asm ("memset = __GI_memset");
asm ("memcpy = __GI_memcpy");
/* clang might generate the internal fortfify calls when it is enabled,
through the buitintin. */
asm ("__vfprintf_chk = __GI___vfprintf_chk");
asm ("__vsprintf_chk = __GI___vsprintf_chk");
asm ("__vsyslog_chk = __GI___vsyslog_chk");
asm ("__memcpy_chk = __GI___memcpy_chk");
asm ("__memmove_chk = __GI___memmove_chk");
asm ("__memset_chk = __GI___memset_chk");
asm ("__mempcpy_chk = __GI___mempcpy_chk");
asm ("__stpcpy_chk = __GI___stpcpy_chk");
asm ("__strcpy_chk = __GI___strcpy_chk");
asm ("strcpy = __GI_strcpy");
asm ("strncpy = __GI_strncpy");
asm ("strcat = __GI_strcat");
asm ("strlen = __GI_strlen");
/* Some targets do not use __stack_chk_fail_local. In libc.so,
redirect __stack_chk_fail to a hidden reference
__stack_chk_fail_local, to avoid the PLT reference.

View file

@ -1,5 +1,5 @@
/* Generic asm macros used on many machines.
Copyright (C) 1991-2025 Free Software Foundation, Inc.
Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Definition for thread-local data handling. Generic version.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Pthread data structures. Generic version.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Common threading primitives definitions for both POSIX and C11.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Private libc-internal interface for mutex locks.
Copyright (C) 2015-2025 Free Software Foundation, Inc.
Copyright (C) 2015-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -20,7 +20,6 @@
#define _BITS_LIBC_LOCKP_H 1
#include <pthread.h>
#include <pthread-functions.h>
/* If we check for a weakly referenced symbol and then perform a
normal jump to it te code generated for some platforms in case of
@ -36,40 +35,6 @@
(FUNC != NULL ? FUNC ARGS : ELSE)
#endif
/* Call thread functions through the function pointer table. */
#if defined SHARED && IS_IN (libc)
# define PTFAVAIL(NAME) __libc_pthread_functions_init
# define __libc_ptf_call(FUNC, ARGS, ELSE) \
(__libc_pthread_functions_init ? PTHFCT_CALL (ptr_##FUNC, ARGS) : ELSE)
# define __libc_ptf_call_always(FUNC, ARGS) \
PTHFCT_CALL (ptr_##FUNC, ARGS)
#elif IS_IN (libpthread)
# define PTFAVAIL(NAME) 1
# define __libc_ptf_call(FUNC, ARGS, ELSE) \
FUNC ARGS
# define __libc_ptf_call_always(FUNC, ARGS) \
FUNC ARGS
#else
# define PTFAVAIL(NAME) (NAME != NULL)
# define __libc_ptf_call(FUNC, ARGS, ELSE) \
__libc_maybe_call (FUNC, ARGS, ELSE)
# define __libc_ptf_call_always(FUNC, ARGS) \
FUNC ARGS
#endif
/* Create thread-specific key. */
#define __libc_key_create(KEY, DESTRUCTOR) \
__libc_ptf_call (__pthread_key_create, (KEY, DESTRUCTOR), 1)
/* Get thread-specific data. */
#define __libc_getspecific(KEY) \
__libc_ptf_call (__pthread_getspecific, (KEY), NULL)
/* Set thread-specific data. */
#define __libc_setspecific(KEY, VALUE) \
__libc_ptf_call (__pthread_setspecific, (KEY, VALUE), 0)
/* Functions that are used by this file and are internal to the GNU C
library. */

View file

@ -1,5 +1,5 @@
/* Posix threads. Hurd version.
Copyright (C) 2000-2025 Free Software Foundation, Inc.
Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. Hurd i386 version.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Startup code compliant to the ELF i386 ABI.
Copyright (C) 1995-2025 Free Software Foundation, Inc.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Hacks needed for symbol manipulation. i386 version.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Assembler macros for i386.
Copyright (C) 1991-2025 Free Software Foundation, Inc.
Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Startup code compliant to the ELF LoongArch ABI.
Copyright (C) 2022-2025 Free Software Foundation, Inc.
Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Register Macro definitions
Copyright (C) 2022-2025 Free Software Foundation, Inc.
Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.

View file

@ -1,5 +1,5 @@
/* Assembler macros for Coldfire.
Copyright (C) 1998-2025 Free Software Foundation, Inc.
Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Assembler macros for m680x0.
Copyright (C) 2010-2025 Free Software Foundation, Inc.
Copyright (C) 2010-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2010-2025 Free Software Foundation, Inc.
/* Copyright (C) 2010-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Startup code compliant to the ELF m68k ABI.
Copyright (C) 1996-2025 Free Software Foundation, Inc.
Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Hacks needed for symbol manipulation. m68k version.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Assembler macros for m68k.
Copyright (C) 1998-2025 Free Software Foundation, Inc.
Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. Mach cthreads version.
Copyright (C) 1996-2025 Free Software Foundation, Inc.
Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1994-2025 Free Software Foundation, Inc.
/* Copyright (C) 1994-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Configuration of lookup functions. MIPS version.
Copyright (C) 2000-2025 Free Software Foundation, Inc.
Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

8
lib/libc/glibc/sysdeps/mips/isarev.h vendored Normal file
View file

@ -0,0 +1,8 @@
#ifndef _ISAREV_H
#define _ISAREV_H
#ifndef __mips_isa_rev
# define __mips_isa_rev 0
#endif
#endif

View file

@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. MIPS version.
Copyright (C) 2005-2025 Free Software Foundation, Inc.
Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Startup code compliant to the ELF Mips ABI.
Copyright (C) 1995-2025 Free Software Foundation, Inc.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Declaration of common pthread types for all architectures.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Common threading primitives definitions for both POSIX and C11.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -75,7 +75,7 @@ typedef struct __pthread_internal_slist
#include <bits/struct_mutex.h>
/* Arch-sepecific read-write lock definitions. A generic implementation is
/* Arch-specific read-write lock definitions. A generic implementation is
provided by struct_rwlock.h. If required, an architecture can override it
by defining:

View file

@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. NPTL version.
Copyright (C) 1996-2025 Free Software Foundation, Inc.
Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Private libc-internal interface for mutex locks. NPTL version.
Copyright (C) 1996-2025 Free Software Foundation, Inc.
Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -90,13 +90,6 @@ _Static_assert (LLL_LOCK_INITIALIZER == 0, "LLL_LOCK_INITIALIZER != 0");
(FUNC != NULL ? FUNC ARGS : ELSE)
#endif
/* All previously forwarded functions are now called directly (either
via local call in libc, or through a __export), but __libc_ptf_call
is still used in generic code shared with Hurd. */
#define PTFAVAIL(NAME) 1
#define __libc_ptf_call(FUNC, ARGS, ELSE) FUNC ARGS
#define __libc_ptf_call_always(FUNC, ARGS) FUNC ARGS
/* Initialize the named lock variable, leaving it in a consistent, unlocked
state. */
#define __libc_lock_init(NAME) ((void) ((NAME) = LLL_LOCK_INITIALIZER))

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Startup code for programs linked with GNU libc.
Copyright (C) 1998-2025 Free Software Foundation, Inc.
Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Hacks needed for symbol manipulation. powerpc version.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Assembly macros for 32-bit PowerPC.
Copyright (C) 1999-2025 Free Software Foundation, Inc.
Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Configuration of lookup functions. PowerPC64 version.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Startup code for programs linked with GNU libc. PowerPC64 version.
Copyright (C) 1998-2025 Free Software Foundation, Inc.
Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Assembly macros for 64-bit PowerPC.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. RISC-V version.
Copyright (C) 2011-2025 Free Software Foundation, Inc.
Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

Some files were not shown because too many files have changed in this diff Show more