summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/aarch64/bits/fcntl.h3
-rw-r--r--libc/sysdeps/linux/aarch64/bits/fenv.h78
-rw-r--r--libc/sysdeps/linux/aarch64/crt1.S4
-rw-r--r--libc/sysdeps/linux/aarch64/fpu_control.h102
-rw-r--r--libc/sysdeps/linux/aarch64/sys/ucontext.h4
-rw-r--r--libc/sysdeps/linux/alpha/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/alpha/bits/stat.h2
-rwxr-xr-xlibc/sysdeps/linux/arc/bits/fcntl.h3
-rw-r--r--libc/sysdeps/linux/arc/bits/fenv.h75
-rw-r--r--libc/sysdeps/linux/arc/fpu_control.h104
-rw-r--r--libc/sysdeps/linux/arm/__longjmp.S8
-rw-r--r--libc/sysdeps/linux/arm/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/arm/bits/fenv.h107
-rw-r--r--libc/sysdeps/linux/arm/crt1.S15
-rw-r--r--libc/sysdeps/linux/arm/fpu_control.h192
-rw-r--r--libc/sysdeps/linux/arm/setjmp.S8
-rw-r--r--libc/sysdeps/linux/avr32/bits/fcntl.h3
-rw-r--r--libc/sysdeps/linux/bfin/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/c6x/bits/fcntl.h3
-rw-r--r--libc/sysdeps/linux/common-generic/bits/kernel_stat.h2
-rw-r--r--libc/sysdeps/linux/common/Makefile.in3
-rw-r--r--libc/sysdeps/linux/common/bits/fcntl-linux.h34
-rw-r--r--libc/sysdeps/linux/common/bits/mman-shared.h2
-rw-r--r--libc/sysdeps/linux/common/bits/nan.h4
-rw-r--r--libc/sysdeps/linux/common/bits/stat.h4
-rw-r--r--libc/sysdeps/linux/common/clock_adjtime.c2
-rw-r--r--libc/sysdeps/linux/common/fstat64.c3
-rw-r--r--libc/sysdeps/linux/common/fstatat64.c3
-rw-r--r--libc/sysdeps/linux/common/getentropy.c45
-rw-r--r--libc/sysdeps/linux/common/getrandom.c3
-rw-r--r--libc/sysdeps/linux/common/lseek.c2
-rw-r--r--libc/sysdeps/linux/common/memfd_create.c13
-rw-r--r--libc/sysdeps/linux/common/not-cancel.h2
-rw-r--r--libc/sysdeps/linux/common/process_vm_readv.c32
-rw-r--r--libc/sysdeps/linux/common/process_vm_writev.c32
-rw-r--r--libc/sysdeps/linux/common/sys/epoll.h14
-rw-r--r--libc/sysdeps/linux/common/sys/random.h22
-rw-r--r--libc/sysdeps/linux/common/utime.c4
-rw-r--r--libc/sysdeps/linux/common/utimensat.c3
-rw-r--r--libc/sysdeps/linux/cris/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/csky/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/csky/bits/fenv.h123
-rw-r--r--libc/sysdeps/linux/csky/bits/uClibc_arch_features.h3
-rw-r--r--libc/sysdeps/linux/csky/fpu_control.h147
-rw-r--r--libc/sysdeps/linux/frv/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/frv/bits/stat.h4
-rw-r--r--libc/sysdeps/linux/h8300/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/hppa/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/i386/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/ia64/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/ia64/bits/stat.h4
-rw-r--r--libc/sysdeps/linux/kvx/bits/fcntl.h3
-rw-r--r--libc/sysdeps/linux/lm32/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/m68k/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/m68k/bits/fenv.h98
-rw-r--r--libc/sysdeps/linux/m68k/bits/stat.h4
-rw-r--r--libc/sysdeps/linux/m68k/bsd-_setjmp.S4
-rw-r--r--libc/sysdeps/linux/m68k/bsd-setjmp.S4
-rw-r--r--libc/sysdeps/linux/m68k/clone.S12
-rw-r--r--libc/sysdeps/linux/m68k/fpu_control.h77
-rw-r--r--libc/sysdeps/linux/m68k/setjmp.S4
-rw-r--r--libc/sysdeps/linux/metag/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/microblaze/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/mips/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/mips/bits/fenv.h82
-rw-r--r--libc/sysdeps/linux/mips/bits/stat.h8
-rw-r--r--libc/sysdeps/linux/mips/fpu_control.h68
-rw-r--r--libc/sysdeps/linux/nds32/Makefile.arch2
-rw-r--r--libc/sysdeps/linux/nds32/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/nds32/bits/kernel_types.h22
-rw-r--r--libc/sysdeps/linux/nds32/bits/stat.h4
-rw-r--r--libc/sysdeps/linux/nds32/bits/syscalls.h3
-rw-r--r--libc/sysdeps/linux/nds32/jmpbuf-unwind.h2
-rw-r--r--libc/sysdeps/linux/nds32/sys/ucontext.h6
-rw-r--r--libc/sysdeps/linux/nds32/vfork.S129
-rw-r--r--libc/sysdeps/linux/nios2/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/or1k/bits/fcntl.h3
-rw-r--r--libc/sysdeps/linux/or1k/bits/fenv.h84
-rw-r--r--libc/sysdeps/linux/or1k/fpu_control.h88
-rw-r--r--libc/sysdeps/linux/powerpc/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/powerpc/bits/stat.h4
-rw-r--r--libc/sysdeps/linux/riscv32/bits/fcntl.h3
-rw-r--r--libc/sysdeps/linux/riscv32/bits/fenv.h2
-rw-r--r--libc/sysdeps/linux/riscv32/getcontext.S74
-rw-r--r--libc/sysdeps/linux/riscv32/setcontext.S112
-rw-r--r--libc/sysdeps/linux/riscv32/swapcontext.S122
-rw-r--r--libc/sysdeps/linux/riscv32/sys/ucontext.h4
-rw-r--r--libc/sysdeps/linux/riscv64/bits/fcntl.h3
-rw-r--r--libc/sysdeps/linux/riscv64/bits/fenv.h2
-rw-r--r--libc/sysdeps/linux/riscv64/getcontext.S74
-rw-r--r--libc/sysdeps/linux/riscv64/setcontext.S112
-rw-r--r--libc/sysdeps/linux/riscv64/swapcontext.S122
-rw-r--r--libc/sysdeps/linux/riscv64/sys/ucontext.h4
-rw-r--r--libc/sysdeps/linux/sh/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/sh/bits/fenv.h60
-rw-r--r--libc/sysdeps/linux/sh/fpu_control.h30
-rw-r--r--libc/sysdeps/linux/sparc/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/sparc/bits/fenv.h60
-rw-r--r--libc/sysdeps/linux/sparc/bits/stat.h4
-rw-r--r--libc/sysdeps/linux/sparc/fpu_control.h24
-rw-r--r--libc/sysdeps/linux/sparc64/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/sparc64/bits/stat.h4
-rw-r--r--libc/sysdeps/linux/tile/bits/fcntl.h3
-rw-r--r--libc/sysdeps/linux/tile/sys/ucontext.h4
-rw-r--r--libc/sysdeps/linux/x86_64/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/x86_64/bits/stat.h4
-rw-r--r--libc/sysdeps/linux/x86_64/crt1.S6
-rw-r--r--libc/sysdeps/linux/xtensa/__start_context.S6
-rw-r--r--libc/sysdeps/linux/xtensa/bits/elf-fdpic.h117
-rw-r--r--libc/sysdeps/linux/xtensa/bits/fcntl.h2
-rw-r--r--libc/sysdeps/linux/xtensa/bits/stat.h4
-rw-r--r--libc/sysdeps/linux/xtensa/bits/xtensa-config.h20
-rw-r--r--libc/sysdeps/linux/xtensa/clone.S6
-rw-r--r--libc/sysdeps/linux/xtensa/crt1.S81
-rw-r--r--libc/sysdeps/linux/xtensa/crti.S10
-rw-r--r--libc/sysdeps/linux/xtensa/crtn.S6
-rw-r--r--libc/sysdeps/linux/xtensa/crtreloc.c105
-rw-r--r--libc/sysdeps/linux/xtensa/getcontext.S1
-rw-r--r--libc/sysdeps/linux/xtensa/makecontext.c5
-rw-r--r--libc/sysdeps/linux/xtensa/setcontext.S1
-rw-r--r--libc/sysdeps/linux/xtensa/setjmp.S3
-rw-r--r--libc/sysdeps/linux/xtensa/swapcontext.S1
-rw-r--r--libc/sysdeps/linux/xtensa/sysdep.h48
123 files changed, 2092 insertions, 1133 deletions
diff --git a/libc/sysdeps/linux/aarch64/bits/fcntl.h b/libc/sysdeps/linux/aarch64/bits/fcntl.h
index dbe929351..024344eec 100644
--- a/libc/sysdeps/linux/aarch64/bits/fcntl.h
+++ b/libc/sysdeps/linux/aarch64/bits/fcntl.h
@@ -289,3 +289,6 @@ extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
#endif /* use GNU */
__END_DECLS
+
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/libc/sysdeps/linux/aarch64/bits/fenv.h b/libc/sysdeps/linux/aarch64/bits/fenv.h
new file mode 100644
index 000000000..4febd2177
--- /dev/null
+++ b/libc/sysdeps/linux/aarch64/bits/fenv.h
@@ -0,0 +1,78 @@
+/* Copyright (C) 2004-2025 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+/* Define bits representing exceptions in the FPSR status word. */
+enum
+ {
+ FE_INVALID =
+#define FE_INVALID 1
+ FE_INVALID,
+ FE_DIVBYZERO =
+#define FE_DIVBYZERO 2
+ FE_DIVBYZERO,
+ FE_OVERFLOW =
+#define FE_OVERFLOW 4
+ FE_OVERFLOW,
+ FE_UNDERFLOW =
+#define FE_UNDERFLOW 8
+ FE_UNDERFLOW,
+ FE_INEXACT =
+#define FE_INEXACT 16
+ FE_INEXACT,
+ };
+
+/* Amount to shift by to convert an exception bit in FPSR to a an
+ exception bit mask in FPCR. */
+#define FE_EXCEPT_SHIFT 8
+
+/* All supported exceptions. */
+#define FE_ALL_EXCEPT \
+ (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
+
+/* Define bits representing rounding modes in the FPCR Rmode field. */
+#define FE_TONEAREST 0x000000
+#define FE_UPWARD 0x400000
+#define FE_DOWNWARD 0x800000
+#define FE_TOWARDZERO 0xc00000
+
+/* Type representing exception flags. */
+typedef unsigned int fexcept_t;
+
+/* Type representing floating-point environment. */
+typedef struct
+ {
+ unsigned int __fpcr;
+ unsigned int __fpsr;
+ }
+fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((const fenv_t *) -1l)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exceptions are masked. */
+# define FE_NOMASK_ENV ((const fenv_t *) -2)
+#endif
+
+/* Type representing floating-point control modes. */
+typedef unsigned int femode_t;
+
+/* Default floating-point control modes. */
+# define FE_DFL_MODE ((const femode_t *) -1L)
diff --git a/libc/sysdeps/linux/aarch64/crt1.S b/libc/sysdeps/linux/aarch64/crt1.S