Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glibc 2.41 #22695

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
64 changes: 26 additions & 38 deletions lib/libc/glibc/LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -165,44 +165,8 @@ The file if_ppp.h is under the following CMU license:
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The following license covers the files from Intel's "Highly Optimized
Mathematical Functions for Itanium" collection:

Intel License Agreement

Copyright (c) 2000, Intel Corporation

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

* The name of Intel Corporation may not be used to endorse or promote
products derived from this software without specific prior written
permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The files inet/getnameinfo.c and sysdeps/posix/getaddrinfo.c are copyright
(C) by Craig Metz and are distributed under the following license:
The files nss/getnameinfo.c and nss/getaddrinfo.c are copyright (C) by
Craig Metz and are distributed under the following license:

/* The Inner Net License, Version 2.00

Expand Down Expand Up @@ -410,3 +374,27 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Various files in sysdeps/ieee754/flt-32, taken from the CORE-MATH project
<https://core-math.gitlabpages.inria.fr/>, are distributed under the
following license:

Copyright (c) 2022-2024 Alexei Sibidanov. Paul Zimmermann.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Binary file modified lib/libc/glibc/abilists
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/byteswap.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Macros and inline functions to swap the order of bytes in integer values.
Copyright (C) 1997-2024 Free Software Foundation, Inc.
Copyright (C) 1997-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/floatn-common.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Macros to control TS 18661-3 glibc features where the same
definitions are appropriate for all platforms.
Copyright (C) 2017-2024 Free Software Foundation, Inc.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/libc-header-start.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Handle feature test macros at the start of a header.
Copyright (C) 2016-2024 Free Software Foundation, Inc.
Copyright (C) 2016-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/long-double.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Properties of long double type.
Copyright (C) 2016-2024 Free Software Foundation, Inc.
Copyright (C) 2016-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/select.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/signum-generic.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Signal number constants. Generic template.
Copyright (C) 1991-2024 Free Software Foundation, Inc.
Copyright (C) 1991-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/stat.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/stdint-intn.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Define intN_t types.
Copyright (C) 2017-2024 Free Software Foundation, Inc.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
22 changes: 10 additions & 12 deletions lib/libc/glibc/bits/stdlib-bsearch.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Perform binary search - inline version.
Copyright (C) 1991-2024 Free Software Foundation, Inc.
Copyright (C) 1991-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand All @@ -20,22 +20,14 @@ __extern_inline void *
bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
__compar_fn_t __compar)
{
size_t __l, __u, __idx;
const void *__p;
int __comparison;

__l = 0;
__u = __nmemb;
while (__l < __u)
while (__nmemb)
{
__idx = (__l + __u) / 2;
__p = (const void *) (((const char *) __base) + (__idx * __size));
__p = (const void *) (((const char *) __base) + ((__nmemb >> 1) * __size));
__comparison = (*__compar) (__key, __p);
if (__comparison < 0)
__u = __idx;
else if (__comparison > 0)
__l = __idx + 1;
else
if (__comparison == 0)
{
#if __GNUC_PREREQ(4, 6)
# pragma GCC diagnostic push
Expand All @@ -46,6 +38,12 @@ bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
# pragma GCC diagnostic pop
#endif
}
if (__comparison > 0)
{
__base = ((const char *) __p) + __size;
--__nmemb;
}
__nmemb >>= 1;
}

return NULL;
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/time64.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* bits/time64.h -- underlying types for __time64_t. Generic version.
Copyright (C) 2018-2024 Free Software Foundation, Inc.
Copyright (C) 2018-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/timesize.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, general case.
Copyright (C) 2018-2024 Free Software Foundation, Inc.
Copyright (C) 2018-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/types/struct_sched_param.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Sched parameter structure. Generic version.
Copyright (C) 1996-2024 Free Software Foundation, Inc.
Copyright (C) 1996-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/typesizes.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Generic version.
Copyright (C) 2002-2024 Free Software Foundation, Inc.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/uintn-identity.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Inline functions to return unsigned integer values unchanged.
Copyright (C) 2017-2024 Free Software Foundation, Inc.
Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/waitflags.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Definitions of flag bits for `waitpid' et al.
Copyright (C) 1992-2024 Free Software Foundation, Inc.
Copyright (C) 1992-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/bits/waitstatus.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Definitions of status bits for `wait' et al.
Copyright (C) 1992-2024 Free Software Foundation, Inc.
Copyright (C) 1992-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/csu/errno.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Definition of `errno' variable. Canonical version.
Copyright (C) 2002-2024 Free Software Foundation, Inc.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/csu/init.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Special startup support.
Copyright (C) 1997-2024 Free Software Foundation, Inc.
Copyright (C) 1997-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/debug/stack_chk_fail_local.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2005-2024 Free Software Foundation, Inc.
/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
5 changes: 4 additions & 1 deletion lib/libc/glibc/elf/elf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file defines standard ELF types, structures, and macros.
Copyright (C) 1995-2024 Free Software Foundation, Inc.
Copyright (C) 1995-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -797,6 +797,7 @@ typedef struct
#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
#define NT_X86_SHSTK 0x204 /* x86 SHSTK state */
#define NT_X86_XSAVE_LAYOUT 0x205 /* XSAVE layout description. */
#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */
#define NT_S390_TIMER 0x301 /* s390 timer register */
#define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */
Expand Down Expand Up @@ -835,6 +836,7 @@ typedef struct
#define NT_ARM_ZA 0x40c /* ARM SME ZA registers. */
#define NT_ARM_ZT 0x40d /* ARM SME ZT registers. */
#define NT_ARM_FPMR 0x40e /* ARM floating point mode register. */
#define NT_ARM_POE 0x40f /* ARM POE registers. */
#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
Expand Down Expand Up @@ -1389,6 +1391,7 @@ typedef struct

#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0)
#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC (1U << 1)
#define GNU_PROPERTY_AARCH64_FEATURE_1_GCS (1U << 2)

/* The x86 instruction sets indicated by the corresponding bits are
used in program. Their support in the hardware is optional. */
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/include/errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# define errno rtld_errno
extern int rtld_errno attribute_hidden;

# elif IS_IN_LIB && !IS_IN (rtld)
# elif IS_IN_LIB && !IS_IN (rtld) && !defined LIBC_NONSHARED

# undef errno
# if IS_IN (libc)
Expand Down
67 changes: 67 additions & 0 deletions lib/libc/glibc/include/libc-misc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/* Miscellaneous definitions for both glibc build and test.
Copyright (C) 2024-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */

#ifndef _INCLUDE_MISC_H
#define _INCLUDE_MISC_H

#include <config.h>

/* Add the compiler optimization to inhibit loop transformation to library
calls. This is used to avoid recursive calls in memset and memmove
default implementations in tests. */
#ifdef HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
# define inhibit_loop_to_libcall \
__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
#else
# define inhibit_loop_to_libcall
#endif

#ifdef HAVE_TEST_CC_INHIBIT_LOOP_TO_LIBCALL
# define test_cc_inhibit_loop_to_libcall \
__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
#else
# define test_cc_inhibit_loop_to_libcall
#endif

/* Used to disable stack protection in sensitive places, like ifunc
resolvers and early static TLS init. */
#ifdef __clang__
# define cc_inhibit_stack_protector \
__attribute__((no_stack_protector))
#else
# define cc_inhibit_stack_protector \
__attribute__ ((__optimize__ ("-fno-stack-protector")))
#endif

#if IS_IN (testsuite) || IS_IN (testsuite_internal)
# ifdef HAVE_TEST_CC_NO_STACK_PROTECTOR
# define test_inhibit_stack_protector cc_inhibit_stack_protector
# define inhibit_stack_protector cc_inhibit_stack_protector
# else
# define test_inhibit_stack_protector
# define inhibit_stack_protector
# endif
#else
# ifdef HAVE_CC_NO_STACK_PROTECTOR
# define inhibit_stack_protector cc_inhibit_stack_protector
# else
# define inhibit_stack_protector
# endif
#endif

#endif
2 changes: 1 addition & 1 deletion lib/libc/glibc/include/libc-pointer-arith.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Helper macros for pointer arithmetic.
Copyright (C) 2012-2024 Free Software Foundation, Inc.
Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand Down
Loading
Loading