authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-06-05 17:55:51-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-06-05 22:43:53-07:00
logad34de32a86306daa55bdec713bbefc4afacb5b8
tree800e76d53e19cc6928ec4ae38686ef0b050da9d9
parent53137050f8718c923983878904f5467446d28ba5

update glibc start files to 2.39

README file stays intact.

255 files changed, 550 insertions(+), 1767 deletions(-)

lib/libc/glibc/LICENSES+21
...@@ -389,3 +389,24 @@ Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>...@@ -389,3 +389,24 @@ Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>
389 You should have received a copy of the GNU Lesser General Public389 You should have received a copy of the GNU Lesser General Public
390 License along with this library; if not, see390 License along with this library; if not, see
391 <https://www.gnu.org/licenses/>. */391 <https://www.gnu.org/licenses/>. */
392
393Copyright (c) 1995 IBM Corporation
394
395Permission is hereby granted, free of charge, to any person obtaining
396a copy of this software and associated documentation files (the
397'Software'), to deal in the Software without restriction, including
398without limitation the rights to use, copy, modify, merge, publish,
399distribute, sublicense, and/or sell copies of the Software, and to
400permit persons to whom the Software is furnished to do so, subject to
401the following conditions:
402
403The above copyright notice and this permission notice shall be
404included in all copies or substantial portions of the Software.
405
406THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
407EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
408MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
409IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
410CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
411TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
412SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
lib/libc/glibc/bits/byteswap.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Macros and inline functions to swap the order of bytes in integer values.1/* Macros and inline functions to swap the order of bytes in integer values.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,6 +1,6 @@
1/* Macros to control TS 18661-3 glibc features where the same1/* Macros to control TS 18661-3 glibc features where the same
2 definitions are appropriate for all platforms.2 definitions are appropriate for all platforms.
3 Copyright (C) 2017-2023 Free Software Foundation, Inc.3 Copyright (C) 2017-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 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 @@...@@ -1,5 +1,5 @@
1/* Handle feature test macros at the start of a header.1/* Handle feature test macros at the start of a header.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.2 Copyright (C) 2016-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Properties of long double type.1/* Properties of long double type.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.2 Copyright (C) 2016-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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 @@...@@ -1,5 +1,5 @@
1/* Signal number constants. Generic template.1/* Signal number constants. Generic template.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.2 Copyright (C) 1991-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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 @@...@@ -1,5 +1,5 @@
1/* Define intN_t types.1/* Define intN_t types.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/stdlib-bsearch.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Perform binary search - inline version.1/* Perform binary search - inline version.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.2 Copyright (C) 1991-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/bits/time64.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* bits/time64.h -- underlying types for __time64_t. Generic version.1/* bits/time64.h -- underlying types for __time64_t. Generic version.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Bit size of the time_t type at glibc build time, general case.1/* Bit size of the time_t type at glibc build time, general case.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Sched parameter structure. Generic version.1/* Sched parameter structure. Generic version.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* bits/typesizes.h -- underlying types for *_t. Generic version.1/* bits/typesizes.h -- underlying types for *_t. Generic version.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Inline functions to return unsigned integer values unchanged.1/* Inline functions to return unsigned integer values unchanged.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Definitions of flag bits for `waitpid' et al.1/* Definitions of flag bits for `waitpid' et al.
2 Copyright (C) 1992-2023 Free Software Foundation, Inc.2 Copyright (C) 1992-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Definitions of status bits for `wait' et al.1/* Definitions of status bits for `wait' et al.
2 Copyright (C) 1992-2023 Free Software Foundation, Inc.2 Copyright (C) 1992-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Definition of `errno' variable. Canonical version.1/* Definition of `errno' variable. Canonical version.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.1/* Copyright (C) 2005-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/elf/elf.h+129-3
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* This file defines standard ELF types, structures, and macros.1/* This file defines standard ELF types, structures, and macros.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -791,9 +791,12 @@ typedef struct...@@ -791,9 +791,12 @@ typedef struct
791 Register */791 Register */
792#define NT_PPC_PKEY 0x110 /* Memory Protection Keys792#define NT_PPC_PKEY 0x110 /* Memory Protection Keys
793 registers. */793 registers. */
794#define NT_PPC_DEXCR 0x111 /* PowerPC DEXCR registers. */
795#define NT_PPC_HASHKEYR 0x112 /* PowerPC HASHKEYR register. */
794#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */796#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */
795#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */797#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
796#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */798#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
799#define NT_X86_SHSTK 0x204 /* x86 SHSTK state */
797#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */800#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */
798#define NT_S390_TIMER 0x301 /* s390 timer register */801#define NT_S390_TIMER 0x301 /* s390 timer register */
799#define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */802#define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */
...@@ -832,6 +835,8 @@ typedef struct...@@ -832,6 +835,8 @@ typedef struct
832#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */835#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
833#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */836#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
834#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers. */837#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers. */
838#define NT_RISCV_CSR 0x900 /* RISC-V Control and Status Registers */
839#define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */
835#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers. */840#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers. */
836#define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and841#define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and
837 status registers. */842 status registers. */
...@@ -841,6 +846,8 @@ typedef struct...@@ -841,6 +846,8 @@ typedef struct
841 SIMD Extension registers. */846 SIMD Extension registers. */
842#define NT_LOONGARCH_LBT 0xa04 /* LoongArch Loongson Binary847#define NT_LOONGARCH_LBT 0xa04 /* LoongArch Loongson Binary
843 Translation registers. */848 Translation registers. */
849#define NT_LOONGARCH_HW_BREAK 0xa05 /* LoongArch hardware breakpoint registers */
850#define NT_LOONGARCH_HW_WATCH 0xa06 /* LoongArch hardware watchpoint registers */
844851
845/* Legal values for the note segment descriptor types for object files. */852/* Legal values for the note segment descriptor types for object files. */
846853
...@@ -1685,11 +1692,25 @@ typedef struct...@@ -1685,11 +1692,25 @@ typedef struct
1685#define EF_MIPS_PIC 2 /* Contains PIC code. */1692#define EF_MIPS_PIC 2 /* Contains PIC code. */
1686#define EF_MIPS_CPIC 4 /* Uses PIC calling sequence. */1693#define EF_MIPS_CPIC 4 /* Uses PIC calling sequence. */
1687#define EF_MIPS_XGOT 81694#define EF_MIPS_XGOT 8
1688#define EF_MIPS_64BIT_WHIRL 161695#define EF_MIPS_UCODE 16
1689#define EF_MIPS_ABI2 321696#define EF_MIPS_ABI2 32
1690#define EF_MIPS_ABI_ON32 641697#define EF_MIPS_ABI_ON32 64
1698#define EF_MIPS_OPTIONS_FIRST 0x00000080 /* Process the .MIPS.options
1699 section first by ld. */
1700#define EF_MIPS_32BITMODE 0x00000100 /* Indicates code compiled for
1701 a 64-bit machine in 32-bit
1702 mode (regs are 32-bits
1703 wide). */
1691#define EF_MIPS_FP64 512 /* Uses FP64 (12 callee-saved). */1704#define EF_MIPS_FP64 512 /* Uses FP64 (12 callee-saved). */
1692#define EF_MIPS_NAN2008 1024 /* Uses IEEE 754-2008 NaN encoding. */1705#define EF_MIPS_NAN2008 1024 /* Uses IEEE 754-2008 NaN encoding. */
1706#define EF_MIPS_ARCH_ASE 0x0f000000 /* Architectural Extensions
1707 used by this file. */
1708#define EF_MIPS_ARCH_ASE_MDMX 0x08000000 /* Use MDMX multimedia
1709 extensions. */
1710#define EF_MIPS_ARCH_ASE_M16 0x04000000 /* Use MIPS-16 ISA
1711 extensions. */
1712#define EF_MIPS_ARCH_ASE_MICROMIPS 0x02000000 /* Use MICROMIPS ISA
1713 extensions. */
1693#define EF_MIPS_ARCH 0xf0000000 /* MIPS architecture level. */1714#define EF_MIPS_ARCH 0xf0000000 /* MIPS architecture level. */
16941715
1695/* Legal values for MIPS architecture level. */1716/* Legal values for MIPS architecture level. */
...@@ -1703,6 +1724,38 @@ typedef struct...@@ -1703,6 +1724,38 @@ typedef struct
1703#define EF_MIPS_ARCH_64 0x60000000 /* MIPS64 code. */1724#define EF_MIPS_ARCH_64 0x60000000 /* MIPS64 code. */
1704#define EF_MIPS_ARCH_32R2 0x70000000 /* MIPS32r2 code. */1725#define EF_MIPS_ARCH_32R2 0x70000000 /* MIPS32r2 code. */
1705#define EF_MIPS_ARCH_64R2 0x80000000 /* MIPS64r2 code. */1726#define EF_MIPS_ARCH_64R2 0x80000000 /* MIPS64r2 code. */
1727#define EF_MIPS_ARCH_32R6 0x90000000 /* MIPS32r6 code. */
1728#define EF_MIPS_ARCH_64R6 0xa0000000 /* MIPS64r6 code. */
1729#define EF_MIPS_ABI 0x0000F000 /* The ABI of the file. Also
1730 see EF_MIPS_ABI2 above. */
1731#define EF_MIPS_ABI_O32 0x00001000 /* The original o32 abi. */
1732#define EF_MIPS_ABI_O64 0x00002000 /* O32 extended to work on
1733 64 bit architectures. */
1734#define EF_MIPS_ABI_EABI32 0x00003000 /* EABI in 32 bit mode. */
1735#define EF_MIPS_ABI_EABI64 0x00004000 /* EABI in 64 bit mode. */
1736#define EF_MIPS_MACH 0x00FF0000
1737#define EF_MIPS_MACH_3900 0x00810000
1738#define EF_MIPS_MACH_4010 0x00820000
1739#define EF_MIPS_MACH_4100 0x00830000
1740#define EF_MIPS_MACH_ALLEGREX 0x00840000
1741#define EF_MIPS_MACH_4650 0x00850000
1742#define EF_MIPS_MACH_4120 0x00870000
1743#define EF_MIPS_MACH_4111 0x00880000
1744#define EF_MIPS_MACH_SB1 0x008a0000
1745#define EF_MIPS_MACH_OCTEON 0x008b0000
1746#define EF_MIPS_MACH_XLR 0x008c0000
1747#define EF_MIPS_MACH_OCTEON2 0x008d0000
1748#define EF_MIPS_MACH_OCTEON3 0x008e0000
1749#define EF_MIPS_MACH_5400 0x00910000
1750#define EF_MIPS_MACH_5900 0x00920000
1751#define EF_MIPS_MACH_IAMR2 0x00930000
1752#define EF_MIPS_MACH_5500 0x00980000
1753#define EF_MIPS_MACH_9000 0x00990000
1754#define EF_MIPS_MACH_LS2E 0x00A00000
1755#define EF_MIPS_MACH_LS2F 0x00A10000
1756#define EF_MIPS_MACH_GS464 0x00A20000
1757#define EF_MIPS_MACH_GS464E 0x00A30000
1758#define EF_MIPS_MACH_GS264E 0x00A40000
17061759
1707/* The following are unofficial names and should not be used. */1760/* The following are unofficial names and should not be used. */
17081761
...@@ -1763,6 +1816,7 @@ typedef struct...@@ -1763,6 +1816,7 @@ typedef struct
1763#define SHT_MIPS_EH_REGION 0x700000271816#define SHT_MIPS_EH_REGION 0x70000027
1764#define SHT_MIPS_XLATE_OLD 0x700000281817#define SHT_MIPS_XLATE_OLD 0x70000028
1765#define SHT_MIPS_PDR_EXCEPTION 0x700000291818#define SHT_MIPS_PDR_EXCEPTION 0x70000029
1819#define SHT_MIPS_ABIFLAGS 0x7000002a
1766#define SHT_MIPS_XHASH 0x7000002b1820#define SHT_MIPS_XHASH 0x7000002b
17671821
1768/* Legal values for sh_flags field of Elf32_Shdr. */1822/* Legal values for sh_flags field of Elf32_Shdr. */
...@@ -1931,10 +1985,68 @@ typedef struct...@@ -1931,10 +1985,68 @@ typedef struct
1931#define R_MIPS_TLS_TPREL_HI16 49 /* TP-relative offset, high 16 bits */1985#define R_MIPS_TLS_TPREL_HI16 49 /* TP-relative offset, high 16 bits */
1932#define R_MIPS_TLS_TPREL_LO16 50 /* TP-relative offset, low 16 bits */1986#define R_MIPS_TLS_TPREL_LO16 50 /* TP-relative offset, low 16 bits */
1933#define R_MIPS_GLOB_DAT 511987#define R_MIPS_GLOB_DAT 51
1988#define R_MIPS_PC21_S2 60
1989#define R_MIPS_PC26_S2 61
1990#define R_MIPS_PC18_S3 62
1991#define R_MIPS_PC19_S2 63
1992#define R_MIPS_PCHI16 64
1993#define R_MIPS_PCLO16 65
1994#define R_MIPS16_26 100
1995#define R_MIPS16_GPREL 101
1996#define R_MIPS16_GOT16 102
1997#define R_MIPS16_CALL16 103
1998#define R_MIPS16_HI16 104
1999#define R_MIPS16_LO16 105
2000#define R_MIPS16_TLS_GD 106
2001#define R_MIPS16_TLS_LDM 107
2002#define R_MIPS16_TLS_DTPREL_HI16 108
2003#define R_MIPS16_TLS_DTPREL_LO16 109
2004#define R_MIPS16_TLS_GOTTPREL 110
2005#define R_MIPS16_TLS_TPREL_HI16 111
2006#define R_MIPS16_TLS_TPREL_LO16 112
2007#define R_MIPS16_PC16_S1 113
1934#define R_MIPS_COPY 1262008#define R_MIPS_COPY 126
1935#define R_MIPS_JUMP_SLOT 1272009#define R_MIPS_JUMP_SLOT 127
2010#define R_MIPS_RELATIVE 128
2011#define R_MICROMIPS_26_S1 133
2012#define R_MICROMIPS_HI16 134
2013#define R_MICROMIPS_LO16 135
2014#define R_MICROMIPS_GPREL16 136
2015#define R_MICROMIPS_LITERAL 137
2016#define R_MICROMIPS_GOT16 138
2017#define R_MICROMIPS_PC7_S1 139
2018#define R_MICROMIPS_PC10_S1 140
2019#define R_MICROMIPS_PC16_S1 141
2020#define R_MICROMIPS_CALL16 142
2021#define R_MICROMIPS_GOT_DISP 145
2022#define R_MICROMIPS_GOT_PAGE 146
2023#define R_MICROMIPS_GOT_OFST 147
2024#define R_MICROMIPS_GOT_HI16 148
2025#define R_MICROMIPS_GOT_LO16 149
2026#define R_MICROMIPS_SUB 150
2027#define R_MICROMIPS_HIGHER 151
2028#define R_MICROMIPS_HIGHEST 152
2029#define R_MICROMIPS_CALL_HI16 153
2030#define R_MICROMIPS_CALL_LO16 154
2031#define R_MICROMIPS_SCN_DISP 155
2032#define R_MICROMIPS_JALR 156
2033#define R_MICROMIPS_HI0_LO16 157
2034#define R_MICROMIPS_TLS_GD 162
2035#define R_MICROMIPS_TLS_LDM 163
2036#define R_MICROMIPS_TLS_DTPREL_HI16 164
2037#define R_MICROMIPS_TLS_DTPREL_LO16 165
2038#define R_MICROMIPS_TLS_GOTTPREL 166
2039#define R_MICROMIPS_TLS_TPREL_HI16 169
2040#define R_MICROMIPS_TLS_TPREL_LO16 170
2041#define R_MICROMIPS_GPREL7_S2 172
2042#define R_MICROMIPS_PC23_S2 173
2043#define R_MIPS_PC32 248
2044#define R_MIPS_EH 249
2045#define R_MIPS_GNU_REL16_S2 250
2046#define R_MIPS_GNU_VTINHERIT 253
2047#define R_MIPS_GNU_VTENTRY 254
1936/* Keep this the last entry. */2048/* Keep this the last entry. */
1937#define R_MIPS_NUM 1282049#define R_MIPS_NUM 255
19382050
1939/* Legal values for p_type field of Elf32_Phdr. */2051/* Legal values for p_type field of Elf32_Phdr. */
19402052
...@@ -3527,6 +3639,11 @@ enum...@@ -3527,6 +3639,11 @@ enum
3527/* x86-64 sh_type values. */3639/* x86-64 sh_type values. */
3528#define SHT_X86_64_UNWIND 0x70000001 /* Unwind information. */3640#define SHT_X86_64_UNWIND 0x70000001 /* Unwind information. */
35293641
3642/* x86-64 d_tag values. */
3643#define DT_X86_64_PLT (DT_LOPROC + 0)
3644#define DT_X86_64_PLTSZ (DT_LOPROC + 1)
3645#define DT_X86_64_PLTENT (DT_LOPROC + 3)
3646#define DT_X86_64_NUM 4
35303647
3531/* AM33 relocations. */3648/* AM33 relocations. */
3532#define R_MN10300_NONE 0 /* No reloc. */3649#define R_MN10300_NONE 0 /* No reloc. */
...@@ -4205,6 +4322,15 @@ enum...@@ -4205,6 +4322,15 @@ enum
4205#define R_LARCH_TLS_GD_HI20 984322#define R_LARCH_TLS_GD_HI20 98
4206#define R_LARCH_32_PCREL 994323#define R_LARCH_32_PCREL 99
4207#define R_LARCH_RELAX 1004324#define R_LARCH_RELAX 100
4325#define R_LARCH_DELETE 101
4326#define R_LARCH_ALIGN 102
4327#define R_LARCH_PCREL20_S2 103
4328#define R_LARCH_CFA 104
4329#define R_LARCH_ADD6 105
4330#define R_LARCH_SUB6 106
4331#define R_LARCH_ADD_ULEB128 107
4332#define R_LARCH_SUB_ULEB128 108
4333#define R_LARCH_64_PCREL 109
42084334
4209/* ARC specific declarations. */4335/* ARC specific declarations. */
42104336
lib/libc/glibc/include/libc-pointer-arith.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Helper macros for pointer arithmetic.1/* Helper macros for pointer arithmetic.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/include/libc-symbols.h+3-13
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Support macros for making weak and strong aliases for symbols,1/* Support macros for making weak and strong aliases for symbols,
2 and for using symbol sets and linker warnings with GNU ld.2 and for using symbol sets and linker warnings with GNU ld.
3 Copyright (C) 1995-2023 Free Software Foundation, Inc.3 Copyright (C) 1995-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
...@@ -155,18 +155,6 @@...@@ -155,18 +155,6 @@
155 extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) \155 extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) \
156 __attribute_copy__ (name);156 __attribute_copy__ (name);
157157
158/* Zig patch. weak_hidden_alias was removed from glibc v2.36 (v2.37?), Zig
159 needs it for the v2.32 and earlier {f,l,}stat wrappers, so only include
160 in this header for 2.32 and earlier. */
161#if (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 32) || __GLIBC__ < 2
162# define weak_hidden_alias(name, aliasname) \
163 _weak_hidden_alias (name, aliasname)
164# define _weak_hidden_alias(name, aliasname) \
165 extern __typeof (name) aliasname \
166 __attribute__ ((weak, alias (#name), __visibility__ ("hidden"))) \
167 __attribute_copy__ (name);
168#endif
169
170/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */158/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
171# define weak_extern(symbol) _weak_extern (weak symbol)159# define weak_extern(symbol) _weak_extern (weak symbol)
172# define _weak_extern(expr) _Pragma (#expr)160# define _weak_extern(expr) _Pragma (#expr)
...@@ -612,8 +600,10 @@ for linking")...@@ -612,8 +600,10 @@ for linking")
612#endif600#endif
613601
614#if IS_IN (libmvec)602#if IS_IN (libmvec)
603# define libmvec_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
615# define libmvec_hidden_def(name) hidden_def (name)604# define libmvec_hidden_def(name) hidden_def (name)
616#else605#else
606# define libmvec_hidden_proto(name, attrs...)
617# define libmvec_hidden_def(name)607# define libmvec_hidden_def(name)
618#endif608#endif
619609
lib/libc/glibc/include/stap-probe.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Macros for defining Systemtap <sys/sdt.h> static probe points.1/* Macros for defining Systemtap <sys/sdt.h> static probe points.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/include/stdlib.h+3-7
...@@ -59,6 +59,8 @@ libc_hidden_proto (__isoc23_strtoull_l)...@@ -59,6 +59,8 @@ libc_hidden_proto (__isoc23_strtoull_l)
59 libc_hidden_proto. */59 libc_hidden_proto. */
60# undef strtol60# undef strtol
61# define strtol __isoc23_strtol61# define strtol __isoc23_strtol
62# undef atoi
63# define atoi(nptr) __isoc23_strtol(nptr, NULL, 10)
62# undef strtoul64# undef strtoul
63# define strtoul __isoc23_strtoul65# define strtoul __isoc23_strtoul
64# undef strtoll66# undef strtoll
...@@ -147,8 +149,6 @@ extern int __posix_openpt (int __oflag) attribute_hidden;...@@ -147,8 +149,6 @@ extern int __posix_openpt (int __oflag) attribute_hidden;
147extern int __add_to_environ (const char *name, const char *value,149extern int __add_to_environ (const char *name, const char *value,
148 const char *combines, int replace)150 const char *combines, int replace)
149 attribute_hidden;151 attribute_hidden;
150extern void _quicksort (void *const pbase, size_t total_elems,
151 size_t size, __compar_d_fn_t cmp, void *arg);
152152
153extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg);153extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg);
154154
...@@ -157,11 +157,7 @@ libc_hidden_proto (__cxa_atexit);...@@ -157,11 +157,7 @@ libc_hidden_proto (__cxa_atexit);
157157
158extern int __cxa_thread_atexit_impl (void (*func) (void *), void *arg,158extern int __cxa_thread_atexit_impl (void (*func) (void *), void *arg,
159 void *d);159 void *d);
160extern void __call_tls_dtors (void)160extern void __call_tls_dtors (void);
161#ifndef SHARED
162 __attribute__ ((weak))
163#endif
164 ;
165libc_hidden_proto (__call_tls_dtors)161libc_hidden_proto (__call_tls_dtors)
166162
167extern void __cxa_finalize (void *d);163extern void __cxa_finalize (void *d);
lib/libc/glibc/io/bits/statx.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* statx-related definitions and declarations. Generic version.1/* statx-related definitions and declarations. Generic version.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/io/fcntl.h+1-8
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -167,10 +167,6 @@ typedef __pid_t pid_t;...@@ -167,10 +167,6 @@ typedef __pid_t pid_t;
167 effective IDs, not real IDs. */167 effective IDs, not real IDs. */
168#endif168#endif
169169
170
171/* fcntl was a simple symbol until glibc 2.27 inclusive. glibc 2.28 onwards
172 * re-defines it to fcntl64 (via #define) if _FILE_OFFSET_BITS == 64. */
173#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 28) || __GLIBC__ > 2
174/* Do the file control operation described by CMD on FD.170/* Do the file control operation described by CMD on FD.
175 The remaining arguments are interpreted depending on CMD.171 The remaining arguments are interpreted depending on CMD.
176172
...@@ -201,9 +197,6 @@ extern int __fcntl_time64 (int __fd, int __request, ...) __THROW;...@@ -201,9 +197,6 @@ extern int __fcntl_time64 (int __fd, int __request, ...) __THROW;
201# define fcntl __fcntl_time64197# define fcntl __fcntl_time64
202# endif198# endif
203#endif199#endif
204#else /* glibc 2.27 or lower */
205extern int fcntl (int __fd, int __cmd, ...);
206#endif
207200
208/* Open FILE and return a new file descriptor for it, or -1 on error.201/* Open FILE and return a new file descriptor for it, or -1 on error.
209 OFLAG determines the type of access used. If O_CREAT or O_TMPFILE is set202 OFLAG determines the type of access used. If O_CREAT or O_TMPFILE is set
lib/libc/glibc/io/fstat-2.32.c deleted-55
...@@ -1,55 +0,0 @@
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
17
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
24 exception.
25
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
30
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, see
33 <https://www.gnu.org/licenses/>. */
34
35#include <sys/stat.h>
36
37/* This definition is only used if inlining fails for this function; see
38 the last page of <sys/stat.h>. The real work is done by the `x'
39 function which is passed a version number argument. We arrange in the
40 makefile that when not inlined this function is always statically
41 linked; that way a dynamically-linked executable always encodes the
42 version number corresponding to the data structures it uses, so the `x'
43 functions in the shared library can adapt without needing to recompile
44 all callers. */
45
46#undef fstat
47#undef __fstat
48int
49attribute_hidden
50__fstat (int fd, struct stat *buf)
51{
52 return __fxstat (_STAT_VER, fd, buf);
53}
54
55weak_hidden_alias (__fstat, fstat)
lib/libc/glibc/io/fstat64-2.32.c deleted-52
...@@ -1,52 +0,0 @@
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
17
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
24 exception.
25
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
30
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, see
33 <https://www.gnu.org/licenses/>. */
34
35#include <sys/stat.h>
36
37/* This definition is only used if inlining fails for this function; see
38 the last page of <sys/stat.h>. The real work is done by the `x'
39 function which is passed a version number argument. We arrange in the
40 makefile that when not inlined this function is always statically
41 linked; that way a dynamically-linked executable always encodes the
42 version number corresponding to the data structures it uses, so the `x'
43 functions in the shared library can adapt without needing to recompile
44 all callers. */
45
46#undef fstat64
47int
48attribute_hidden
49fstat64 (int fd, struct stat64 *buf)
50{
51 return __fxstat64 (_STAT_VER, fd, buf);
52}
lib/libc/glibc/io/fstatat-2.32.c deleted-52
...@@ -1,52 +0,0 @@
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
17
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
24 exception.
25
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
30
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, see
33 <https://www.gnu.org/licenses/>. */
34
35#include <sys/stat.h>
36
37/* This definition is only used if inlining fails for this function; see
38 the last page of <sys/stat.h>. The real work is done by the `x'
39 function which is passed a version number argument. We arrange in the
40 makefile that when not inlined this function is always statically
41 linked; that way a dynamically-linked executable always encodes the
42 version number corresponding to the data structures it uses, so the `x'
43 functions in the shared library can adapt without needing to recompile
44 all callers. */
45
46#undef fstatat
47int
48attribute_hidden
49fstatat (int fd, const char *file, struct stat *buf, int flag)
50{
51 return __fxstatat (_STAT_VER, fd, file, buf, flag);
52}
lib/libc/glibc/io/fstatat64-2.32.c deleted-52
...@@ -1,52 +0,0 @@
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
17
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
24 exception.
25
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
30
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, see
33 <https://www.gnu.org/licenses/>. */
34
35#include <sys/stat.h>
36
37/* This definition is only used if inlining fails for this function; see
38 the last page of <sys/stat.h>. The real work is done by the `x'
39 function which is passed a version number argument. We arrange in the
40 makefile that when not inlined this function is always statically
41 linked; that way a dynamically-linked executable always encodes the
42 version number corresponding to the data structures it uses, so the `x'
43 functions in the shared library can adapt without needing to recompile
44 all callers. */
45
46#undef fstatat64
47int
48attribute_hidden
49fstatat64 (int fd, const char *file, struct stat64 *buf, int flag)
50{
51 return __fxstatat64 (_STAT_VER, fd, file, buf, flag);
52}
lib/libc/glibc/io/lstat-2.32.c deleted-55
...@@ -1,55 +0,0 @@
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
17
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
24 exception.
25
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
30
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, see
33 <https://www.gnu.org/licenses/>. */
34
35#include <sys/stat.h>
36
37/* This definition is only used if inlining fails for this function; see
38 the last page of <sys/stat.h>. The real work is done by the `x'
39 function which is passed a version number argument. We arrange in the
40 makefile that when not inlined this function is always statically
41 linked; that way a dynamically-linked executable always encodes the
42 version number corresponding to the data structures it uses, so the `x'
43 functions in the shared library can adapt without needing to recompile
44 all callers. */
45
46#undef lstat
47#undef __lstat
48int
49attribute_hidden
50__lstat (const char *file, struct stat *buf)
51{
52 return __lxstat (_STAT_VER, file, buf);
53}
54
55weak_hidden_alias (__lstat, lstat)
lib/libc/glibc/io/lstat64-2.32.c deleted-52
...@@ -1,52 +0,0 @@
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
17
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
24 exception.
25
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
30
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, see
33 <https://www.gnu.org/licenses/>. */
34
35#include <sys/stat.h>
36
37/* This definition is only used if inlining fails for this function; see
38 the last page of <sys/stat.h>. The real work is done by the `x'
39 function which is passed a version number argument. We arrange in the
40 makefile that when not inlined this function is always statically
41 linked; that way a dynamically-linked executable always encodes the
42 version number corresponding to the data structures it uses, so the `x'
43 functions in the shared library can adapt without needing to recompile
44 all callers. */
45
46#undef lstat64
47int
48attribute_hidden
49lstat64 (const char *file, struct stat64 *buf)
50{
51 return __lxstat64 (_STAT_VER, file, buf);
52}
lib/libc/glibc/io/mknod-2.32.c deleted-55
...@@ -1,55 +0,0 @@
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
17
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
24 exception.
25
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
30
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, see
33 <https://www.gnu.org/licenses/>. */
34
35
36#include <sys/types.h>
37#include <sys/stat.h>
38
39/* This definition is only used if inlining fails for this function; see
40 the last page of <sys/stat.h>. The real work is done by the `x'
41 function which is passed a version number argument. We arrange in the
42 makefile that when not inlined this function is always statically
43 linked; that way a dynamically-linked executable always encodes the
44 version number corresponding to the data structures it uses, so the `x'
45 functions in the shared library can adapt without needing to recompile
46 all callers. */
47
48int
49attribute_hidden
50__mknod (const char *path, mode_t mode, dev_t dev)
51{
52 return __xmknod (_MKNOD_VER, path, mode, &dev);
53}
54
55weak_hidden_alias (__mknod, mknod)
lib/libc/glibc/io/mknod.c+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.1/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/io/mknodat-2.32.c deleted-53
...@@ -1,53 +0,0 @@
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
17
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
24 exception.
25
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
30
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, see
33 <https://www.gnu.org/licenses/>. */
34
35
36#include <sys/types.h>
37#include <sys/stat.h>
38
39/* This definition is only used if inlining fails for this function; see
40 the last page of <sys/stat.h>. The real work is done by the `x'
41 function which is passed a version number argument. We arrange in the
42 makefile that when not inlined this function is always statically
43 linked; that way a dynamically-linked executable always encodes the
44 version number corresponding to the data structures it uses, so the `x'
45 functions in the shared library can adapt without needing to recompile
46 all callers. */
47
48int
49attribute_hidden
50mknodat (int fd, const char *path, mode_t mode, dev_t dev)
51{
52 return __xmknodat (_MKNOD_VER, fd, path, mode, &dev);
53}
lib/libc/glibc/io/stat-2.32.c deleted-54
...@@ -1,54 +0,0 @@
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
17
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
24 exception.
25
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
30
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, see
33 <https://www.gnu.org/licenses/>. */
34
35#include <sys/stat.h>
36
37/* This definition is only used if inlining fails for this function; see
38 the last page of <sys/stat.h>. The real work is done by the `x'
39 function which is passed a version number argument. We arrange in the
40 makefile that when not inlined this function is always statically
41 linked; that way a dynamically-linked executable always encodes the
42 version number corresponding to the data structures it uses, so the `x'
43 functions in the shared library can adapt without needing to recompile
44 all callers. */
45
46#undef stat
47int
48attribute_hidden
49__stat (const char *file, struct stat *buf)
50{
51 return __xstat (_STAT_VER, file, buf);
52}
53
54weak_hidden_alias (__stat, stat)
lib/libc/glibc/io/stat64-2.32.c deleted-52
...@@ -1,52 +0,0 @@
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
17
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
24 exception.
25
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
30
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, see
33 <https://www.gnu.org/licenses/>. */
34
35#include <sys/stat.h>
36
37/* This definition is only used if inlining fails for this function; see
38 the last page of <sys/stat.h>. The real work is done by the `x'
39 function which is passed a version number argument. We arrange in the
40 makefile that when not inlined this function is always statically
41 linked; that way a dynamically-linked executable always encodes the
42 version number corresponding to the data structures it uses, so the `x'
43 functions in the shared library can adapt without needing to recompile
44 all callers. */
45
46#undef stat64
47int
48attribute_hidden
49stat64 (const char *file, struct stat64 *buf)
50{
51 return __xstat64 (_STAT_VER, file, buf);
52}
lib/libc/glibc/io/sys/stat.h+2-2
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -251,7 +251,7 @@ extern int __REDIRECT_NTH (fstat64, (int __fd, struct stat64 *__buf),...@@ -251,7 +251,7 @@ extern int __REDIRECT_NTH (fstat64, (int __fd, struct stat64 *__buf),
251 __nonnull ((2));251 __nonnull ((2));
252# else252# else
253# define stat64 __stat64_time64253# define stat64 __stat64_time64
254# define fstat64 __fstat64_time254# define fstat64 __fstat64_time64
255# endif255# endif
256# endif256# endif
257#endif257#endif
lib/libc/glibc/locale/bits/types/__locale_t.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Definition of struct __locale_struct and __locale_t.1/* Definition of struct __locale_struct and __locale_t.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Definition of locale_t.1/* Definition of locale_t.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 Copyright The GNU Toolchain Authors.2 Copyright The GNU Toolchain Authors.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
lib/libc/glibc/misc/sys/select.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* `fd_set' type and related macros, and `select'/`pselect' declarations.1/* `fd_set' type and related macros, and `select'/`pselect' declarations.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,6 +1,6 @@
1/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-19931/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
2 scheduling interface.2 scheduling interface.
3 Copyright (C) 1996-2023 Free Software Foundation, Inc.3 Copyright (C) 1996-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/posix/bits/types.h+2-2
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* bits/types.h -- definitions of __*_t types underlying *_t types.1/* bits/types.h -- definitions of __*_t types underlying *_t types.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -217,7 +217,7 @@ typedef int __sig_atomic_t;...@@ -217,7 +217,7 @@ typedef int __sig_atomic_t;
217/* Seconds since the Epoch, visible to user code when time_t is too217/* Seconds since the Epoch, visible to user code when time_t is too
218 narrow only for consistency with the old way of widening too-narrow218 narrow only for consistency with the old way of widening too-narrow
219 types. User code should never use __time64_t. */219 types. User code should never use __time64_t. */
220#if __TIMESIZE == 64220#if __TIMESIZE == 64 && defined __LIBC
221# define __time64_t __time_t221# define __time64_t __time_t
222#elif __TIMESIZE != 64222#elif __TIMESIZE != 64
223__STD_TYPE __TIME64_T_TYPE __time64_t;223__STD_TYPE __TIME64_T_TYPE __time64_t;
lib/libc/glibc/posix/sys/types.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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 @@...@@ -1,5 +1,5 @@
1/* Floating-point inline functions for stdlib.h.1/* Floating-point inline functions for stdlib.h.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/stdlib/stdlib.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 Copyright The GNU Toolchain Authors.2 Copyright The GNU Toolchain Authors.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
lib/libc/glibc/string/bits/endian.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Endian macros for string.h functions1/* Endian macros for string.h functions
2 Copyright (C) 1992-2023 Free Software Foundation, Inc.2 Copyright (C) 1992-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/aarch64/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for AArch64.1/* Special .init and .fini section support for AArch64.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
33
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
lib/libc/glibc/sysdeps/aarch64/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for AArch64.1/* Special .init and .fini section support for AArch64.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
33
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.1/* Copyright (C) 2002-2024 Free Software Foundation, Inc.
22
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
lib/libc/glibc/sysdeps/aarch64/start.S+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.1/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
22
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
lib/libc/glibc/sysdeps/aarch64/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
22
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
lib/libc/glibc/sysdeps/alpha/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for Alpha.1/* Special .init and .fini section support for Alpha.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/alpha/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for Alpha.1/* Special .init and .fini section support for Alpha.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/alpha/start.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Startup code for Alpha/ELF.1/* Startup code for Alpha/ELF.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.2 Copyright (C) 1993-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for ARC.1/* Assembler macros for ARC.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Macros to test for CPU features on ARM. Generic ARM version.1/* Macros to test for CPU features on ARM. Generic ARM version.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/arm/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for ARM.1/* Special .init and .fini section support for ARM.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/arm/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for ARM.1/* Special .init and .fini section support for ARM.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Startup code for ARM & ELF1/* Startup code for ARM & ELF
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for ARM.1/* Assembler macros for ARM.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for C-SKY.1/* Assembler macros for C-SKY.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Configuration of lookup functions.1/* Configuration of lookup functions.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* System-specific settings for dynamic linker code. Generic version.1/* System-specific settings for dynamic linker code. Generic version.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,6 +1,6 @@
1/* Declarations and definitions of codes relating to the DWARF2 symbolic1/* Declarations and definitions of codes relating to the DWARF2 symbolic
2 debugging information format.2 debugging information format.
3 Copyright (C) 1992-2023 Free Software Foundation, Inc.3 Copyright (C) 1992-2024 Free Software Foundation, Inc.
44
5 This file is part of the GNU C Library.5 This file is part of the GNU C Library.
66
lib/libc/glibc/sysdeps/generic/libc-lock.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* libc-internal interface for mutex locks. Stub version.1/* libc-internal interface for mutex locks. Stub version.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Symbol version management.1/* Symbol version management.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Single thread optimization, generic version.1/* Single thread optimization, generic version.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Generic asm macros used on many machines.1/* Generic asm macros used on many machines.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.2 Copyright (C) 1991-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Definition for thread-local data handling. Generic version.1/* Definition for thread-local data handling. Generic version.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/hppa/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for HPPA1/* Special .init and .fini section support for HPPA
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/hppa/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for HPPA1/* Special .init and .fini section support for HPPA
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.1/* Copyright (C) 2005-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/hppa/start.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* ELF startup code for HPPA.1/* ELF startup code for HPPA.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/hppa/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for HP/PA.1/* Assembler macros for HP/PA.
2 Copyright (C) 1999-2023 Free Software Foundation, Inc.2 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Pthread data structures. Generic version.1/* Pthread data structures. Generic version.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Common threading primitives definitions for both POSIX and C11.1/* Common threading primitives definitions for both POSIX and C11.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/htl/libc-lockP.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Private libc-internal interface for mutex locks.1/* Private libc-internal interface for mutex locks.
2 Copyright (C) 2015-2023 Free Software Foundation, Inc.2 Copyright (C) 2015-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/htl/pthread.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Posix threads. Hurd version.1/* Posix threads. Hurd version.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/i386/crti.S+1-3
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for x86.1/* Special .init and .fini section support for x86.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -61,7 +61,6 @@...@@ -61,7 +61,6 @@
61 .hidden _init61 .hidden _init
62 .type _init, @function62 .type _init, @function
63_init:63_init:
64 _CET_ENDBR
65 pushl %ebx64 pushl %ebx
66 /* Maintain 16-byte stack alignment for called functions. */65 /* Maintain 16-byte stack alignment for called functions. */
67 subl $8, %esp66 subl $8, %esp
...@@ -82,7 +81,6 @@ _init:...@@ -82,7 +81,6 @@ _init:
82 .hidden _fini81 .hidden _fini
83 .type _fini, @function82 .type _fini, @function
84_fini:83_fini:
85 _CET_ENDBR
86 pushl %ebx84 pushl %ebx
87 subl $8, %esp85 subl $8, %esp
88 LOAD_PIC_REG (bx)86 LOAD_PIC_REG (bx)
lib/libc/glibc/sysdeps/i386/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for x86.1/* Special .init and .fini section support for x86.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Machine-specific pthread type layouts. Hurd i386 version.1/* Machine-specific pthread type layouts. Hurd i386 version.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/i386/start.S+1-2
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Startup code compliant to the ELF i386 ABI.1/* Startup code compliant to the ELF i386 ABI.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -132,7 +132,6 @@ ENTRY (_start)...@@ -132,7 +132,6 @@ ENTRY (_start)
132132
133#if defined PIC && !defined SHARED133#if defined PIC && !defined SHARED
134__wrap_main:134__wrap_main:
135 _CET_ENDBR
136 jmp main@PLT135 jmp main@PLT
137#endif136#endif
138END (_start)137END (_start)
lib/libc/glibc/sysdeps/i386/symbol-hacks.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Hacks needed for symbol manipulation. i386 version.1/* Hacks needed for symbol manipulation. i386 version.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/i386/sysdep.h+12-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for i386.1/* Assembler macros for i386.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.2 Copyright (C) 1991-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -18,6 +18,8 @@...@@ -18,6 +18,8 @@
1818
19#include <sysdeps/x86/sysdep.h>19#include <sysdeps/x86/sysdep.h>
2020
21#define CET_ENABLED 0
22
21/* It is desirable that the names of PIC thunks match those used by23/* It is desirable that the names of PIC thunks match those used by
22 GCC so that multiple copies are eliminated by the linker. Because24 GCC so that multiple copies are eliminated by the linker. Because
23 GCC 4.6 and earlier use __i686 in the names, it is necessary to25 GCC 4.6 and earlier use __i686 in the names, it is necessary to
...@@ -37,6 +39,15 @@...@@ -37,6 +39,15 @@
3739
38/* Syntactic details of assembler. */40/* Syntactic details of assembler. */
3941
42/* Define an entry point visible from C. */
43#define ENTRY_P2ALIGN(name, alignment) \
44 .globl C_SYMBOL_NAME(name); \
45 .type C_SYMBOL_NAME(name),@function; \
46 .align ALIGNARG(alignment); \
47 C_LABEL(name) \
48 cfi_startproc; \
49 CALL_MCOUNT
50
40/* If compiled for profiling, call `mcount' at the start of each function. */51/* If compiled for profiling, call `mcount' at the start of each function. */
41#ifdef PROF52#ifdef PROF
42/* The mcount code relies on a normal frame pointer being on the stack53/* The mcount code relies on a normal frame pointer being on the stack
lib/libc/glibc/sysdeps/ia64/crti.S deleted-162
...@@ -1,162 +0,0 @@
1/* Special .init and .fini section support for IA64.
2 Copyright (C) 2000-2023 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 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41#include <libc-symbols.h>
42#include <sysdep.h>
43#undef ret
44
45#ifndef PREINIT_FUNCTION
46# define PREINIT_FUNCTION __gmon_start__
47#endif
48
49#ifndef PREINIT_FUNCTION_WEAK
50# define PREINIT_FUNCTION_WEAK 1
51#endif
52
53#if PREINIT_FUNCTION_WEAK
54 weak_extern (PREINIT_FUNCTION)
55#else
56 .hidden PREINIT_FUNCTION
57#endif
58
59/* If we have working .init_array support, we want to keep the .init
60 section empty (apart from the mandatory prologue/epilogue. This
61 ensures that the default unwind conventions (return-pointer in b0,
62 frame state in ar.pfs, etc.) will do the Right Thing. To ensure
63 an empty .init section, we register gmon_initializer() via the
64 .init_array.
65
66 --davidm 02/10/29 */
67
68#if PREINIT_FUNCTION_WEAK
69/* This blob of assembly code is one simple C function:
70
71static void
72__attribute__ ((used))
73gmon_initializer (void)
74{
75 extern void weak_function __gmon_start__ (void);
76
77 if (__gmon_start__)
78 (*__gmon_start__)();
79}
80 */
81 .text
82 .align 64
83 .proc gmon_initializer#
84gmon_initializer:
85 .prologue 12, 32
86 .mmi
87 .save ar.pfs, r33
88 alloc r33 = ar.pfs, 0, 3, 0, 0
89 addl r14 = @ltoff(@fptr(PREINIT_FUNCTION#)), gp
90 .save rp, r32
91 mov r32 = b0
92 .mmi
93 mov r34 = r1
94 .body
95 ;;
96 ld8 r14 = [r14]
97 nop 0
98 ;;
99 .mib
100 cmp.eq p6, p7 = 0, r14
101 nop 0
102 (p6) br.cond.spnt .L1
103 ;;
104 .mib
105 nop 0
106 nop 0
107 br.call.sptk.many b0 = PREINIT_FUNCTION#
108 ;;
109 .mmi
110 mov r1 = r34
111 nop 0
112 nop 0
113.L1:
114 .mii
115 nop 0
116 mov ar.pfs = r33
117 nop 0
118 ;;
119 .mib
120 nop 0
121 mov b0 = r32
122 br.ret.sptk.many b0
123 .endp gmon_initializer#
124# undef PREINIT_FUNCTION
125# define PREINIT_FUNCTION gmon_initializer
126#endif
127 .section .init_array, "aw"
128 data8 @fptr(PREINIT_FUNCTION)
129
130 .section .init,"ax",@progbits
131 .global _init#
132 .hidden _init#
133 .proc _init#
134_init:
135 .prologue
136 .save ar.pfs, r34
137 alloc r34 = ar.pfs, 0, 3, 0, 0
138 .vframe r32
139 mov r32 = r12
140 .save rp, r33
141 mov r33 = b0
142 .body
143 adds r12 = -16, r12
144 ;; /* see gmon_initializer() above */
145 .endp _init#
146
147 .section .fini,"ax",@progbits
148 .global _fini#
149 .hidden _fini#
150 .proc _fini#
151_fini:
152 .prologue
153 .save ar.pfs, r34
154 alloc r34 = ar.pfs, 0, 3, 0, 0
155 .vframe r32
156 mov r32 = r12
157 .save rp, r33
158 mov r33 = b0
159 .body
160 adds r12 = -16, r12
161 ;;
162 .endp _fini#
lib/libc/glibc/sysdeps/ia64/crtn.S deleted-69
...@@ -1,69 +0,0 @@
1/* Special .init and .fini section support for ARM.
2 Copyright (C) 2000-2023 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 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36#include <sysdep.h>
37#undef ret
38
39/* crtn.S puts function epilogues in the .init and .fini sections
40 corresponding to the prologues in crti.S. */
41
42 .section .init,"ax",@progbits
43 .proc _init#
44_init:
45 .prologue
46 .save ar.pfs, r34
47 .vframe r32
48 .save rp, r33
49 .body
50 .regstk 0,2,0,0
51 mov r12 = r32
52 mov ar.pfs = r34
53 mov b0 = r33
54 br.ret.sptk.many b0
55 .endp _init#
56
57 .section .fini,"ax",@progbits
58 .proc _fini#
59_fini:
60 .prologue
61 .save ar.pfs, r34
62 .vframe r32
63 .save rp, r33
64 .body
65 mov r12 = r32
66 mov ar.pfs = r34
67 mov b0 = r33
68 br.ret.sptk.many b0
69 .endp _fini#
lib/libc/glibc/sysdeps/ia64/dl-dtprocnum.h deleted-21
...@@ -1,21 +0,0 @@
1/* Configuration of lookup functions. IA-64 version.
2 Copyright (C) 2000-2023 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/* Number of extra dynamic section entries for this architecture. By
20 default there are none. */
21#define DT_THISPROCNUM DT_IA_64_NUM
lib/libc/glibc/sysdeps/ia64/entry.h deleted-8
...@@ -1,8 +0,0 @@
1#include <link.h>
2#include <dl-fptr.h>
3
4extern void _start (void);
5
6/* The function's entry point is stored in the first word of the
7 function descriptor (plabel) of _start(). */
8#define ENTRY_POINT ELF_PTR_TO_FDESC (_start)->ip
lib/libc/glibc/sysdeps/ia64/start.S deleted-112
...@@ -1,112 +0,0 @@
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
17
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
24 exception.
25
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
30
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, see
33 <https://www.gnu.org/licenses/>. */
34
35#include <sysdep.h>
36
37#include <asm/fpu.h>
38
39/*
40 * Arguments for __libc_start_main:
41 * out0: main
42 * out1: argc
43 * out2: argv
44 * out3: init
45 * out4: fini
46 * out5: rtld_fini
47 * out6: stack_end
48 */
49
50 .align 32
51 .global _start
52
53 .proc _start
54 .type _start,@function
55_start:
56 .prologue
57 .save rp, r0
58 .body
59 .prologue
60 { .mlx
61 alloc r2 = ar.pfs,0,0,7,0
62 movl r3 = FPSR_DEFAULT
63 }
64 { .mlx
65 adds out2 = 16, sp /* get address of argc value */
66 movl gp = @gprel(0f)
67 ;;
68 }
690: { .mmi
70 ld8 out1 = [out2], 8 /* load argc and move out2 to become argv */
71 mov.m r10 = ar.bsp /* fetch rbs base address */
72 mov r9 = ip
73 ;;
74 }
75 { .mii
76 mov ar.fpsr = r3
77 sub gp = r9, gp /* back-compute gp value */
78 adds out6 = 16, sp /* highest non-environment stack address */
79 ;;
80 }
81 {
82 addl r11 = @ltoff(__libc_ia64_register_backing_store_base), gp
83 addl out0 = @ltoff(@fptr(main)), gp
84 mov out3 = r0 /* Used to be init. */
85 ;;
86 }
87 { .mmi
88 ld8 r3 = [r11] /* pointer to __libc_ia64_register_backing_store_base */
89 ld8 out0 = [out0] /* pointer to `main' function descriptor */
90 mov out4 = r0 /* Used to be fini. */
91 ;;
92 }
93 .body
94 { .mib
95 st8 [r3] = r10
96 mov out5 = ret0 /* dynamic linker destructor */
97 br.call.sptk.few rp = __libc_start_main
98 }
99 { .mib
100 break 0 /* break miserably if we ever return */
101 }
102 .endp _start
103
104/* Define a symbol for the first piece of initialized data. */
105 .data
106 .globl __data_start
107__data_start:
108 .long 0
109 .weak data_start
110 data_start = __data_start
111
112 .common __libc_ia64_register_backing_store_base, 8, 8
lib/libc/glibc/sysdeps/ia64/sysdep.h deleted-61
...@@ -1,61 +0,0 @@
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#include <sysdeps/generic/sysdep.h>
19
20#ifdef __ASSEMBLER__
21
22/* Macros to help writing .prologue directives in assembly code. */
23#define ASM_UNW_PRLG_RP 0x8
24#define ASM_UNW_PRLG_PFS 0x4
25#define ASM_UNW_PRLG_PSP 0x2
26#define ASM_UNW_PRLG_PR 0x1
27#define ASM_UNW_PRLG_GRSAVE(ninputs) (32+(ninputs))
28
29#define ENTRY(name) \
30 .text; \
31 .align 32; \
32 .proc C_SYMBOL_NAME(name); \
33 .global C_SYMBOL_NAME(name); \
34 C_LABEL(name) \
35 CALL_MCOUNT
36
37#define LOCAL_ENTRY(name) \
38 .text; \
39 .align 32; \
40 .proc C_SYMBOL_NAME(name); \
41 C_LABEL(name) \
42 CALL_MCOUNT
43
44#define LEAF(name) \
45 .text; \
46 .align 32; \
47 .proc C_SYMBOL_NAME(name); \
48 .global name; \
49 C_LABEL(name)
50
51#define LOCAL_LEAF(name) \
52 .text; \
53 .align 32; \
54 .proc C_SYMBOL_NAME(name); \
55 C_LABEL(name)
56
57/* Mark the end of function SYM. */
58#undef END
59#define END(sym) .endp C_SYMBOL_NAME(sym)
60
61#endif /* ASSEMBLER */
lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for Coldfire.1/* Assembler macros for Coldfire.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.2 Copyright (C) 1998-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/m68k/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for m68k.1/* Special .init and .fini section support for m68k.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/m68k/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for m68k.1/* Special .init and .fini section support for m68k.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h+8-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for m680x0.1/* Assembler macros for m680x0.
2 Copyright (C) 2010-2023 Free Software Foundation, Inc.2 Copyright (C) 2010-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -37,3 +37,10 @@...@@ -37,3 +37,10 @@
37 OP " " SRC "(" PC "), " DST37 OP " " SRC "(" PC "), " DST
3838
39#endif /* __ASSEMBLER__ */39#endif /* __ASSEMBLER__ */
40
41# if defined __mc68020__ || defined __mc68030__ || defined __mc68040__ \
42 || defined __mc68060__
43# define M68K_SCALE_AVAILABLE 1
44# else
45# define M68K_SCALE_AVAILABLE 0
46# endif
lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2010-2023 Free Software Foundation, Inc.1/* Copyright (C) 2010-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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 @@...@@ -1,5 +1,5 @@
1/* Startup code compliant to the ELF m68k ABI.1/* Startup code compliant to the ELF m68k ABI.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Hacks needed for symbol manipulation. m68k version.1/* Hacks needed for symbol manipulation. m68k version.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for m68k.1/* Assembler macros for m68k.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.2 Copyright (C) 1998-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* libc-internal interface for mutex locks. Mach cthreads version.1/* libc-internal interface for mutex locks. Mach cthreads version.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mach/sysdep.h+1-8
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1994-2023 Free Software Foundation, Inc.1/* Copyright (C) 1994-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -56,13 +56,6 @@...@@ -56,13 +56,6 @@
56/* This is not used on all machines. */56/* This is not used on all machines. */
57#endif57#endif
5858
59/* Set variables ARGC, ARGV, and ENVP for the arguments
60 left on the stack by the microkernel. */
61#ifndef SNARF_ARGS
62#define SNARF_ARGS(argc, argv, envp)
63#error SNARF_ARGS not defined by sysdeps/mach/MACHINE/sysdep.h
64#endif
65
66/* LOSE can be defined as the `halt' instruction or something59/* LOSE can be defined as the `halt' instruction or something
67 similar which will cause the process to die in a characteristic60 similar which will cause the process to die in a characteristic
68 way suggesting a bug. */61 way suggesting a bug. */
lib/libc/glibc/sysdeps/microblaze/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for MicroBlaze.1/* Special .init and .fini section support for MicroBlaze.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/microblaze/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for MicroBlaze.1/* Special .init and .fini section support for MicroBlaze.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/microblaze/start.S+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.1/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
22
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
lib/libc/glibc/sysdeps/microblaze/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
22
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Configuration of lookup functions. MIPS version.1/* Configuration of lookup functions. MIPS version.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mips/mips32/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for MIPS (o32).1/* Special .init and .fini section support for MIPS (o32).
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mips/mips32/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for MIPS (o32).1/* Special .init and .fini section support for MIPS (o32).
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mips/mips64/n32/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for MIPS (n32).1/* Special .init and .fini section support for MIPS (n32).
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mips/mips64/n32/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for MIPS (n32).1/* Special .init and .fini section support for MIPS (n32).
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mips/mips64/n64/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for MIPS (n64).1/* Special .init and .fini section support for MIPS (n64).
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/mips/mips64/n64/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for MIPS (n64).1/* Special .init and .fini section support for MIPS (n64).
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Machine-specific pthread type layouts. MIPS version.1/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.2 Copyright (C) 2005-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Startup code compliant to the ELF Mips ABI.1/* Startup code compliant to the ELF Mips ABI.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/nios2/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for Nios II.1/* Assembler macros for Nios II.
2 Copyright (C) 2015-2023 Free Software Foundation, Inc.2 Copyright (C) 2015-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Declaration of common pthread types for all architectures.1/* Declaration of common pthread types for all architectures.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Common threading primitives definitions for both POSIX and C11.1/* Common threading primitives definitions for both POSIX and C11.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/nptl/libc-lock.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* libc-internal interface for mutex locks. NPTL version.1/* libc-internal interface for mutex locks. NPTL version.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Private libc-internal interface for mutex locks. NPTL version.1/* Private libc-internal interface for mutex locks. NPTL version.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/nptl/pthread.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.1/* Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc32/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for PowerPC.1/* Special .init and .fini section support for PowerPC.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc32/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for PowerPC.1/* Special .init and .fini section support for PowerPC.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Startup code for programs linked with GNU libc.1/* Startup code for programs linked with GNU libc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.2 Copyright (C) 1998-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Hacks needed for symbol manipulation. powerpc version.1/* Hacks needed for symbol manipulation. powerpc version.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembly macros for 32-bit PowerPC.1/* Assembly macros for 32-bit PowerPC.
2 Copyright (C) 1999-2023 Free Software Foundation, Inc.2 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc64/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for PowerPC64.1/* Special .init and .fini section support for PowerPC64.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc64/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for PowerPC64.1/* Special .init and .fini section support for PowerPC64.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Configuration of lookup functions. PowerPC64 version.1/* Configuration of lookup functions. PowerPC64 version.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Startup code for programs linked with GNU libc. PowerPC64 version.1/* Startup code for programs linked with GNU libc. PowerPC64 version.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.2 Copyright (C) 1998-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembly macros for 64-bit PowerPC.1/* Assembly macros for 64-bit PowerPC.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/powerpc/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.1/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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 @@...@@ -1,5 +1,5 @@
1/* Machine-specific pthread type layouts. RISC-V version.1/* Machine-specific pthread type layouts. RISC-V version.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.2 Copyright (C) 2011-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/riscv/start.S+12-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Startup code compliant to the ELF RISC-V ABI.1/* Startup code compliant to the ELF RISC-V ABI.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -50,7 +50,13 @@ ENTRY (ENTRY_POINT)...@@ -50,7 +50,13 @@ ENTRY (ENTRY_POINT)
50 call load_gp50 call load_gp
51 mv a5, a0 /* rtld_fini. */51 mv a5, a0 /* rtld_fini. */
52 /* main may be in a shared library. */52 /* main may be in a shared library. */
53#if defined PIC && !defined SHARED
54 /* Avoid relocation in static PIE since _start is called before it
55 is relocated. */
56 lla a0, __wrap_main
57#else
53 la a0, main58 la a0, main
59#endif
54 REG_L a1, 0(sp) /* argc. */60 REG_L a1, 0(sp) /* argc. */
55 addi a2, sp, SZREG /* argv. */61 addi a2, sp, SZREG /* argv. */
56 andi sp, sp, ALMASK /* Align stack. */62 andi sp, sp, ALMASK /* Align stack. */
...@@ -62,6 +68,11 @@ ENTRY (ENTRY_POINT)...@@ -62,6 +68,11 @@ ENTRY (ENTRY_POINT)
62 ebreak68 ebreak
63END (ENTRY_POINT)69END (ENTRY_POINT)
6470
71#if defined PIC && !defined SHARED
72__wrap_main:
73 tail main@plt
74#endif
75
65/* Dynamic links need the global pointer to be initialized prior to calling76/* Dynamic links need the global pointer to be initialized prior to calling
66 any shared library's initializers, so we use preinit_array to load it.77 any shared library's initializers, so we use preinit_array to load it.
67 This doesn't cut it for static links, though, since the global pointer78 This doesn't cut it for static links, though, since the global pointer
lib/libc/glibc/sysdeps/s390/s390-32/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for S/390.1/* Special .init and .fini section support for S/390.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/s390/s390-32/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for S/390.1/* Special .init and .fini section support for S/390.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/s390/s390-32/start.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Startup code compliant to the ELF s390 ABI.1/* Startup code compliant to the ELF s390 ABI.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/s390/s390-32/symbol-hacks.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Hacks needed for symbol manipulation. s390 version.1/* Hacks needed for symbol manipulation. s390 version.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/s390/s390-32/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for s390.1/* Assembler macros for s390.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/s390/s390-64/crti.S+2-2
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for 64 bit S/390.1/* Special .init and .fini section support for 64 bit S/390.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -85,7 +85,7 @@ _init:...@@ -85,7 +85,7 @@ _init:
85 .type _fini,@function85 .type _fini,@function
86_fini:86_fini:
87 stmg %r6,%r15,48(%r15)87 stmg %r6,%r15,48(%r15)
88 lgr %r1,%r1588 lg %r1,120(%r15)
89 aghi %r15,-16089 aghi %r15,-160
90 stg %r1,0(%r15)90 stg %r1,0(%r15)
91 larl %r12,_GLOBAL_OFFSET_TABLE_91 larl %r12,_GLOBAL_OFFSET_TABLE_
lib/libc/glibc/sysdeps/s390/s390-64/crtn.S+1-3
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for 64 bit S/390.1/* Special .init and .fini section support for 64 bit S/390.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -37,13 +37,11 @@...@@ -37,13 +37,11 @@
37 corresponding to the prologues in crti.S. */37 corresponding to the prologues in crti.S. */
3838
39 .section .init39 .section .init
40 .align 4
41 lg %r4,272(%r15)40 lg %r4,272(%r15)
42 lmg %r6,%r15,208(%r15)41 lmg %r6,%r15,208(%r15)
43 br %r442 br %r4
4443
45 .section .fini44 .section .fini
46 .align 4
47 lg %r4,272(%r15)45 lg %r4,272(%r15)
48 lmg %r6,%r15,208(%r15)46 lmg %r6,%r15,208(%r15)
49 br %r447 br %r4
lib/libc/glibc/sysdeps/s390/s390-64/start.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Startup code compliant to the 64 bit S/390 ELF ABI.1/* Startup code compliant to the 64 bit S/390 ELF ABI.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for 64 bit S/390.1/* Assembler macros for 64 bit S/390.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/sh/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for SH.1/* Special .init and .fini section support for SH.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/sh/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for SH.1/* Special .init and .fini section support for SH.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/sh/start.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Startup code for SH & ELF.1/* Startup code for SH & ELF.
2 Copyright (C) 1999-2023 Free Software Foundation, Inc.2 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/sh/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for SH.1/* Assembler macros for SH.
2 Copyright (C) 1999-2023 Free Software Foundation, Inc.2 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/sparc/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for sparc.1/* Special .init and .fini section support for sparc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/sparc/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for sparc.1/* Special .init and .fini section support for sparc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Configuration of lookup functions. SPARC version.1/* Configuration of lookup functions. SPARC version.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Startup code for elf32-sparc1/* Startup code for elf32-sparc
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Startup code for elf64-sparc1/* Startup code for elf64-sparc
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/sparc/sysdep.h+10-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2023 Free Software Foundation, Inc.1/* Copyright (C) 2011-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -76,6 +76,15 @@ C_LABEL(name) \...@@ -76,6 +76,15 @@ C_LABEL(name) \
76 cfi_endproc; \76 cfi_endproc; \
77 .size name, . - name77 .size name, . - name
7878
79#define ENTRY_NOCFI(name) \
80 .align 4; \
81 .global C_SYMBOL_NAME(name); \
82 .type name, @function; \
83C_LABEL(name)
84
85#define END_NOCFI(name) \
86 .size name, . - name
87
79#undef LOC88#undef LOC
80#define LOC(name) .L##name89#define LOC(name) .L##name
8190
lib/libc/glibc/sysdeps/unix/arm/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.1/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h+1-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number. AArch64 version.2 kernel version number. AArch64 version.
3 Copyright (C) 2018-2023 Free Software Foundation, Inc.3 Copyright (C) 2018-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 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,4 +1,4 @@
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.1/* Copyright (C) 1996-2024 Free Software Foundation, Inc.
22
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.1/* Copyright (C) 2005-2024 Free Software Foundation, Inc.
22
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version.1/* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/kernel-features.h+5-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number.2 kernel version number.
3 Copyright (C) 2010-2023 Free Software Foundation, Inc.3 Copyright (C) 2010-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
...@@ -50,4 +50,8 @@...@@ -50,4 +50,8 @@
50/* Alpha requires old sysvipc even being a 64-bit architecture. */50/* Alpha requires old sysvipc even being a 64-bit architecture. */
51#undef __ASSUME_SYSVIPC_DEFAULT_IPC_6451#undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
5252
53/* Alpha does not provide clone3. */
54#undef __ASSUME_CLONE3
55#define __ASSUME_CLONE3 0
56
53#endif /* _KERNEL_FEATURES_H */57#endif /* _KERNEL_FEATURES_H */
lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/arc/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for ARC.1/* Assembler macros for ARC.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number.2 kernel version number.
3 Copyright (C) 2006-2023 Free Software Foundation, Inc.3 Copyright (C) 2006-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 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,4 +1,4 @@
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.1/* Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h+2-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -362,6 +362,7 @@ __local_syscall_error: \...@@ -362,6 +362,7 @@ __local_syscall_error: \
362#define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime"362#define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime"
363#define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime64"363#define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime64"
364#define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"364#define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
365#define HAVE_CLONE3_WRAPPER 1
365366
366#define LOAD_ARGS_0()367#define LOAD_ARGS_0()
367#define ASM_ARGS_0368#define ASM_ARGS_0
lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.1/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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 @@...@@ -1,5 +1,5 @@
1/* Internal definitions for stat functions. Linux/csky.1/* Internal definitions for stat functions. Linux/csky.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.2 Copyright (C) 2011-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Assembly macros for C-SKY.1/* Assembly macros for C-SKY.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* System-specific settings for dynamic linker code. Linux version.1/* System-specific settings for dynamic linker code. Linux version.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.2 Copyright (C) 2005-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Get file status. Linux version.1/* Get file status. Linux version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/fstat64.c+39-3
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Get file status. Linux version.1/* Get file status. Linux version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -19,20 +19,56 @@...@@ -19,20 +19,56 @@
19#define __fstat __redirect___fstat19#define __fstat __redirect___fstat
20#define fstat __redirect_fstat20#define fstat __redirect_fstat
21#include <sys/stat.h>21#include <sys/stat.h>
22#undef __fstat
23#undef fstat
22#include <fcntl.h>24#include <fcntl.h>
23#include <kernel_stat.h>25#include <internal-stat.h>
24#include <stat_t64_cp.h>
25#include <errno.h>26#include <errno.h>
2627
27int28int
28__fstat64_time64 (int fd, struct __stat64_t64 *buf)29__fstat64_time64 (int fd, struct __stat64_t64 *buf)
29{30{
31#if !FSTATAT_USE_STATX
32# if XSTAT_IS_XSTAT64
33 /* The __NR_stat macro is defined for all ABIs that also define
34 XSTAT_IS_STAT64, so to correctly identify alpha and sparc check
35 __NR_newfstatat (similar to what fstatat64 does). */
36# ifdef __NR_newfstatat
37 /* 64-bit kABI, e.g. aarch64, ia64, powerpc64*, s390x, riscv64, and
38 x86_64. */
39 return INLINE_SYSCALL_CALL (fstat, fd, buf);
40# elif defined __NR_fstat64
41# if STAT64_IS_KERNEL_STAT64
42 /* 64-bit kABI outlier, e.g. alpha */
43 return INLINE_SYSCALL_CALL (fstat64, fd, buf);
44# else
45 /* 64-bit kABI outlier, e.g. sparc64. */
46 struct kernel_stat64 kst64;
47 int r = INLINE_SYSCALL_CALL (fstat64, fd, &kst64);
48 if (r == 0)
49 __cp_stat64_kstat64 (buf, &kst64);
50 return r;
51# endif /* STAT64_IS_KERNEL_STAT64 */
52# endif
53# else /* XSTAT_IS_XSTAT64 */
54 /* 64-bit kabi outlier, e.g. mips64 and mips64-n32. */
55 struct kernel_stat kst;
56 int r = INLINE_SYSCALL_CALL (fstat, fd, &kst);
57 if (r == 0)
58 __cp_kstat_stat64_t64 (&kst, buf);
59 return r;
60# endif
61#else /* !FSTATAT_USE_STATX */
62 /* 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,
64 and sparc32. */
30 if (fd < 0)65 if (fd < 0)
31 {66 {
32 __set_errno (EBADF);67 __set_errno (EBADF);
33 return -1;68 return -1;
34 }69 }
35 return __fstatat64_time64 (fd, "", buf, AT_EMPTY_PATH);70 return __fstatat64_time64 (fd, "", buf, AT_EMPTY_PATH);
71#endif
36}72}
37#if __TIMESIZE != 6473#if __TIMESIZE != 64
38hidden_def (__fstat64_time64)74hidden_def (__fstat64_time64)
lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat.c+1-22
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Get file status. Linux version.1/* Get file status. Linux version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -16,32 +16,11 @@...@@ -16,32 +16,11 @@
16 License along with the GNU C Library; if not, see16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1818
19#include <inttypes.h>
20#include <sys/stat.h>19#include <sys/stat.h>
21#include <kernel_stat.h>20#include <kernel_stat.h>
22#include <sysdep.h>21#include <sysdep.h>
23#include <string.h>
2422
25#if !XSTAT_IS_XSTAT6423#if !XSTAT_IS_XSTAT64
26
27static inline bool
28in_time_t_range (__time64_t t)
29{
30 time_t s = t;
31 return s == t;
32}
33
34static inline struct timespec
35valid_timespec64_to_timespec (const struct __timespec64 ts64)
36{
37 struct timespec ts;
38
39 ts.tv_sec = (time_t) ts64.tv_sec;
40 ts.tv_nsec = ts64.tv_nsec;
41
42 return ts;
43}
44
45int24int
46__fstatat (int fd, const char *file, struct stat *buf, int flag)25__fstatat (int fd, const char *file, struct stat *buf, int flag)
47{26{
lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat64.c+18-26
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Get file status. Linux version.1/* Get file status. Linux version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -18,22 +18,27 @@...@@ -18,22 +18,27 @@
1818
19#define __fstatat __redirect___fstatat19#define __fstatat __redirect___fstatat
20#define fstatat __redirect_fstatat20#define fstatat __redirect_fstatat
21#include <inttypes.h>
22#include <sys/stat.h>21#include <sys/stat.h>
23#include <fcntl.h>22#include <fcntl.h>
24#include <string.h>23#include <string.h>
25#include <kernel_stat.h>
26#include <sysdep.h>24#include <sysdep.h>
27#include <time.h>25#include <time.h>
28#include <kstat_cp.h>
29#include <stat_t64_cp.h>
30#include <sys/sysmacros.h>26#include <sys/sysmacros.h>
27#include <internal-stat.h>
28
29#if __TIMESIZE == 64 \
30 && (__WORDSIZE == 32 \
31 && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32))
32/* Sanity check to avoid newer 32-bit ABI to support non-LFS calls. */
33_Static_assert (sizeof (__off_t) == sizeof (__off64_t),
34 "__blkcnt_t and __blkcnt64_t must match");
35_Static_assert (sizeof (__ino_t) == sizeof (__ino64_t),
36 "__blkcnt_t and __blkcnt64_t must match");
37_Static_assert (sizeof (__blkcnt_t) == sizeof (__blkcnt64_t),
38 "__blkcnt_t and __blkcnt64_t must match");
39#endif
3140
32#if (__WORDSIZE == 32 \41#if FSTATAT_USE_STATX
33 && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \
34 || defined STAT_HAS_TIME32 \
35 || (!defined __NR_newfstatat && !defined __NR_fstatat64)
36# define FSTATAT_USE_STATX 1
3742
38static inline int43static inline int
39fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf,44fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf,
...@@ -48,8 +53,8 @@ fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf,...@@ -48,8 +53,8 @@ fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf,
48 return r;53 return r;
4954
50 *buf = (struct __stat64_t64) {55 *buf = (struct __stat64_t64) {
51 .st_dev = gnu_dev_makedev (tmp.stx_dev_major, tmp.stx_dev_minor),56 .st_dev = __gnu_dev_makedev (tmp.stx_dev_major, tmp.stx_dev_minor),
52 .st_rdev = gnu_dev_makedev (tmp.stx_rdev_major, tmp.stx_rdev_minor),57 .st_rdev = __gnu_dev_makedev (tmp.stx_rdev_major, tmp.stx_rdev_minor),
53 .st_ino = tmp.stx_ino,58 .st_ino = tmp.stx_ino,
54 .st_mode = tmp.stx_mode,59 .st_mode = tmp.stx_mode,
55 .st_nlink = tmp.stx_nlink,60 .st_nlink = tmp.stx_nlink,
...@@ -68,24 +73,11 @@ fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf,...@@ -68,24 +73,11 @@ fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf,
6873
69 return r;74 return r;
70}75}
71#else
72# define FSTATAT_USE_STATX 0
73#endif76#endif
7477
75/* Only statx supports 64-bit timestamps for 32-bit architectures with78/* Only statx supports 64-bit timestamps for 32-bit architectures with
76 __ASSUME_STATX, so there is no point in building the fallback. */79 __ASSUME_STATX, so there is no point in building the fallback. */
77#if !FSTATAT_USE_STATX || (FSTATAT_USE_STATX && !defined __ASSUME_STATX)80#if !FSTATAT_USE_STATX || (FSTATAT_USE_STATX && !defined __ASSUME_STATX)
78static inline struct __timespec64
79valid_timespec_to_timespec64 (const struct timespec ts)
80{
81 struct __timespec64 ts64;
82
83 ts64.tv_sec = ts.tv_sec;
84 ts64.tv_nsec = ts.tv_nsec;
85
86 return ts64;
87}
88
89static inline int81static inline int
90fstatat64_time64_stat (int fd, const char *file, struct __stat64_t64 *buf,82fstatat64_time64_stat (int fd, const char *file, struct __stat64_t64 *buf,
91 int flag)83 int flag)
...@@ -94,7 +86,7 @@ fstatat64_time64_stat (int fd, const char *file, struct __stat64_t64 *buf,...@@ -94,7 +86,7 @@ fstatat64_time64_stat (int fd, const char *file, struct __stat64_t64 *buf,
9486
95#if XSTAT_IS_XSTAT6487#if XSTAT_IS_XSTAT64
96# ifdef __NR_newfstatat88# ifdef __NR_newfstatat
97 /* 64-bit kABI, e.g. aarch64, ia64, powerpc64*, s390x, riscv64, and89 /* 64-bit kABI, e.g. aarch64, powerpc64*, s390x, riscv64, and
98 x86_64. */90 x86_64. */
99 r = INTERNAL_SYSCALL_CALL (newfstatat, fd, file, buf, flag);91 r = INTERNAL_SYSCALL_CALL (newfstatat, fd, file, buf, flag);
100# elif defined __NR_fstatat6492# elif defined __NR_fstatat64
lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/kernel-features.h+1-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number.2 kernel version number.
3 Copyright (C) 2006-2023 Free Software Foundation, Inc.3 Copyright (C) 2006-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for PA-RISC.1/* Assembler macros for PA-RISC.
2 Copyright (C) 1999-2023 Free Software Foundation, Inc.2 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* System-specific settings for dynamic linker code. i386 version.1/* System-specific settings for dynamic linker code. i386 version.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number. i386 version.2 kernel version number. i386 version.
3 Copyright (C) 1999-2023 Free Software Foundation, Inc.3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h+1-6
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -446,9 +446,4 @@ struct libc_do_syscall_args...@@ -446,9 +446,4 @@ struct libc_do_syscall_args
446446
447#endif /* __ASSEMBLER__ */447#endif /* __ASSEMBLER__ */
448448
449/* Each shadow stack slot takes 4 bytes. Assuming that each stack
450 frame takes 128 bytes, this is used to compute shadow stack size
451 from stack size. */
452#define STACK_SIZE_TO_SHADOW_STACK_SIZE_SHIFT 5
453
454#endif /* linux/i386/sysdep.h */449#endif /* linux/i386/sysdep.h */
lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h deleted-51
...@@ -1,51 +0,0 @@
1/* System-specific settings for dynamic linker code. IA-64 version.
2 Copyright (C) 2003-2023 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 _LINUX_IA64_DL_SYSDEP_H
20#define _LINUX_IA64_DL_SYSDEP_H 1
21
22#include_next <dl-sysdep.h>
23
24/* Traditionally system calls have been made using break 0x100000. A
25 second method was introduced which, if possible, will use the EPC
26 instruction. To signal the presence and where to find the code the
27 kernel passes an AT_SYSINFO_EHDR pointer in the auxiliary vector to
28 the application. */
29#define NEED_DL_SYSINFO 1
30#define USE_DL_SYSINFO 1
31
32#ifndef __ASSEMBLER__
33/* Don't declare this as a function---we want it's entry-point, not
34 it's function descriptor... */
35extern int _dl_sysinfo_break attribute_hidden;
36# define DL_SYSINFO_DEFAULT ((uintptr_t) &_dl_sysinfo_break)
37# define DL_SYSINFO_IMPLEMENTATION \
38 asm (".text\n\t" \
39 ".hidden _dl_sysinfo_break\n\t" \
40 ".proc _dl_sysinfo_break\n\t" \
41 "_dl_sysinfo_break:\n\t" \
42 ".prologue\n\t" \
43 ".altrp b6\n\t" \
44 ".body\n\t" \
45 "break 0x100000;\n\t" \
46 "br.ret.sptk.many b6;\n\t" \
47 ".endp _dl_sysinfo_break\n\t" \
48 ".previous");
49#endif
50
51#endif /* dl-sysdep.h */
lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/kernel-features.h deleted-37
...@@ -1,37 +0,0 @@
1/* Set flags signalling availability of kernel features based on given
2 kernel version number.
3 Copyright (C) 2010-2023 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library. If not, see
18 <https://www.gnu.org/licenses/>. */
19
20#ifndef _KERNEL_FEATURES_H
21#define _KERNEL_FEATURES_H 1
22
23#include_next <kernel-features.h>
24
25#define __ASSUME_RECV_SYSCALL 1
26#define __ASSUME_SEND_SYSCALL 1
27#define __ASSUME_ACCEPT4_SYSCALL 1
28
29/* Support for statx was added in 5.1. */
30#if __LINUX_KERNEL_VERSION < 0x050100
31# undef __ASSUME_STATX
32#endif
33
34#undef __ASSUME_CLONE_DEFAULT
35#define __ASSUME_CLONE2
36
37#endif /* _KERNEL_FEATURES_H */
lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/sysdep.h deleted-327
...@@ -1,327 +0,0 @@
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _LINUX_IA64_SYSDEP_H
19#define _LINUX_IA64_SYSDEP_H 1
20
21#include <sysdeps/unix/sysdep.h>
22#include <sysdeps/unix/sysv/linux/sysdep.h>
23#include <sysdeps/ia64/sysdep.h>
24#include <dl-sysdep.h>
25#include <tls.h>
26#include <asm/break.h>
27
28/* In order to get __set_errno() definition in INLINE_SYSCALL. */
29#ifndef __ASSEMBLER__
30#include <errno.h>
31#endif
32
33/* As of GAS v2.4.90.0.7, including a ".align" directive inside a
34 function will cause bad unwind info to be emitted (GAS doesn't know
35 how to account for the padding introduced by the .align directive).
36 Turning on this macro will work around this bug by introducing the
37 necessary padding explicitly. */
38#define GAS_ALIGN_BREAKS_UNWIND_INFO
39
40/* For Linux we can use the system call table in the header file
41 /usr/include/asm/unistd.h
42 of the kernel. But these symbols do not follow the SYS_* syntax
43 so we have to redefine the `SYS_ify' macro here. */
44#undef SYS_ify
45#define SYS_ify(syscall_name) __NR_##syscall_name
46
47#ifndef IA64_USE_NEW_STUB
48# if defined USE_DL_SYSINFO && IS_IN (libc)
49# define IA64_USE_NEW_STUB 1
50# else
51# define IA64_USE_NEW_STUB 0
52# endif
53#endif
54#if IA64_USE_NEW_STUB && !USE_DL_SYSINFO
55# error IA64_USE_NEW_STUB needs USE_DL_SYSINFO
56#endif
57
58#ifdef __ASSEMBLER__
59
60#undef CALL_MCOUNT
61#ifdef PROF
62# define CALL_MCOUNT \
63 .data; \
641: data8 0; /* XXX fixme: use .xdata8 once labels work */ \
65 .previous; \
66 .prologue; \
67 .save ar.pfs, r40; \
68 alloc out0 = ar.pfs, 8, 0, 4, 0; \
69 mov out1 = gp; \
70 .save rp, out2; \
71 mov out2 = rp; \
72 .body; \
73 ;; \
74 addl out3 = @ltoff(1b), gp; \
75 br.call.sptk.many rp = _mcount \
76 ;;
77#else
78# define CALL_MCOUNT /* Do nothing. */
79#endif
80
81/* Linux uses a negative return value to indicate syscall errors, unlike
82 most Unices, which use the condition codes' carry flag.
83
84 Since version 2.1 the return value of a system call might be negative
85 even if the call succeeded. E.g., the `lseek' system call might return
86 a large offset. Therefore we must not anymore test for < 0, but test
87 for a real error by making sure the value in %d0 is a real error
88 number. Linus said he will make sure the no syscall returns a value
89 in -1 .. -4095 as a valid result so we can safely test with -4095. */
90
91/* We don't want the label for the error handler to be visible in the symbol
92 table when we define it here. */
93#undef SYSCALL_ERROR_LABEL
94#define SYSCALL_ERROR_LABEL __syscall_error
95
96#undef PSEUDO
97#define PSEUDO(name, syscall_name, args) \
98 ENTRY(name) \
99 DO_CALL (SYS_ify(syscall_name)); \
100 cmp.eq p6,p0=-1,r10; \
101(p6) br.cond.spnt.few __syscall_error;
102
103#define DO_CALL_VIA_BREAK(num) \
104 mov r15=num; \
105 break __IA64_BREAK_SYSCALL
106
107#if IA64_USE_NEW_STUB
108# ifdef SHARED
109# define DO_CALL(num) \
110 .prologue; \
111 adds r2 = SYSINFO_OFFSET, r13;; \
112 ld8 r2 = [r2]; \
113 .save ar.pfs, r11; \
114 mov r11 = ar.pfs;; \
115 .body; \
116 mov r15 = num; \
117 mov b7 = r2; \
118 br.call.sptk.many b6 = b7;; \
119 .restore sp; \
120 mov ar.pfs = r11; \
121 .prologue; \
122 .body
123# else /* !SHARED */
124# define DO_CALL(num) \
125 .prologue; \
126 mov r15 = num; \
127 movl r2 = _dl_sysinfo;; \
128 ld8 r2 = [r2]; \
129 .save ar.pfs, r11; \
130 mov r11 = ar.pfs;; \
131 .body; \
132 mov b7 = r2; \
133 br.call.sptk.many b6 = b7;; \
134 .restore sp; \
135 mov ar.pfs = r11; \
136 .prologue; \
137 .body
138# endif
139#else
140# define DO_CALL(num) DO_CALL_VIA_BREAK(num)
141#endif
142
143#undef PSEUDO_END
144#define PSEUDO_END(name) .endp C_SYMBOL_NAME(name);
145
146#undef PSEUDO_NOERRNO
147#define PSEUDO_NOERRNO(name, syscall_name, args) \
148 ENTRY(name) \
149 DO_CALL (SYS_ify(syscall_name));
150
151#undef PSEUDO_END_NOERRNO
152#define PSEUDO_END_NOERRNO(name) .endp C_SYMBOL_NAME(name);
153
154#undef PSEUDO_ERRVAL
155#define PSEUDO_ERRVAL(name, syscall_name, args) \
156 ENTRY(name) \
157 DO_CALL (SYS_ify(syscall_name)); \
158 cmp.eq p6,p0=-1,r10; \
159(p6) mov r10=r8;
160
161
162#undef PSEUDO_END_ERRVAL
163#define PSEUDO_END_ERRVAL(name) .endp C_SYMBOL_NAME(name);
164
165#undef END
166#define END(name) \
167 .size C_SYMBOL_NAME(name), . - C_SYMBOL_NAME(name) ; \
168 .endp C_SYMBOL_NAME(name)
169
170#define ret br.ret.sptk.few b0
171#define ret_NOERRNO ret
172#define ret_ERRVAL ret
173
174#else /* not __ASSEMBLER__ */
175
176#undef HAVE_INTERNAL_BRK_ADDR_SYMBOL
177#define HAVE_INTERNAL_BRK_ADDR_SYMBOL 1
178
179#define BREAK_INSN_1(num) "break " #num ";;\n\t"
180#define BREAK_INSN(num) BREAK_INSN_1(num)
181
182/* On IA-64 we have stacked registers for passing arguments. The
183 "out" registers end up being the called function's "in"
184 registers.
185
186 Also, since we have plenty of registers we have two return values
187 from a syscall. r10 is set to -1 on error, whilst r8 contains the
188 (non-negative) errno on error or the return value on success.
189 */
190
191#if IA64_USE_NEW_STUB
192
193# define INTERNAL_SYSCALL_NCS(name, nr, args...) \
194({ \
195 LOAD_ARGS_##nr (args) \
196 register long _r8 __asm ("r8"); \
197 register long _r10 __asm ("r10"); \
198 register long _r15 __asm ("r15") = name; \
199 register void *_b7 __asm ("b7") = ((tcbhead_t *)__thread_self)->__private;\
200 LOAD_REGS_##nr \
201 /* \
202 * Don't specify any unwind info here. We mark ar.pfs as \
203 * clobbered. This will force the compiler to save ar.pfs \
204 * somewhere and emit appropriate unwind info for that save. \
205 */ \
206 __asm __volatile ("br.call.sptk.many b6=%0;;\n" \
207 : "=b"(_b7), "=r" (_r8), "=r" (_r10), "=r" (_r15) \
208 ASM_OUTARGS_##nr \
209 : "0" (_b7), "3" (_r15) ASM_ARGS_##nr \
210 : "memory", "ar.pfs" ASM_CLOBBERS_##nr); \
211 _r10 == -1 ? -_r8 : _r8; \
212})
213
214#else /* !IA64_USE_NEW_STUB */
215
216# define INTERNAL_SYSCALL_NCS(name, nr, args...) \
217({ \
218 LOAD_ARGS_##nr (args) \
219 register long _r8 asm ("r8"); \
220 register long _r10 asm ("r10"); \
221 register long _r15 asm ("r15") = name; \
222 LOAD_REGS_##nr \
223 __asm __volatile (BREAK_INSN (__IA64_BREAK_SYSCALL) \
224 : "=r" (_r8), "=r" (_r10), "=r" (_r15) \
225 ASM_OUTARGS_##nr \
226 : "2" (_r15) ASM_ARGS_##nr \
227 : "memory" ASM_CLOBBERS_##nr); \
228 _r10 == -1 ? -_r8 : _r8; \
229})
230
231#endif /* !IA64_USE_NEW_STUB */
232
233#define INTERNAL_SYSCALL(name, nr, args...) \
234 INTERNAL_SYSCALL_NCS (__NR_##name, nr, ##args)
235
236#define LOAD_ARGS_0()
237#define LOAD_REGS_0
238#define LOAD_ARGS_1(a1) \
239 long _arg1 = (long) (a1); \
240 LOAD_ARGS_0 ()
241#define LOAD_REGS_1 \
242 register long _out0 asm ("out0") = _arg1; \
243 LOAD_REGS_0
244#define LOAD_ARGS_2(a1, a2) \
245 long _arg2 = (long) (a2); \
246 LOAD_ARGS_1 (a1)
247#define LOAD_REGS_2 \
248 register long _out1 asm ("out1") = _arg2; \
249 LOAD_REGS_1
250#define LOAD_ARGS_3(a1, a2, a3) \
251 long _arg3 = (long) (a3); \
252 LOAD_ARGS_2 (a1, a2)
253#define LOAD_REGS_3 \
254 register long _out2 asm ("out2") = _arg3; \
255 LOAD_REGS_2
256#define LOAD_ARGS_4(a1, a2, a3, a4) \
257 long _arg4 = (long) (a4); \
258 LOAD_ARGS_3 (a1, a2, a3)
259#define LOAD_REGS_4 \
260 register long _out3 asm ("out3") = _arg4; \
261 LOAD_REGS_3
262#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \
263 long _arg5 = (long) (a5); \
264 LOAD_ARGS_4 (a1, a2, a3, a4)
265#define LOAD_REGS_5 \
266 register long _out4 asm ("out4") = _arg5; \
267 LOAD_REGS_4
268#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \
269 long _arg6 = (long) (a6); \
270 LOAD_ARGS_5 (a1, a2, a3, a4, a5)
271#define LOAD_REGS_6 \
272 register long _out5 asm ("out5") = _arg6; \
273 LOAD_REGS_5
274
275#define ASM_OUTARGS_0
276#define ASM_OUTARGS_1 ASM_OUTARGS_0, "=r" (_out0)
277#define ASM_OUTARGS_2 ASM_OUTARGS_1, "=r" (_out1)
278#define ASM_OUTARGS_3 ASM_OUTARGS_2, "=r" (_out2)
279#define ASM_OUTARGS_4 ASM_OUTARGS_3, "=r" (_out3)
280#define ASM_OUTARGS_5 ASM_OUTARGS_4, "=r" (_out4)
281#define ASM_OUTARGS_6 ASM_OUTARGS_5, "=r" (_out5)
282
283#if IA64_USE_NEW_STUB
284#define ASM_ARGS_0
285#define ASM_ARGS_1 ASM_ARGS_0, "4" (_out0)
286#define ASM_ARGS_2 ASM_ARGS_1, "5" (_out1)
287#define ASM_ARGS_3 ASM_ARGS_2, "6" (_out2)
288#define ASM_ARGS_4 ASM_ARGS_3, "7" (_out3)
289#define ASM_ARGS_5 ASM_ARGS_4, "8" (_out4)
290#define ASM_ARGS_6 ASM_ARGS_5, "9" (_out5)
291#else
292#define ASM_ARGS_0
293#define ASM_ARGS_1 ASM_ARGS_0, "3" (_out0)
294#define ASM_ARGS_2 ASM_ARGS_1, "4" (_out1)
295#define ASM_ARGS_3 ASM_ARGS_2, "5" (_out2)
296#define ASM_ARGS_4 ASM_ARGS_3, "6" (_out3)
297#define ASM_ARGS_5 ASM_ARGS_4, "7" (_out4)
298#define ASM_ARGS_6 ASM_ARGS_5, "8" (_out5)
299#endif
300
301#define ASM_CLOBBERS_0 ASM_CLOBBERS_1, "out0"
302#define ASM_CLOBBERS_1 ASM_CLOBBERS_2, "out1"
303#define ASM_CLOBBERS_2 ASM_CLOBBERS_3, "out2"
304#define ASM_CLOBBERS_3 ASM_CLOBBERS_4, "out3"
305#define ASM_CLOBBERS_4 ASM_CLOBBERS_5, "out4"
306#define ASM_CLOBBERS_5 ASM_CLOBBERS_6, "out5"
307#define ASM_CLOBBERS_6_COMMON , "out6", "out7", \
308 /* Non-stacked integer registers, minus r8, r10, r15. */ \
309 "r2", "r3", "r9", "r11", "r13", "r14", "r16", "r17", "r18", \
310 "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", \
311 "r28", "r29", "r30", "r31", \
312 /* Predicate registers. */ \
313 "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", \
314 /* Non-rotating fp registers. */ \
315 "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
316 /* Branch registers. */ \
317 "b6"
318
319#if IA64_USE_NEW_STUB
320# define ASM_CLOBBERS_6 ASM_CLOBBERS_6_COMMON
321#else
322# define ASM_CLOBBERS_6 ASM_CLOBBERS_6_COMMON , "b7"
323#endif
324
325#endif /* not __ASSEMBLER__ */
326
327#endif /* linux/ia64/sysdep.h */
lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Internal declarations for sys/timex.h.1/* Internal declarations for sys/timex.h.
2 Copyright (C) 2014-2023 Free Software Foundation, Inc.2 Copyright (C) 2014-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h+10-5
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number.2 kernel version number.
3 Copyright (C) 1999-2023 Free Software Foundation, Inc.3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
...@@ -46,7 +46,7 @@...@@ -46,7 +46,7 @@
46#define __ASSUME_STATFS64 146#define __ASSUME_STATFS64 1
4747
48/* pselect/ppoll were introduced just after 2.6.16-rc1. On x86_64 and48/* pselect/ppoll were introduced just after 2.6.16-rc1. On x86_64 and
49 SH this appeared first in 2.6.19-rc1, on ia64 in 2.6.22-rc1. */49 SH this appeared first in 2.6.19-rc1. */
50#define __ASSUME_PSELECT 150#define __ASSUME_PSELECT 1
5151
52/* Support for inter-process robust mutexes was added in 2.6.17 (but52/* Support for inter-process robust mutexes was added in 2.6.17 (but
...@@ -146,8 +146,6 @@...@@ -146,8 +146,6 @@
146 unsigned long tls)146 unsigned long tls)
147147
148 The fourth variant is intended to be used as the default for newer ports,148 The fourth variant is intended to be used as the default for newer ports,
149 Also IA64 uses the third variant but with __NR_clone2 instead of
150 __NR_clone.
151149
152 The macros names to define the variant used for the architecture is150 The macros names to define the variant used for the architecture is
153 similar to kernel:151 similar to kernel:
...@@ -156,7 +154,6 @@...@@ -156,7 +154,6 @@
156 - __ASSUME_CLONE_BACKWARDS2: for variant 2 (s390).154 - __ASSUME_CLONE_BACKWARDS2: for variant 2 (s390).
157 - __ASSUME_CLONE_BACKWARDS3: for variant 3 (microblaze).155 - __ASSUME_CLONE_BACKWARDS3: for variant 3 (microblaze).
158 - __ASSUME_CLONE_DEFAULT: for variant 4.156 - __ASSUME_CLONE_DEFAULT: for variant 4.
159 - __ASSUME_CLONE2: for clone2 with variant 3 (ia64).
160 */157 */
161158
162#define __ASSUME_CLONE_DEFAULT 1159#define __ASSUME_CLONE_DEFAULT 1
...@@ -252,4 +249,12 @@...@@ -252,4 +249,12 @@
252# define __ASSUME_CLONE3 0249# define __ASSUME_CLONE3 0
253#endif250#endif
254251
252/* The fchmodat2 system call was introduced across all architectures
253 in Linux 6.6. */
254#if __LINUX_KERNEL_VERSION >= 0x060600
255# define __ASSUME_FCHMODAT2 1
256#else
257# define __ASSUME_FCHMODAT2 0
258#endif
259
255#endif /* kernel-features.h */260#endif /* kernel-features.h */
lib/libc/glibc/sysdeps/unix/sysv/linux/kernel_stat.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Internal definitions for stat functions.1/* Internal definitions for stat functions.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/lstat.c+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Get file status. Linux version.1/* Get file status. Linux version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Get file status.1/* Get file status.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.2 Copyright (C) 1996-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 2010-2023 Free Software Foundation, Inc.1/* Copyright (C) 2010-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number.2 kernel version number.
3 Copyright (C) 2008-2023 Free Software Foundation, Inc.3 Copyright (C) 2008-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 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,4 +1,4 @@
1/* Copyright (C) 2010-2023 Free Software Foundation, Inc.1/* Copyright (C) 2010-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.1/* Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/kernel-features.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2023 Free Software Foundation, Inc.1/* Copyright (C) 2011-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/kernel_stat.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Definition of `struct stat' used in the kernel1/* Definition of `struct stat' used in the kernel
2 Copyright (C) 2013-2023 Free Software Foundation, Inc.2 Copyright (C) 2013-2024 Free Software Foundation, Inc.
33
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.1/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
22
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h+1-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number.2 kernel version number.
3 Copyright (C) 1999-2023 Free Software Foundation, Inc.3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.1/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/kstat_cp.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Struct stat/stat64 to stat/stat64 conversion for Linux.1/* Struct stat/stat64 to stat/stat64 conversion for Linux.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.1/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/sysdep.h+3-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Syscall definitions, Linux MIPS generic version.1/* Syscall definitions, Linux MIPS generic version.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -28,3 +28,5 @@...@@ -28,3 +28,5 @@
28#endif28#endif
29#define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"29#define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
30#define HAVE_CLOCK_GETRES_VSYSCALL "__vdso_clock_getres"30#define HAVE_CLOCK_GETRES_VSYSCALL "__vdso_clock_getres"
31
32#define HAVE_CLONE3_WRAPPER 1
lib/libc/glibc/sysdeps/unix/sysv/linux/mknodat.c+1-2
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Create a special or ordinary file. Linux version.1/* Create a special or ordinary file. Linux version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -16,7 +16,6 @@...@@ -16,7 +16,6 @@
16 License along with the GNU C Library; if not, see16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1818
19#include <inttypes.h>
20#include <sys/types.h>19#include <sys/types.h>
21#include <sys/stat.h>20#include <sys/stat.h>
22#include <errno.h>21#include <errno.h>
lib/libc/glibc/sysdeps/unix/sysv/linux/nios2/kernel_stat.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Internal definitions for stat functions. Linux/nios2.1/* Internal definitions for stat functions. Linux/nios2.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/nios2/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for Nios II.1/* Assembler macros for Nios II.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h+1-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number. PowerPC version.2 kernel version number. PowerPC version.
3 Copyright (C) 1999-2023 Free Software Foundation, Inc.3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 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 @@...@@ -1,5 +1,5 @@
1/* Definition of `struct stat' used in the kernel.1/* Definition of `struct stat' used in the kernel.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Syscall definitions, Linux PowerPC generic version.1/* Syscall definitions, Linux PowerPC generic version.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h+1-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number. RISC-V version.2 kernel version number. RISC-V version.
3 Copyright (C) 2018-2023 Free Software Foundation, Inc.3 Copyright (C) 2018-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 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 @@...@@ -1,5 +1,5 @@
1/* bits/typesizes.h -- underlying types for *_t. Linux/s390 version.1/* bits/typesizes.h -- underlying types for *_t. Linux/s390 version.
2 Copyright (C) 2003-2023 Free Software Foundation, Inc.2 Copyright (C) 2003-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number. S/390 version.2 kernel version number. S/390 version.
3 Copyright (C) 1999-2023 Free Software Foundation, Inc.3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.1/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for 64 bit S/390.1/* Assembler macros for 64 bit S/390.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.1/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sysdep.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Syscall definitions, Linux s390 version.1/* Syscall definitions, Linux s390 version.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sh/kernel-features.h+5-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number. SH version.2 kernel version number. SH version.
3 Copyright (C) 1999-2023 Free Software Foundation, Inc.3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
...@@ -55,4 +55,8 @@...@@ -55,4 +55,8 @@
55# undef __ASSUME_STATX55# undef __ASSUME_STATX
56#endif56#endif
5757
58/* sh does not provide clone3. */
59#undef __ASSUME_CLONE3
60#define __ASSUME_CLONE3 0
61
58#endif62#endif
lib/libc/glibc/sysdeps/unix/sysv/linux/sh/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Single thread optimization, Linux version.1/* Single thread optimization, Linux version.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.1/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h+5-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number. SPARC version.2 kernel version number. SPARC version.
3 Copyright (C) 1999-2023 Free Software Foundation, Inc.3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
...@@ -87,3 +87,7 @@...@@ -87,3 +87,7 @@
87 (INLINE_CLONE_SYSCALL). */87 (INLINE_CLONE_SYSCALL). */
88#undef __ASSUME_CLONE_DEFAULT88#undef __ASSUME_CLONE_DEFAULT
89#define __ASSUME_CLONE_BACKWARDS 189#define __ASSUME_CLONE_BACKWARDS 1
90
91/* sparc does not provide clone3. */
92#undef __ASSUME_CLONE3
93#define __ASSUME_CLONE3 0
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/kstat_cp.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Struct kernel_stat64 to stat64. Linux/SPARC version.1/* Struct kernel_stat64 to stat64. Linux/SPARC version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.1/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/stat.c+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Get file status. Linux version.1/* Get file status. Linux version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Get file status. Linux version.1/* Get file status. Linux version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Struct stat/stat64 to stat/stat64 conversion for Linux.1/* Struct stat/stat64 to stat/stat64 conversion for Linux.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Copy to/from struct stat with and without 64-bit time_t support.1/* Copy to/from struct stat with and without 64-bit time_t support.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Struct stat with 64-bit time support.1/* Struct stat with 64-bit time support.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.1/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.1/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 2015-2023 Free Software Foundation, Inc.1/* Copyright (C) 2015-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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 @@...@@ -1,5 +1,5 @@
1/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.1/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.1/* Copyright (C) 1998-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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 @@...@@ -1,6 +1,6 @@
1/* Set flags signalling availability of kernel features based on given1/* Set flags signalling availability of kernel features based on given
2 kernel version number. x86-64 version.2 kernel version number. x86-64 version.
3 Copyright (C) 1999-2023 Free Software Foundation, Inc.3 Copyright (C) 1999-2024 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
55
6 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.1/* Copyright (C) 2001-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2012-2023 Free Software Foundation, Inc.1/* Copyright (C) 2012-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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,4 +1,4 @@
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.1/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 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 @@...@@ -1,5 +1,5 @@
1/* Hacks needed for divdi3 symbol manipulation.1/* Hacks needed for divdi3 symbol manipulation.
2 Copyright (C) 2004-2023 Free Software Foundation, Inc.2 Copyright (C) 2004-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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,4 +1,4 @@
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.1/* Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/x86/sysdep.h+1-45
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for x86.1/* Assembler macros for x86.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -21,33 +21,6 @@...@@ -21,33 +21,6 @@
2121
22#include <sysdeps/generic/sysdep.h>22#include <sysdeps/generic/sysdep.h>
2323
24/* __CET__ is defined by GCC with Control-Flow Protection values:
25
26enum cf_protection_level
27{
28 CF_NONE = 0,
29 CF_BRANCH = 1 << 0,
30 CF_RETURN = 1 << 1,
31 CF_FULL = CF_BRANCH | CF_RETURN,
32 CF_SET = 1 << 2
33};
34*/
35
36/* Set if CF_BRANCH (IBT) is enabled. */
37#define X86_FEATURE_1_IBT (1U << 0)
38/* Set if CF_RETURN (SHSTK) is enabled. */
39#define X86_FEATURE_1_SHSTK (1U << 1)
40
41#ifdef __CET__
42# define CET_ENABLED 1
43# define IBT_ENABLED (__CET__ & X86_FEATURE_1_IBT)
44# define SHSTK_ENABLED (__CET__ & X86_FEATURE_1_SHSTK)
45#else
46# define CET_ENABLED 0
47# define IBT_ENABLED 0
48# define SHSTK_ENABLED 0
49#endif
50
51/* Offset for fxsave/xsave area used by _dl_runtime_resolve. Also need24/* Offset for fxsave/xsave area used by _dl_runtime_resolve. Also need
52 space to preserve RCX, RDX, RSI, RDI, R8, R9 and RAX. It must be25 space to preserve RCX, RDX, RSI, RDI, R8, R9 and RAX. It must be
53 aligned to 16 bytes for fxsave and 64 bytes for xsave. */26 aligned to 16 bytes for fxsave and 64 bytes for xsave. */
...@@ -66,27 +39,10 @@ enum cf_protection_level...@@ -66,27 +39,10 @@ enum cf_protection_level
6639
67/* Syntactic details of assembler. */40/* Syntactic details of assembler. */
6841
69#ifdef _CET_ENDBR
70# define _CET_NOTRACK notrack
71#else
72# define _CET_ENDBR
73# define _CET_NOTRACK
74#endif
75
76/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */42/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
77#define ALIGNARG(log2) 1<<log243#define ALIGNARG(log2) 1<<log2
78#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;44#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
7945
80/* Define an entry point visible from C. */
81#define ENTRY_P2ALIGN(name, alignment) \
82 .globl C_SYMBOL_NAME(name); \
83 .type C_SYMBOL_NAME(name),@function; \
84 .align ALIGNARG(alignment); \
85 C_LABEL(name) \
86 cfi_startproc; \
87 _CET_ENDBR; \
88 CALL_MCOUNT
89
90/* Common entry 16 byte aligns. */46/* Common entry 16 byte aligns. */
91#define ENTRY(name) ENTRY_P2ALIGN (name, 4)47#define ENTRY(name) ENTRY_P2ALIGN (name, 4)
9248
lib/libc/glibc/sysdeps/x86_64/crti.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for x86-64.1/* Special .init and .fini section support for x86-64.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/x86_64/crtn.S+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Special .init and .fini section support for x86-64.1/* Special .init and .fini section support for x86-64.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 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 @@...@@ -1,5 +1,5 @@
1/* Startup code compliant to the ELF x86-64 ABI.1/* Startup code compliant to the ELF x86-64 ABI.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
lib/libc/glibc/sysdeps/x86_64/sysdep.h+42-4
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for x86-64.1/* Assembler macros for x86-64.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -20,16 +20,54 @@...@@ -20,16 +20,54 @@
20#define _X86_64_SYSDEP_H 120#define _X86_64_SYSDEP_H 1
2121
22#include <sysdeps/x86/sysdep.h>22#include <sysdeps/x86/sysdep.h>
23#ifdef __ASSEMBLER__23#include <x86-lp_size.h>
24# define LP_SIZE 824
25/* __CET__ is defined by GCC with Control-Flow Protection values:
26
27enum cf_protection_level
28{
29 CF_NONE = 0,
30 CF_BRANCH = 1 << 0,
31 CF_RETURN = 1 << 1,
32 CF_FULL = CF_BRANCH | CF_RETURN,
33 CF_SET = 1 << 2
34};
35*/
36
37/* Set if CF_BRANCH (IBT) is enabled. */
38#define X86_FEATURE_1_IBT (1U << 0)
39/* Set if CF_RETURN (SHSTK) is enabled. */
40#define X86_FEATURE_1_SHSTK (1U << 1)
41
42#ifdef __CET__
43# define CET_ENABLED 1
44# define SHSTK_ENABLED (__CET__ & X86_FEATURE_1_SHSTK)
25#else45#else
26# define LP_SIZE "8"46# define CET_ENABLED 0
47# define SHSTK_ENABLED 0
27#endif48#endif
2849
29#ifdef __ASSEMBLER__50#ifdef __ASSEMBLER__
3051
31/* Syntactic details of assembler. */52/* Syntactic details of assembler. */
3253
54#ifdef _CET_ENDBR
55# define _CET_NOTRACK notrack
56#else
57# define _CET_ENDBR
58# define _CET_NOTRACK
59#endif
60
61/* Define an entry point visible from C. */
62#define ENTRY_P2ALIGN(name, alignment) \
63 .globl C_SYMBOL_NAME(name); \
64 .type C_SYMBOL_NAME(name),@function; \
65 .align ALIGNARG(alignment); \
66 C_LABEL(name) \
67 cfi_startproc; \
68 _CET_ENDBR; \
69 CALL_MCOUNT
70
33/* This macro is for setting proper CFI with DW_CFA_expression describing71/* This macro is for setting proper CFI with DW_CFA_expression describing
34 the register as saved relative to %rsp instead of relative to the CFA.72 the register as saved relative to %rsp instead of relative to the CFA.
35 Expression is DW_OP_drop, DW_OP_breg7 (%rsp is register 7), sleb128 offset73 Expression is DW_OP_drop, DW_OP_breg7 (%rsp is register 7), sleb128 offset
lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h+2-6
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Assembler macros for x32.1/* Assembler macros for x32.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -17,11 +17,7 @@...@@ -17,11 +17,7 @@
17 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1818
19#include <sysdeps/x86_64/sysdep.h>19#include <sysdeps/x86_64/sysdep.h>
20#ifdef __ASSEMBLER__20#include <x86-lp_size.h>
21# define LP_SIZE 4
22#else
23# define LP_SIZE "4"
24#endif
2521
26#undef LP_OP22#undef LP_OP
27#undef ASM_ADDR23#undef ASM_ADDR