aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/include/arc-linux-gnu
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-08-08 04:08:05 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2024-08-08 04:41:04 +0200
commit0b76be3a01dc09dbd3333a795203cb087629edbd (patch)
treea6bfaf31eaf2b6c13be7e1c9fa95bdeb2fbced36 /lib/libc/include/arc-linux-gnu
parent4381bac79270249f954c864145d69b20e7dbafa4 (diff)
downloadzig-0b76be3a01dc09dbd3333a795203cb087629edbd.tar.gz
zig-0b76be3a01dc09dbd3333a795203cb087629edbd.zip
Update glibc headers to 2.40.
Diffstat (limited to 'lib/libc/include/arc-linux-gnu')
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/endianness.h15
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/fcntl.h55
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/fenv.h78
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/floatn.h52
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/link.h52
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/long-double.h53
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/procfs.h35
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/setjmp.h26
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/struct_stat.h127
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/timesize.h20
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/types/__sigset_t.h12
-rw-r--r--lib/libc/include/arc-linux-gnu/bits/wordsize.h21
-rw-r--r--lib/libc/include/arc-linux-gnu/fpu_control.h105
-rw-r--r--lib/libc/include/arc-linux-gnu/gnu/lib-names-arcle.h27
-rw-r--r--lib/libc/include/arc-linux-gnu/gnu/lib-names.h16
-rw-r--r--lib/libc/include/arc-linux-gnu/gnu/stubs-arcle.h38
-rw-r--r--lib/libc/include/arc-linux-gnu/gnu/stubs.h12
-rw-r--r--lib/libc/include/arc-linux-gnu/sys/cachectl.h35
-rw-r--r--lib/libc/include/arc-linux-gnu/sys/ucontext.h57
-rw-r--r--lib/libc/include/arc-linux-gnu/sys/user.h32
20 files changed, 868 insertions, 0 deletions
diff --git a/lib/libc/include/arc-linux-gnu/bits/endianness.h b/lib/libc/include/arc-linux-gnu/bits/endianness.h
new file mode 100644
index 0000000000..8abcabc8f5
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/endianness.h
@@ -0,0 +1,15 @@
+#ifndef _BITS_ENDIANNESS_H
+#define _BITS_ENDIANNESS_H 1
+
+#ifndef _BITS_ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+/* ARC has selectable endianness. */
+#ifdef __BIG_ENDIAN__
+# define __BYTE_ORDER __BIG_ENDIAN
+#else
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+
+#endif /* bits/endianness.h */ \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/fcntl.h b/lib/libc/include/arc-linux-gnu/bits/fcntl.h
new file mode 100644
index 0000000000..9c454a8d14
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/fcntl.h
@@ -0,0 +1,55 @@
+/* O_*, F_*, FD_* bit values for the generic Linux ABI.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FCNTL_H
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 64
+# define __O_LARGEFILE 0
+#endif
+
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#else
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+#endif
+
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h> \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/fenv.h b/lib/libc/include/arc-linux-gnu/bits/fenv.h
new file mode 100644
index 0000000000..b8b36a6816
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/fenv.h
@@ -0,0 +1,78 @@
+/* Floating point environment. ARC version.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+enum
+ {
+ FE_INVALID =
+# define FE_INVALID (0x01)
+ FE_INVALID,
+ FE_DIVBYZERO =
+# define FE_DIVBYZERO (0x02)
+ FE_DIVBYZERO,
+ FE_OVERFLOW =
+# define FE_OVERFLOW (0x04)
+ FE_OVERFLOW,
+ FE_UNDERFLOW =
+# define FE_UNDERFLOW (0x08)
+ FE_UNDERFLOW,
+ FE_INEXACT =
+# define FE_INEXACT (0x10)
+ FE_INEXACT
+ };
+
+# define FE_ALL_EXCEPT \
+ (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
+
+enum
+ {
+ FE_TOWARDZERO =
+# define FE_TOWARDZERO (0x0)
+ FE_TOWARDZERO,
+ FE_TONEAREST =
+# define FE_TONEAREST (0x1) /* default */
+ FE_TONEAREST,
+ FE_UPWARD =
+# define FE_UPWARD (0x2)
+ FE_UPWARD,
+ FE_DOWNWARD =
+# define FE_DOWNWARD (0x3)
+ FE_DOWNWARD
+ };
+
+typedef unsigned int fexcept_t;
+
+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 *) -1)
+
+#if __GLIBC_USE (IEC_60559_BFP_EXT)
+/* Type representing floating-point control modes. */
+typedef unsigned int femode_t;
+
+/* Default floating-point control modes. */
+# define FE_DFL_MODE ((const femode_t *) -1L)
+#endif \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/floatn.h b/lib/libc/include/arc-linux-gnu/bits/floatn.h
new file mode 100644
index 0000000000..7f308138a7
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/floatn.h
@@ -0,0 +1,52 @@
+/* Macros to control TS 18661-3 glibc features.
+ Copyright (C) 2017-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Defined to 1 if the current compiler invocation provides a
+ floating-point type with the IEEE 754 binary128 format, and this glibc
+ includes corresponding *f128 interfaces for it. */
+#define __HAVE_FLOAT128 0
+
+/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
+ from the default float, double and long double types in this glibc. */
+#define __HAVE_DISTINCT_FLOAT128 0
+
+/* Defined to 1 if the current compiler invocation provides a
+ floating-point type with the right format for _Float64x, and this
+ glibc includes corresponding *f64x interfaces for it. */
+#define __HAVE_FLOAT64X 0
+
+/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
+ of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
+ the format of _Float128, which must be different from that of long
+ double. */
+#define __HAVE_FLOAT64X_LONG_DOUBLE 0
+
+#ifndef __ASSEMBLER__
+
+/* Defined to concatenate the literal suffix to be used with _Float128
+ types, if __HAVE_FLOAT128 is 1.
+ E.g.: #define __f128(x) x##f128. */
+# undef __f128
+
+/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
+ E.g.: #define __CFLOAT128 _Complex _Float128. */
+# undef __CFLOAT128
+
+#endif /* !__ASSEMBLER__. */
+
+#include <bits/floatn-common.h> \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/link.h b/lib/libc/include/arc-linux-gnu/bits/link.h
new file mode 100644
index 0000000000..371249403b
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/link.h
@@ -0,0 +1,52 @@
+/* Machine-specific declarations for dynamic linker interface, ARC version.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+/* Registers for entry into PLT on ARC. */
+typedef struct La_arc_regs
+{
+ uint32_t lr_reg[8]; /* r0 through r7 (upto 8 args). */
+} La_arc_regs;
+
+/* Return values for calls from PLT on ARC. */
+typedef struct La_arc_retval
+{
+ /* For ARCv2, a 64-bit integer return value can use 2 regs. */
+ uint32_t lrv_reg[2];
+} La_arc_retval;
+
+__BEGIN_DECLS
+
+extern ElfW(Addr) la_arc_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_arc_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_arc_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_arc_regs *__inregs,
+ La_arc_retval *__outregs,
+ const char *symname);
+
+__END_DECLS \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/long-double.h b/lib/libc/include/arc-linux-gnu/bits/long-double.h
new file mode 100644
index 0000000000..984b2c54b4
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/long-double.h
@@ -0,0 +1,53 @@
+/* Properties of long double type.
+ Copyright (C) 2016-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License 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/>. */
+
+/* This header is included by <sys/cdefs.h>.
+
+ If long double is ABI-compatible with double, it should define
+ __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave
+ __NO_LONG_DOUBLE_MATH undefined.
+
+ If this build of the GNU C Library supports both long double
+ ABI-compatible with double and some other long double format not
+ ABI-compatible with double, it should define
+ __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave
+ __LONG_DOUBLE_MATH_OPTIONAL undefined.
+
+ If __NO_LONG_DOUBLE_MATH is already defined, this header must not
+ define anything; this is needed to work with the definition of
+ __NO_LONG_DOUBLE_MATH in nldbl-compat.h. */
+
+/* In the default version of this header, long double is
+ ABI-compatible with double. */
+#ifndef __NO_LONG_DOUBLE_MATH
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
+
+/* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the
+ choice of the underlying ABI of long double. It will always assume
+ a constant value for each translation unit.
+
+ If the value is non-zero, any API which is parameterized by the long
+ double type (i.e the scanf/printf family of functions or the explicitly
+ parameterized math.h functions) will be redirected to a compatible
+ implementation using _Float128 ABI via symbols suffixed with ieee128.
+
+ The mechanism this macro uses to acquire may be a function
+ of architecture, or target specific options used to invoke the
+ compiler. */
+#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/procfs.h b/lib/libc/include/arc-linux-gnu/bits/procfs.h
new file mode 100644
index 0000000000..75541205b9
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/procfs.h
@@ -0,0 +1,35 @@
+/* Types for registers for sys/procfs.h. ARC version.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_PROCFS_H
+# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
+#endif
+
+#include <sys/ucontext.h>
+
+/* And the whole bunch of them. We could have used `struct
+ user_regs' directly in the typedef, but tradition says that
+ the register set is an array, which does have some peculiar
+ semantics, so leave it that way. */
+#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
+
+typedef unsigned long int elf_greg_t;
+typedef unsigned long int elf_gregset_t[ELF_NGREG];
+
+/* There's no separate floating point reg file in ARCv2. */
+typedef struct { } elf_fpregset_t; \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/setjmp.h b/lib/libc/include/arc-linux-gnu/bits/setjmp.h
new file mode 100644
index 0000000000..91f27f8dd0
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/setjmp.h
@@ -0,0 +1,26 @@
+/* Define the machine-dependent type 'jmp_buf'. ARC version.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _ARC_BITS_SETJMP_H
+#define _ARC_BITS_SETJMP_H 1
+
+/* Saves r13-r25 (callee-saved), fp (frame pointer), sp (stack pointer),
+ blink (branch-n-link). */
+typedef long int __jmp_buf[32];
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/struct_stat.h b/lib/libc/include/arc-linux-gnu/bits/struct_stat.h
new file mode 100644
index 0000000000..c8e2d78b57
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/struct_stat.h
@@ -0,0 +1,127 @@
+/* Definition for struct stat.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if !defined _SYS_STAT_H && !defined _FCNTL_H
+# error "Never include <bits/struct_stat.h> directly; use <sys/stat.h> instead."
+#endif
+
+#ifndef _BITS_STRUCT_STAT_H
+#define _BITS_STRUCT_STAT_H 1
+
+#include <bits/endian.h>
+#include <bits/wordsize.h>
+
+#if defined __USE_FILE_OFFSET64
+# define __field64(type, type64, name) type64 name
+#elif __WORDSIZE == 64 || defined __INO_T_MATCHES_INO64_T
+# if defined __INO_T_MATCHES_INO64_T && !defined __OFF_T_MATCHES_OFF64_T
+# error "ino_t and off_t must both be the same type"
+# endif
+# define __field64(type, type64, name) type name
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+# define __field64(type, type64, name) \
+ type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
+#else
+# define __field64(type, type64, name) \
+ int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
+#endif
+
+struct stat
+ {
+ __dev_t st_dev; /* Device. */
+ __field64(__ino_t, __ino64_t, st_ino); /* File serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ __dev_t __pad1;
+ __field64(__off_t, __off64_t, st_size); /* Size of file, in bytes. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+ int __pad2;
+ __field64(__blkcnt_t, __blkcnt64_t, st_blocks); /* 512-byte blocks */
+#ifdef __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+#else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+#endif
+ int __glibc_reserved[2];
+ };
+
+#undef __field64
+
+#ifdef __USE_LARGEFILE64
+struct stat64
+ {
+ __dev_t st_dev; /* Device. */
+ __ino64_t st_ino; /* File serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ __dev_t __pad1;
+ __off64_t st_size; /* Size of file, in bytes. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+ int __pad2;
+ __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
+#ifdef __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+#else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+#endif
+ int __glibc_reserved[2];
+ };
+#endif
+
+/* Tell code we have these members. */
+#define _STATBUF_ST_BLKSIZE
+#define _STATBUF_ST_RDEV
+/* Nanosecond resolution time values are supported. */
+#define _STATBUF_ST_NSEC
+
+#endif /* _BITS_STRUCT_STAT_H */ \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/timesize.h b/lib/libc/include/arc-linux-gnu/bits/timesize.h
new file mode 100644
index 0000000000..17f828ecfe
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/timesize.h
@@ -0,0 +1,20 @@
+/* Bit size of the time_t type at glibc build time, general case.
+ Copyright (C) 2018-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Size in bits of the 'time_t' type of the default ABI. */
+#define __TIMESIZE 64 \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/types/__sigset_t.h b/lib/libc/include/arc-linux-gnu/bits/types/__sigset_t.h
new file mode 100644
index 0000000000..c45c797a89
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/types/__sigset_t.h
@@ -0,0 +1,12 @@
+/* Architecture-specific __sigset_t definition. ARC version. */
+#ifndef ____sigset_t_defined
+#define ____sigset_t_defined
+
+/* Linux asm-generic syscall ABI expects sigset_t to hold 64 signals. */
+#define _SIGSET_NWORDS (64 / (8 * sizeof (unsigned long int)))
+typedef struct
+{
+ unsigned long int __val[_SIGSET_NWORDS];
+} __sigset_t;
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/wordsize.h b/lib/libc/include/arc-linux-gnu/bits/wordsize.h
new file mode 100644
index 0000000000..3a4baec808
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/bits/wordsize.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#define __WORDSIZE 32
+#define __WORDSIZE_TIME64_COMPAT32 0
+#define __WORDSIZE32_SIZE_ULONG 0
+#define __WORDSIZE32_PTRDIFF_LONG 0 \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/fpu_control.h b/lib/libc/include/arc-linux-gnu/fpu_control.h
new file mode 100644
index 0000000000..02e226327f
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/fpu_control.h
@@ -0,0 +1,105 @@
+/* FPU control word bits. ARC version.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+/* ARC FPU control register bits.
+
+ [ 0] -> IVE: Enable invalid operation exception.
+ if 0, soft exception: status register IV flag set.
+ if 1, hardware exception trap (not supported in Linux yet).
+ [ 1] -> DZE: Enable division by zero exception.
+ if 0, soft exception: status register IV flag set.
+ if 1, hardware exception: (not supported in Linux yet).
+ [9:8] -> RM: Rounding Mode:
+ 00 - Rounding toward zero.
+ 01 - Rounding to nearest (default).
+ 10 - Rounding (up) toward plus infinity.
+ 11 - Rounding (down)toward minus infinity.
+
+ ARC FPU status register bits.
+
+ [ 0] -> IV: flag invalid operation.
+ [ 1] -> DZ: flag division by zero.
+ [ 2] -> OV: flag Overflow operation.
+ [ 3] -> UV: flag Underflow operation.
+ [ 4] -> IX: flag Inexact operation.
+ [31] -> FWE: Flag Write Enable.
+ If 1, above flags writable explicitly (clearing),
+ else IoW and only writable indirectly via bits [12:7]. */
+
+#include <features.h>
+
+#if !defined(__ARC_FPU_SP__) && !defined(__ARC_FPU_DP__)
+
+# define _FPU_RESERVED 0xffffffff
+# define _FPU_DEFAULT 0x00000000
+typedef unsigned int fpu_control_t;
+# define _FPU_GETCW(cw) (cw) = 0
+# define _FPU_SETCW(cw) (void) (cw)
+# define _FPU_GETS(cw) (cw) = 0
+# define _FPU_SETS(cw) (void) (cw)
+extern fpu_control_t __fpu_control;
+
+#else
+
+#define _FPU_RESERVED 0
+
+/* The fdlibm code requires strict IEEE double precision arithmetic,
+ and no interrupts for exceptions, rounding to nearest.
+ So only RM set to b'01. */
+# define _FPU_DEFAULT 0x00000100
+
+/* Actually default needs to have FWE bit as 1 but that is already
+ ingrained into _FPU_SETS macro below. */
+#define _FPU_FPSR_DEFAULT 0x00000000
+
+#define __FPU_RND_SHIFT 8
+#define __FPU_RND_MASK 0x3
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t;
+
+/* Macros for accessing the hardware control word. */
+# define _FPU_GETCW(cw) __asm__ volatile ("lr %0, [0x300]" : "=r" (cw))
+# define _FPU_SETCW(cw) __asm__ volatile ("sr %0, [0x300]" : : "r" (cw))
+
+/* Macros for accessing the hardware status word.
+ Writing to FPU_STATUS requires a "control" bit FWE to be able to set the
+ exception flags directly (as opposed to side-effects of FP instructions).
+ That is done in the macro here to keeps callers agnostic of this detail.
+ And given FWE is write-only and RAZ, no need to "clear" it in _FPU_GETS
+ macro. */
+# define _FPU_GETS(cw) \
+ __asm__ volatile ("lr %0, [0x301] \r\n" \
+ : "=r" (cw))
+
+# define _FPU_SETS(cw) \
+ do { \
+ unsigned int __fwe = 0x80000000 | (cw); \
+ __asm__ volatile ("sr %0, [0x301] \r\n" \
+ : : "r" (__fwe)); \
+ } while (0)
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+#endif
+
+#endif /* fpu_control.h */ \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/gnu/lib-names-arcle.h b/lib/libc/include/arc-linux-gnu/gnu/lib-names-arcle.h
new file mode 100644
index 0000000000..9b29aec083
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/gnu/lib-names-arcle.h
@@ -0,0 +1,27 @@
+/* This file is automatically generated. */
+#ifndef __GNU_LIB_NAMES_H
+# error "Never use <gnu/lib-names-arcle.h> directly; include <gnu/lib-names.h> instead."
+#endif
+
+#define LD_LINUX_ARC_SO "ld-linux-arc.so.2"
+#define LD_SO "ld-linux-arc.so.2"
+#define LIBANL_SO "libanl.so.1"
+#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
+#define LIBC_SO "libc.so.6"
+#define LIBDL_SO "libdl.so.2"
+#define LIBGCC_S_SO "libgcc_s.so.1"
+#define LIBMVEC_SO "libmvec.so.1"
+#define LIBM_SO "libm.so.6"
+#define LIBNSL_SO "libnsl.so.1"
+#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
+#define LIBNSS_DB_SO "libnss_db.so.2"
+#define LIBNSS_DNS_SO "libnss_dns.so.2"
+#define LIBNSS_FILES_SO "libnss_files.so.2"
+#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
+#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
+#define LIBPTHREAD_SO "libpthread.so.0"
+#define LIBRESOLV_SO "libresolv.so.2"
+#define LIBRT_SO "librt.so.1"
+#define LIBTHREAD_DB_SO "libthread_db.so.1"
+#define LIBUTIL_SO "libutil.so.1" \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/gnu/lib-names.h b/lib/libc/include/arc-linux-gnu/gnu/lib-names.h
new file mode 100644
index 0000000000..d7e6fa326f
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/gnu/lib-names.h
@@ -0,0 +1,16 @@
+/* This file is automatically generated.
+ It defines macros to allow user program to find the shared
+ library files which come as part of GNU libc. */
+#ifndef __GNU_LIB_NAMES_H
+#define __GNU_LIB_NAMES_H 1
+
+#include <bits/wordsize.h>
+
+#if !defined __BIG_ENDIAN__
+# include <gnu/lib-names-arcle.h>
+#endif
+#if defined __BIG_ENDIAN__
+# include <gnu/lib-names-arcbe.h>
+#endif
+
+#endif /* gnu/lib-names.h */ \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/gnu/stubs-arcle.h b/lib/libc/include/arc-linux-gnu/gnu/stubs-arcle.h
new file mode 100644
index 0000000000..6ce02418e6
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/gnu/stubs-arcle.h
@@ -0,0 +1,38 @@
+/* This file is automatically generated.
+ It defines a symbol `__stub_FUNCTION' for each function
+ in the C library which is a stub, meaning it will fail
+ every time called, usually setting errno to ENOSYS. */
+
+#ifdef _LIBC
+ #error Applications may not define the macro _LIBC
+#endif
+
+#define __stub___compat_bdflush
+#define __stub___compat_create_module
+#define __stub___compat_get_kernel_syms
+#define __stub___compat_query_module
+#define __stub___compat_uselib
+#define __stub_chflags
+#define __stub_fchflags
+#define __stub_feclearexcept
+#define __stub_fedisableexcept
+#define __stub_feenableexcept
+#define __stub_fegetenv
+#define __stub_fegetexcept
+#define __stub_fegetexceptflag
+#define __stub_fegetmode
+#define __stub_fegetround
+#define __stub_feholdexcept
+#define __stub_feraiseexcept
+#define __stub_fesetenv
+#define __stub_fesetexcept
+#define __stub_fesetexceptflag
+#define __stub_fesetmode
+#define __stub_fesetround
+#define __stub_fetestexcept
+#define __stub_feupdateenv
+#define __stub_gtty
+#define __stub_revoke
+#define __stub_setlogin
+#define __stub_sigreturn
+#define __stub_stty \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/gnu/stubs.h b/lib/libc/include/arc-linux-gnu/gnu/stubs.h
new file mode 100644
index 0000000000..fbfa0fa5b6
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/gnu/stubs.h
@@ -0,0 +1,12 @@
+/* This file is automatically generated.
+ This file selects the right generated file of `__stub_FUNCTION' macros
+ based on the architecture being compiled for. */
+
+#include <bits/wordsize.h>
+
+#if !defined __BIG_ENDIAN__
+# include <gnu/stubs-arcle.h>
+#endif
+#if defined __BIG_ENDIAN__
+# include <gnu/stubs-arcbe.h>
+#endif \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/sys/cachectl.h b/lib/libc/include/arc-linux-gnu/sys/cachectl.h
new file mode 100644
index 0000000000..e1cfb7dfed
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/sys/cachectl.h
@@ -0,0 +1,35 @@
+/* cacheflush - flush contents of instruction and/or data cache.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_CACHECTL_H
+#define _SYS_CACHECTL_H 1
+
+#include <features.h>
+
+/* Get the kernel definition for the op bits. */
+#include <asm/cachectl.h>
+
+__BEGIN_DECLS
+
+#ifdef __USE_MISC
+extern int cacheflush (void *__addr, int __nbytes, int __op) __THROW;
+#endif
+
+__END_DECLS
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/sys/ucontext.h b/lib/libc/include/arc-linux-gnu/sys/ucontext.h
new file mode 100644
index 0000000000..9a316becd7
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/sys/ucontext.h
@@ -0,0 +1,57 @@
+/* struct ucontext definition, ARC version.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* System V/ARC ABI compliant context switching support. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+
+#include <bits/types/sigset_t.h>
+#include <bits/types/stack_t.h>
+
+typedef struct
+{
+ unsigned long int __pad;
+ unsigned long int __bta;
+ unsigned long int __lp_start, __lp_end, __lp_count;
+ unsigned long int __status32, __ret, __blink;
+ unsigned long int __fp, __gp;
+ unsigned long int __r12, __r11, __r10, __r9, __r8, __r7;
+ unsigned long int __r6, __r5, __r4, __r3, __r2, __r1, __r0;
+ unsigned long int __sp;
+ unsigned long int __r26;
+ unsigned long int __r25, __r24, __r23, __r22, __r21, __r20;
+ unsigned long int __r19, __r18, __r17, __r16, __r15, __r14, __r13;
+ unsigned long int __efa;
+ unsigned long int __stop_pc;
+ unsigned long int __r30, __r58, __r59;
+} mcontext_t;
+
+/* Userlevel context. */
+typedef struct ucontext_t
+{
+ unsigned long int __uc_flags;
+ struct ucontext_t *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ sigset_t uc_sigmask;
+} ucontext_t;
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/sys/user.h b/lib/libc/include/arc-linux-gnu/sys/user.h
new file mode 100644
index 0000000000..ee051ff2f7
--- /dev/null
+++ b/lib/libc/include/arc-linux-gnu/sys/user.h
@@ -0,0 +1,32 @@
+/* ptrace register data format definitions.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_USER_H
+#define _SYS_USER_H 1
+
+/* Struct user_regs_struct is exported by kernel header
+ However apps like strace also expect a struct user, so it's better to
+ have a dummy implementation. */
+#include <asm/ptrace.h>
+
+struct user
+{
+ long int dummy;
+};
+
+#endif \ No newline at end of file