multi-arch glibc headers

This commit is contained in:
Andrew Kelley 2019-03-07 12:16:10 -05:00
parent 189fba4390
commit ce76de35f1
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1290 changed files with 60293 additions and 3485 deletions

File diff suppressed because it is too large Load Diff

View File

@ -54,6 +54,8 @@ clarity.
branch, and updates ziglang.org/download with links to pre-built binaries.
* These targets have debug info capabilities and therefore produce stack
traces on failed assertions.
* ([coming soon](https://github.com/ziglang/zig/issues/514)) libc is available
for this target even when cross compiling.
#### Tier 2 Support

View File

@ -1,11 +1,17 @@
const builtin = @import("builtin");
pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn {
unreachable;
}
// This file exists to create a libc.so file so that LLD has something to look at
// and emit linker errors if an attempt to link against a non-existent C symbol happens.
const builtin = @import("builtin");
comptime {
switch (builtin.arch) {
builtin.Arch.i386 => _ = @import("c/i386.zig"),
builtin.Arch.x86_64 => _ = @import("c/x86_64.zig"),
else => {},
}
}
export fn @"error"() void {}
export fn _Exit() void {}
export fn _IO_2_1_stderr_() void {}
export fn _IO_2_1_stdin_() void {}
@ -141,7 +147,6 @@ export fn _IO_wsetb() void {}
export fn __abort_msg() void {}
export fn __adjtimex() void {}
export fn __after_morecore_hook() void {}
export fn __arch_prctl() void {}
export fn __argz_count() void {}
export fn __argz_next() void {}
export fn __argz_stringify() void {}
@ -713,7 +718,6 @@ export fn alarm() void {}
export fn aligned_alloc() void {}
export fn alphasort() void {}
export fn alphasort64() void {}
export fn arch_prctl() void {}
export fn argp_err_exit_status() void {}
export fn argp_error() void {}
export fn argp_failure() void {}
@ -886,7 +890,6 @@ export fn erand48() void {}
export fn erand48_r() void {}
export fn err() void {}
export fn errno() void {}
export fn @"error"() void {}
export fn error_at_line() void {}
export fn error_message_count() void {}
export fn error_one_per_line() void {}

71
libc/dummy/c/i386.zig Normal file
View File

@ -0,0 +1,71 @@
export fn @"__x86.get_pc_thunk.bx"() void {}
export fn _IO_stderr_() void {}
export fn _IO_stdin_() void {}
export fn _IO_stdout_() void {}
export fn _Unwind_Find_FDE() void {}
export fn ___brk_addr() void {}
export fn __deregister_frame() void {}
export fn __deregister_frame_info() void {}
export fn __deregister_frame_info_bases() void {}
export fn __divdi3() void {}
export fn __frame_state_for() void {}
export fn __memcpy_by2() void {}
export fn __memcpy_by4() void {}
export fn __memcpy_c() void {}
export fn __memcpy_g() void {}
export fn __mempcpy_by2() void {}
export fn __mempcpy_by4() void {}
export fn __mempcpy_byn() void {}
export fn __memset_cc() void {}
export fn __memset_ccn_by2() void {}
export fn __memset_ccn_by4() void {}
export fn __memset_cg() void {}
export fn __memset_gcn_by2() void {}
export fn __memset_gcn_by4() void {}
export fn __memset_gg() void {}
export fn __moddi3() void {}
export fn __modify_ldt() void {}
export fn __register_frame() void {}
export fn __register_frame_info() void {}
export fn __register_frame_info_bases() void {}
export fn __register_frame_info_table() void {}
export fn __register_frame_info_table_bases() void {}
export fn __register_frame_table() void {}
export fn __stpcpy_g() void {}
export fn __strcat_c() void {}
export fn __strcat_g() void {}
export fn __strchr_c() void {}
export fn __strchr_g() void {}
export fn __strchrnul_c() void {}
export fn __strchrnul_g() void {}
export fn __strcmp_gg() void {}
export fn __strcpy_g() void {}
export fn __strcspn_cg() void {}
export fn __strcspn_g() void {}
export fn __strlen_g() void {}
export fn __strncat_g() void {}
export fn __strncmp_g() void {}
export fn __strncpy_by2() void {}
export fn __strncpy_by4() void {}
export fn __strncpy_byn() void {}
export fn __strncpy_gg() void {}
export fn __strpbrk_cg() void {}
export fn __strpbrk_g() void {}
export fn __strrchr_c() void {}
export fn __strrchr_g() void {}
export fn __strspn_cg() void {}
export fn __strspn_g() void {}
export fn __strstr_cg() void {}
export fn __strstr_g() void {}
export fn __strtoq_internal() void {}
export fn __strtouq_internal() void {}
export fn __udivdi3() void {}
export fn __umoddi3() void {}
export fn __uname() void {}
export fn atexit() void {}
export fn gettid() void {}
export fn res_init() void {}
export fn scalbln() void {}
export fn scalblnf() void {}
export fn scalblnl() void {}
export fn vm86() void {}

2
libc/dummy/c/x86_64.zig Normal file
View File

@ -0,0 +1,2 @@
export fn arch_prctl() void {}
export fn __arch_prctl() void {}

View File

@ -1,8 +1,3 @@
const builtin = @import("builtin");
pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn {
unreachable;
}
// This file exists to create a libdl.so file so that LLD has something to look at
// and emit linker errors if an attempt to link against a non-existent C symbol happens.

View File

@ -1,8 +1,3 @@
const builtin = @import("builtin");
pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn {
unreachable;
}
// This file exists to create a libm.so file so that LLD has something to look at
// and emit linker errors if an attempt to link against a non-existent C symbol happens.

View File

@ -1,8 +1,3 @@
const builtin = @import("builtin");
pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn {
unreachable;
}
// This file exists to create a libpthread.so file so that LLD has something to look at
// and emit linker errors if an attempt to link against a non-existent C symbol happens.

View File

@ -1,8 +1,3 @@
const builtin = @import("builtin");
pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn {
unreachable;
}
// This file exists to create a librt.so file so that LLD has something to look at
// and emit linker errors if an attempt to link against a non-existent C symbol happens.

View File

@ -1 +0,0 @@
/* No thread support. */

View File

@ -1 +0,0 @@
#include <linux/ppp-comp.h>

View File

@ -1 +0,0 @@
#include <linux/nfs.h>

View File

@ -1 +0,0 @@
#include <sys/poll.h>

View File

@ -1 +0,0 @@
#include <errno.h>

View File

@ -1 +0,0 @@
#include <fcntl.h>

View File

@ -1 +0,0 @@
#include <signal.h>

View File

@ -1 +0,0 @@
#include <linux/soundcard.h>

View File

@ -1 +0,0 @@
#include <stropts.h>

View File

@ -1 +0,0 @@
#include <unistd.h>

View File

@ -1 +0,0 @@
#include <linux/vt.h>

View File

@ -1 +0,0 @@
#include <sys/syscall.h>

View File

@ -1 +0,0 @@
#include <sys/syslog.h>

View File

@ -1 +0,0 @@
#include <sys/wait.h>

View File

@ -1,108 +0,0 @@
/* Startup code compliant to the ELF C-SKY ABIV2.
Copyright (C) 2018-2019 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.
In addition to the permissions in the GNU Lesser General Public
License, the Free Software Foundation gives you unlimited
permission to link the compiled version of this file with other
programs, and to distribute those programs without any restriction
coming from the use of this file. (The GNU Lesser General Public
License restrictions do apply in other respects; for example, they
cover modification of the file, and distribution when not linked
into another program.)
Note that people who make modified versions of this file are not
obligated to grant this special exception for their modified
versions; it is their choice whether to do so. The GNU Lesser
General Public License gives permission to release a modified
version without this exception; this exception also makes it
possible to release a modified version which carries forward this
exception.
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
<http://www.gnu.org/licenses/>. */
/* We need to call:
__libc_start_main (int (*main) (int, char **, char **), int argc,
char **argv, void (*init) (void), void (*fini) (void),
void (*rtld_fini) (void), void *stack_end)
*/
#include <sysdep.h>
.text
.globl _start;
.type _start,@function;
.align 4;
_start:
subi sp, 8
/* Clear the link register since this is the outermost frame. */
movi lr, 0
/* Pop argc off the stack and save a pointer to argv. */
ldw a1, (sp, 8) /* Init argc for __libc_start_main. */
addi a2, sp, 12 /* Init argv for __libc_start_main. */
/* Push stack limit. */
stw a2, (sp, 8)
/* Push rtld_fini. */
stw a0, (sp, 4)
#ifdef SHARED
grs t0, .Lgetpc
.Lgetpc:
lrw gb, .Lgetpc@GOTPC
addu gb, t0
lrw a3, __libc_csu_fini@GOT
ldr.w a3, (gb, a3 << 0)
stw a3, (sp, 0)
lrw a3, __libc_csu_init@GOT
addu a3, gb
ldw a3, (a3, 0)
lrw t0, main@GOT
addu t0, gb
ldw a0, (t0, 0)
lrw t1, __libc_start_main@PLT
ldr.w t1, (gb, t1 << 0)
jsr t1
lrw t1, abort@PLT
ldr.w t1, (gb, t1 << 0)
jsr t1
#else
/* Fetch address of __libc_csu_fini. */
lrw a0, __libc_csu_fini
/* Push __libc_csu_fini */
stw a0, (sp, 0)
/* Set up the other arguments in registers. */
lrw a0, main
lrw a3, __libc_csu_init
/* Let the libc call main and exit with its return code. */
jsri __libc_start_main
/* Should never get here. */
jsri abort
#endif /* !SHARED */
.size _start,.-_start
/* Define a symbol for the first piece of initialized data. */
.data
.globl __data_start
__data_start:
.long 0
.weak data_start
data_start = __data_start

View File

@ -1,9 +0,0 @@
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
#ifdef __CSKYBE__
# error "Big endian not supported for C-SKY."
#else
# define __BYTE_ORDER __LITTLE_ENDIAN
#endif

View File

@ -1,84 +0,0 @@
/* Assembler macros for C-SKY.
Copyright (C) 2018-2019 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
<http://www.gnu.org/licenses/>. */
#include <sysdeps/generic/sysdep.h>
#include <features.h>
#ifdef __ASSEMBLER__
# define ASM_SIZE_DIRECTIVE(name) .size name,.-name
/* Define an entry point visible from C. */
# define ENTRY(name) \
.globl name; \
.type name,@function; \
.align 4; \
name##:; \
cfi_startproc; \
CALL_MCOUNT
# undef END
# define END(name) \
cfi_endproc; \
ASM_SIZE_DIRECTIVE(name)
/* If compiled for profiling, call `mcount' at the start of each function. */
# ifdef PROF
# ifdef __PIC__
# define CALL_MCOUNT \
subi sp, 4; \
stw lr, (sp, 0); \
grs t0, .Lgetpc; \
.Lgetpc: \
lrw gb, .Lgetpc@GOTPC; \
addu gb, t0; \
lrw t1, _mcount@PLT; \
ldr.w t0, (gb, t1 << 0); \
jmp t0;
# else
# define CALL_MCOUNT \
subi sp, 4; \
stw lr, (sp, 0); \
jbsr _mcount;
# endif
# else
# define CALL_MCOUNT /* Do nothing. */
# endif
# if defined (__CK860__)
/* Instruction fetch will be faster when the label is 16 bytes aligned.
Filling with nop instruction to avoid extra jump. */
# define LABLE_ALIGN \
.balignw 16, 0x6c03
# define PRE_BNEZAD(R)
# define BNEZAD(R, L) \
bnezad R, L
# else
# define LABLE_ALIGN \
.balignw 8, 0x6c03
# define PRE_BNEZAD(R) \
subi R, 1
# define BNEZAD(R, L) \
bnez R, L
# endif
#endif

View File

@ -1,489 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _UAPI_ALPHA_UNISTD_H
#define _UAPI_ALPHA_UNISTD_H
#define __NR_osf_syscall 0 /* not implemented */
#define __NR_exit 1
#define __NR_fork 2
#define __NR_read 3
#define __NR_write 4
#define __NR_osf_old_open 5 /* not implemented */
#define __NR_close 6
#define __NR_osf_wait4 7
#define __NR_osf_old_creat 8 /* not implemented */
#define __NR_link 9
#define __NR_unlink 10
#define __NR_osf_execve 11 /* not implemented */
#define __NR_chdir 12
#define __NR_fchdir 13
#define __NR_mknod 14
#define __NR_chmod 15
#define __NR_chown 16
#define __NR_brk 17
#define __NR_osf_getfsstat 18 /* not implemented */
#define __NR_lseek 19
#define __NR_getxpid 20
#define __NR_osf_mount 21
#define __NR_umount 22
#define __NR_setuid 23
#define __NR_getxuid 24
#define __NR_exec_with_loader 25 /* not implemented */
#define __NR_ptrace 26
#define __NR_osf_nrecvmsg 27 /* not implemented */
#define __NR_osf_nsendmsg 28 /* not implemented */
#define __NR_osf_nrecvfrom 29 /* not implemented */
#define __NR_osf_naccept 30 /* not implemented */
#define __NR_osf_ngetpeername 31 /* not implemented */
#define __NR_osf_ngetsockname 32 /* not implemented */
#define __NR_access 33
#define __NR_osf_chflags 34 /* not implemented */
#define __NR_osf_fchflags 35 /* not implemented */
#define __NR_sync 36
#define __NR_kill 37
#define __NR_osf_old_stat 38 /* not implemented */
#define __NR_setpgid 39
#define __NR_osf_old_lstat 40 /* not implemented */
#define __NR_dup 41
#define __NR_pipe 42
#define __NR_osf_set_program_attributes 43
#define __NR_osf_profil 44 /* not implemented */
#define __NR_open 45
#define __NR_osf_old_sigaction 46 /* not implemented */
#define __NR_getxgid 47
#define __NR_osf_sigprocmask 48
#define __NR_osf_getlogin 49 /* not implemented */
#define __NR_osf_setlogin 50 /* not implemented */
#define __NR_acct 51
#define __NR_sigpending 52
#define __NR_ioctl 54
#define __NR_osf_reboot 55 /* not implemented */
#define __NR_osf_revoke 56 /* not implemented */
#define __NR_symlink 57
#define __NR_readlink 58
#define __NR_execve 59
#define __NR_umask 60
#define __NR_chroot 61
#define __NR_osf_old_fstat 62 /* not implemented */
#define __NR_getpgrp 63
#define __NR_getpagesize 64
#define __NR_osf_mremap 65 /* not implemented */
#define __NR_vfork 66
#define __NR_stat 67
#define __NR_lstat 68
#define __NR_osf_sbrk 69 /* not implemented */
#define __NR_osf_sstk 70 /* not implemented */
#define __NR_mmap 71 /* OSF/1 mmap is superset of Linux */
#define __NR_osf_old_vadvise 72 /* not implemented */
#define __NR_munmap 73
#define __NR_mprotect 74
#define __NR_madvise 75
#define __NR_vhangup 76
#define __NR_osf_kmodcall 77 /* not implemented */
#define __NR_osf_mincore 78 /* not implemented */
#define __NR_getgroups 79
#define __NR_setgroups 80
#define __NR_osf_old_getpgrp 81 /* not implemented */
#define __NR_setpgrp 82 /* BSD alias for setpgid */
#define __NR_osf_setitimer 83
#define __NR_osf_old_wait 84 /* not implemented */
#define __NR_osf_table 85 /* not implemented */
#define __NR_osf_getitimer 86
#define __NR_gethostname 87
#define __NR_sethostname 88
#define __NR_getdtablesize 89
#define __NR_dup2 90
#define __NR_fstat 91
#define __NR_fcntl 92
#define __NR_osf_select 93
#define __NR_poll 94
#define __NR_fsync 95
#define __NR_setpriority 96
#define __NR_socket 97
#define __NR_connect 98
#define __NR_accept 99
#define __NR_getpriority 100
#define __NR_send 101
#define __NR_recv 102
#define __NR_sigreturn 103
#define __NR_bind 104
#define __NR_setsockopt 105
#define __NR_listen 106
#define __NR_osf_plock 107 /* not implemented */
#define __NR_osf_old_sigvec 108 /* not implemented */
#define __NR_osf_old_sigblock 109 /* not implemented */
#define __NR_osf_old_sigsetmask 110 /* not implemented */
#define __NR_sigsuspend 111
#define __NR_osf_sigstack 112
#define __NR_recvmsg 113
#define __NR_sendmsg 114
#define __NR_osf_old_vtrace 115 /* not implemented */
#define __NR_osf_gettimeofday 116
#define __NR_osf_getrusage 117
#define __NR_getsockopt 118
#define __NR_readv 120
#define __NR_writev 121
#define __NR_osf_settimeofday 122
#define __NR_fchown 123
#define __NR_fchmod 124
#define __NR_recvfrom 125
#define __NR_setreuid 126
#define __NR_setregid 127
#define __NR_rename 128
#define __NR_truncate 129
#define __NR_ftruncate 130
#define __NR_flock 131
#define __NR_setgid 132
#define __NR_sendto 133
#define __NR_shutdown 134
#define __NR_socketpair 135
#define __NR_mkdir 136
#define __NR_rmdir 137
#define __NR_osf_utimes 138
#define __NR_osf_old_sigreturn 139 /* not implemented */
#define __NR_osf_adjtime 140 /* not implemented */
#define __NR_getpeername 141
#define __NR_osf_gethostid 142 /* not implemented */
#define __NR_osf_sethostid 143 /* not implemented */
#define __NR_getrlimit 144
#define __NR_setrlimit 145
#define __NR_osf_old_killpg 146 /* not implemented */
#define __NR_setsid 147
#define __NR_quotactl 148
#define __NR_osf_oldquota 149 /* not implemented */
#define __NR_getsockname 150
#define __NR_osf_pid_block 153 /* not implemented */
#define __NR_osf_pid_unblock 154 /* not implemented */
#define __NR_sigaction 156
#define __NR_osf_sigwaitprim 157 /* not implemented */
#define __NR_osf_nfssvc 158 /* not implemented */
#define __NR_osf_getdirentries 159
#define __NR_osf_statfs 160
#define __NR_osf_fstatfs 161
#define __NR_osf_asynch_daemon 163 /* not implemented */
#define __NR_osf_getfh 164 /* not implemented */
#define __NR_osf_getdomainname 165
#define __NR_setdomainname 166
#define __NR_osf_exportfs 169 /* not implemented */
#define __NR_osf_alt_plock 181 /* not implemented */
#define __NR_osf_getmnt 184 /* not implemented */
#define __NR_osf_alt_sigpending 187 /* not implemented */
#define __NR_osf_alt_setsid 188 /* not implemented */
#define __NR_osf_swapon 199
#define __NR_msgctl 200
#define __NR_msgget 201
#define __NR_msgrcv 202
#define __NR_msgsnd 203
#define __NR_semctl 204
#define __NR_semget 205
#define __NR_semop 206
#define __NR_osf_utsname 207
#define __NR_lchown 208
#define __NR_osf_shmat 209
#define __NR_shmctl 210
#define __NR_shmdt 211
#define __NR_shmget 212
#define __NR_osf_mvalid 213 /* not implemented */
#define __NR_osf_getaddressconf 214 /* not implemented */
#define __NR_osf_msleep 215 /* not implemented */
#define __NR_osf_mwakeup 216 /* not implemented */
#define __NR_msync 217
#define __NR_osf_signal 218 /* not implemented */
#define __NR_osf_utc_gettime 219 /* not implemented */
#define __NR_osf_utc_adjtime 220 /* not implemented */
#define __NR_osf_security 222 /* not implemented */
#define __NR_osf_kloadcall 223 /* not implemented */
#define __NR_osf_stat 224
#define __NR_osf_lstat 225
#define __NR_osf_fstat 226
#define __NR_osf_statfs64 227
#define __NR_osf_fstatfs64 228
#define __NR_getpgid 233
#define __NR_getsid 234
#define __NR_sigaltstack 235
#define __NR_osf_waitid 236 /* not implemented */
#define __NR_osf_priocntlset 237 /* not implemented */
#define __NR_osf_sigsendset 238 /* not implemented */
#define __NR_osf_set_speculative 239 /* not implemented */
#define __NR_osf_msfs_syscall 240 /* not implemented */
#define __NR_osf_sysinfo 241
#define __NR_osf_uadmin 242 /* not implemented */
#define __NR_osf_fuser 243 /* not implemented */
#define __NR_osf_proplist_syscall 244
#define __NR_osf_ntp_adjtime 245 /* not implemented */
#define __NR_osf_ntp_gettime 246 /* not implemented */
#define __NR_osf_pathconf 247 /* not implemented */
#define __NR_osf_fpathconf 248 /* not implemented */
#define __NR_osf_uswitch 250 /* not implemented */
#define __NR_osf_usleep_thread 251
#define __NR_osf_audcntl 252 /* not implemented */
#define __NR_osf_audgen 253 /* not implemented */
#define __NR_sysfs 254
#define __NR_osf_subsys_info 255 /* not implemented */
#define __NR_osf_getsysinfo 256
#define __NR_osf_setsysinfo 257
#define __NR_osf_afs_syscall 258 /* not implemented */
#define __NR_osf_swapctl 259 /* not implemented */
#define __NR_osf_memcntl 260 /* not implemented */
#define __NR_osf_fdatasync 261 /* not implemented */
/*
* Ignore legacy syscalls that we don't use.
*/
#define __IGNORE_alarm
#define __IGNORE_creat
#define __IGNORE_getegid
#define __IGNORE_geteuid
#define __IGNORE_getgid
#define __IGNORE_getpid
#define __IGNORE_getppid
#define __IGNORE_getuid
#define __IGNORE_pause
#define __IGNORE_time
#define __IGNORE_utime
#define __IGNORE_umount2
/*
* Linux-specific system calls begin at 300
*/
#define __NR_bdflush 300
#define __NR_sethae 301
#define __NR_mount 302
#define __NR_old_adjtimex 303
#define __NR_swapoff 304
#define __NR_getdents 305
#define __NR_create_module 306
#define __NR_init_module 307
#define __NR_delete_module 308
#define __NR_get_kernel_syms 309
#define __NR_syslog 310
#define __NR_reboot 311
#define __NR_clone 312
#define __NR_uselib 313
#define __NR_mlock 314
#define __NR_munlock 315
#define __NR_mlockall 316
#define __NR_munlockall 317
#define __NR_sysinfo 318
#define __NR__sysctl 319
/* 320 was sys_idle. */
#define __NR_oldumount 321
#define __NR_swapon 322
#define __NR_times 323
#define __NR_personality 324
#define __NR_setfsuid 325
#define __NR_setfsgid 326
#define __NR_ustat 327
#define __NR_statfs 328
#define __NR_fstatfs 329
#define __NR_sched_setparam 330
#define __NR_sched_getparam 331
#define __NR_sched_setscheduler 332
#define __NR_sched_getscheduler 333
#define __NR_sched_yield 334
#define __NR_sched_get_priority_max 335
#define __NR_sched_get_priority_min 336
#define __NR_sched_rr_get_interval 337
#define __NR_afs_syscall 338
#define __NR_uname 339
#define __NR_nanosleep 340
#define __NR_mremap 341
#define __NR_nfsservctl 342
#define __NR_setresuid 343
#define __NR_getresuid 344
#define __NR_pciconfig_read 345
#define __NR_pciconfig_write 346
#define __NR_query_module 347
#define __NR_prctl 348
#define __NR_pread64 349
#define __NR_pwrite64 350
#define __NR_rt_sigreturn 351
#define __NR_rt_sigaction 352
#define __NR_rt_sigprocmask 353
#define __NR_rt_sigpending 354
#define __NR_rt_sigtimedwait 355
#define __NR_rt_sigqueueinfo 356
#define __NR_rt_sigsuspend 357
#define __NR_select 358
#define __NR_gettimeofday 359
#define __NR_settimeofday 360
#define __NR_getitimer 361
#define __NR_setitimer 362
#define __NR_utimes 363
#define __NR_getrusage 364
#define __NR_wait4 365
#define __NR_adjtimex 366
#define __NR_getcwd 367
#define __NR_capget 368
#define __NR_capset 369
#define __NR_sendfile 370
#define __NR_setresgid 371
#define __NR_getresgid 372
#define __NR_dipc 373
#define __NR_pivot_root 374
#define __NR_mincore 375
#define __NR_pciconfig_iobase 376
#define __NR_getdents64 377
#define __NR_gettid 378
#define __NR_readahead 379
/* 380 is unused */
#define __NR_tkill 381
#define __NR_setxattr 382
#define __NR_lsetxattr 383
#define __NR_fsetxattr 384
#define __NR_getxattr 385
#define __NR_lgetxattr 386
#define __NR_fgetxattr 387
#define __NR_listxattr 388
#define __NR_llistxattr 389
#define __NR_flistxattr 390
#define __NR_removexattr 391
#define __NR_lremovexattr 392
#define __NR_fremovexattr 393
#define __NR_futex 394
#define __NR_sched_setaffinity 395
#define __NR_sched_getaffinity 396
#define __NR_tuxcall 397
#define __NR_io_setup 398
#define __NR_io_destroy 399
#define __NR_io_getevents 400
#define __NR_io_submit 401
#define __NR_io_cancel 402
#define __NR_exit_group 405
#define __NR_lookup_dcookie 406
#define __NR_epoll_create 407
#define __NR_epoll_ctl 408
#define __NR_epoll_wait 409
#define __NR_remap_file_pages 410
#define __NR_set_tid_address 411
#define __NR_restart_syscall 412
#define __NR_fadvise64 413
#define __NR_timer_create 414
#define __NR_timer_settime 415
#define __NR_timer_gettime 416
#define __NR_timer_getoverrun 417
#define __NR_timer_delete 418
#define __NR_clock_settime 419
#define __NR_clock_gettime 420
#define __NR_clock_getres 421
#define __NR_clock_nanosleep 422
#define __NR_semtimedop 423
#define __NR_tgkill 424
#define __NR_stat64 425
#define __NR_lstat64 426
#define __NR_fstat64 427
#define __NR_vserver 428
#define __NR_mbind 429
#define __NR_get_mempolicy 430
#define __NR_set_mempolicy 431
#define __NR_mq_open 432
#define __NR_mq_unlink 433
#define __NR_mq_timedsend 434
#define __NR_mq_timedreceive 435
#define __NR_mq_notify 436
#define __NR_mq_getsetattr 437
#define __NR_waitid 438
#define __NR_add_key 439
#define __NR_request_key 440
#define __NR_keyctl 441
#define __NR_ioprio_set 442
#define __NR_ioprio_get 443
#define __NR_inotify_init 444
#define __NR_inotify_add_watch 445
#define __NR_inotify_rm_watch 446
#define __NR_fdatasync 447
#define __NR_kexec_load 448
#define __NR_migrate_pages 449
#define __NR_openat 450
#define __NR_mkdirat 451
#define __NR_mknodat 452
#define __NR_fchownat 453
#define __NR_futimesat 454
#define __NR_fstatat64 455
#define __NR_unlinkat 456
#define __NR_renameat 457
#define __NR_linkat 458
#define __NR_symlinkat 459
#define __NR_readlinkat 460
#define __NR_fchmodat 461
#define __NR_faccessat 462
#define __NR_pselect6 463
#define __NR_ppoll 464
#define __NR_unshare 465
#define __NR_set_robust_list 466
#define __NR_get_robust_list 467
#define __NR_splice 468
#define __NR_sync_file_range 469
#define __NR_tee 470
#define __NR_vmsplice 471
#define __NR_move_pages 472
#define __NR_getcpu 473
#define __NR_epoll_pwait 474
#define __NR_utimensat 475
#define __NR_signalfd 476
#define __NR_timerfd 477
#define __NR_eventfd 478
#define __NR_recvmmsg 479
#define __NR_fallocate 480
#define __NR_timerfd_create 481
#define __NR_timerfd_settime 482
#define __NR_timerfd_gettime 483
#define __NR_signalfd4 484
#define __NR_eventfd2 485
#define __NR_epoll_create1 486
#define __NR_dup3 487
#define __NR_pipe2 488
#define __NR_inotify_init1 489
#define __NR_preadv 490
#define __NR_pwritev 491
#define __NR_rt_tgsigqueueinfo 492
#define __NR_perf_event_open 493
#define __NR_fanotify_init 494
#define __NR_fanotify_mark 495
#define __NR_prlimit64 496
#define __NR_name_to_handle_at 497
#define __NR_open_by_handle_at 498
#define __NR_clock_adjtime 499
#define __NR_syncfs 500
#define __NR_setns 501
#define __NR_accept4 502
#define __NR_sendmmsg 503
#define __NR_process_vm_readv 504
#define __NR_process_vm_writev 505
#define __NR_kcmp 506
#define __NR_finit_module 507
#define __NR_sched_setattr 508
#define __NR_sched_getattr 509
#define __NR_renameat2 510
#define __NR_getrandom 511
#define __NR_memfd_create 512
#define __NR_execveat 513
#define __NR_seccomp 514
#define __NR_bpf 515
#define __NR_userfaultfd 516
#define __NR_membarrier 517
#define __NR_mlock2 518
#define __NR_copy_file_range 519
#define __NR_preadv2 520
#define __NR_pwritev2 521
#define __NR_statx 522
/* Alpha doesn't have protection keys. */
#define __IGNORE_pkey_mprotect
#define __IGNORE_pkey_alloc
#define __IGNORE_pkey_free
#endif /* _UAPI_ALPHA_UNISTD_H */

View File

@ -1,10 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#define __ARCH_WANT_SYS_CLONE
#include <asm-generic/unistd.h>
#define __NR_set_thread_area (__NR_arch_specific_syscall + 0)
__SYSCALL(__NR_set_thread_area, sys_set_thread_area)
#define __NR_cacheflush (__NR_arch_specific_syscall + 1)
__SYSCALL(__NR_cacheflush, sys_cacheflush)

View File

@ -1,534 +0,0 @@
/* Assembly macros for C-SKY.
Copyright (C) 2018-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _LINUX_CSKY_SYSDEP_H
#define _LINUX_CSKY_SYSDEP_H 1
/* There is some commonality. */
#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
#include <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/csky/sysdep.h>
/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */
#include <dl-sysdep.h>
#include <tls.h>
/* In order to get __set_errno() definition in INLINE_SYSCALL. */
#ifndef __ASSEMBLER__
# include <errno.h>
#endif
#undef SYS_ify
#define SYS_ify(syscall_name) (__NR_##syscall_name)
#ifdef __ASSEMBLER__
/* Linux uses a negative return value to indicate syscall errors,
unlike most Unices, which use the condition codes' carry flag.
Since version 2.1 the return value of a system call might be
negative even if the call succeeded. E.g., the `lseek' system call
might return a large offset. Therefore we must not anymore test
for < 0, but test for a real error by making sure the value in R0
is a real error number. Linus said he will make sure the no syscall
returns a value in -1 .. -4095 as a valid result so we can safely
test with -4095. */
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
.text; \
ENTRY (name); \
DO_CALL (syscall_name, args);
# define GETGB \
grs t0, .Lgetpc; \
.Lgetpc: \
lrw gb, .Lgetpc@GOTPC; \
addu gb, t0;
# if IS_IN (libc)
# ifdef __PIC__
# define PSEUDO_RET \
btsti a0, 31; \
bf 1f; \
subi sp, 8; \
st.w lr, (sp); \
st.w gb, (sp, 4); \
GETGB; \
lrw a2, SYSCALL_ERROR@PLT; \
add a2, gb; \
ld.w a2, (a2); \
jsr a2; \
ld.w lr, (sp); \
ld.w gb, (sp, 4); \
addi sp, 8; \
1: \
rts
# else
# define PSEUDO_RET \
btsti a0, 31; \
bf 1f; \
jmpi SYSCALL_ERROR; \
1: \
rts
# endif
# else
# ifdef __PIC__
# define PSEUDO_RET \
btsti a0, 31; \
bf 1f; \
subi sp, 8; \
st.w lr, (sp); \
st.w gb, (sp, 4); \
GETGB; \
bsr SYSCALL_ERROR; \
ld.w lr, (sp); \
ld.w gb, (sp, 4); \
addi sp, 8; \
1: \
rts
# else
# define PSEUDO_RET \
btsti a0, 31; \
bt SYSCALL_ERROR; \
rts
# endif
# endif
# undef ret
# define ret PSEUDO_RET
# undef PSEUDO_END
# define PSEUDO_END(name) \
.align 4; \
SYSCALL_ERROR_HANDLER; \
END (name)
# undef PSEUDO_NOERRNO
# define PSEUDO_NOERRNO(name, syscall_name, args) \
.text; \
ENTRY (name); \
DO_CALL (syscall_name, args)
# define PSEUDO_RET_NOERRNO rts
# undef ret_NOERRNO
# define ret_NOERRNO PSEUDO_RET_NOERRNO
# undef PSEUDO_END_NOERRNO
# define PSEUDO_END_NOERRNO(name) END (name)
/* The function has to return the error code. */
# undef PSEUDO_ERRVAL
# define PSEUDO_ERRVAL(name, syscall_name, args) \
.text; \
ENTRY (name) \
DO_CALL (syscall_name, args); \
not a0; \
addi a0, 1
# undef PSEUDO_END_ERRVAL
# define PSEUDO_END_ERRVAL(name) END (name)
# define ret_ERRVAL rts
# if !IS_IN (libc)
# define SYSCALL_ERROR __local_syscall_error
# if RTLD_PRIVATE_ERRNO
# ifdef __PIC__
# define SYSCALL_ERROR_HANDLER \
__local_syscall_error: \
lrw a1, rtld_errno@PLT; \
addu a1, gb; \
ldw a1, (a1); \
rsubi a0, 0; \
stw a0, (a1); \
bmaski a0, 0; \
rts
# else /* __PIC__ */
# define SYSCALL_ERROR_HANDLER \
__local_syscall_error: \
lrw a1, rtld_errno; \
rsubi a0, 0; \
stw a0, (a1); \
bmaski a0, 0; \
rts
# endif /* __PIC__ */
# else /* !RTLD_PRIVATE_ERRNO */
# ifdef __PIC__
# define SYSCALL_ERROR_HANDLER \
__local_syscall_error: \
subi sp, 8; \
stw a0, (sp, 0); \
stw r15, (sp, 4); \
lrw a1, __errno_location@PLT; \
add a1, gb; \
ldw a1, (a1); \
jsr a1; \
ldw a1, (sp, 0); /* load errno*/ \
ldw r15, (sp, 4); \
addi sp, 8; \
movi a2, 0; \
rsub a1, a1, a2; \
stw a1, (a0); \
bmaski a0, 0; \
rts
# else
# define SYSCALL_ERROR_HANDLER \
__local_syscall_error: \
subi sp, 8; \
stw a0, (sp, 0); \
stw r15, (sp, 4); \
lrw a1, __errno_location; \
jsr a1; \
ldw a1, (sp, 0); /* load errno */ \
ldw r15, (sp, 4); \
addi sp, 8; \
movi a2, 0; \
rsub a1, a1, a2; \
stw a1, (a0); \
bmaski a0, 0; \
rts
# endif /* __PIC__ */
# endif/* RTLD_PRIVATE_ERROR */
# else
# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
# define SYSCALL_ERROR __syscall_error
# endif/* IS_IN (libc) */
/* define DO_CALL */
# undef DO_CALL
# define DO_CALL(syscall_name, args) \
DOARGS_##args; \
lrw r7, SYS_ify(syscall_name); \
trap 0; \
UNDOARGS_##args
# undef DOARGS_0
# define DOARGS_0 \
subi sp, 8; \
cfi_adjust_cfa_offset (8); \
stw r7, (sp, 0); \
cfi_rel_offset (r7, 0);
# undef DOARGS_1
# define DOARGS_1 DOARGS_0
# undef DOARGS_2
# define DOARGS_2 DOARGS_0
# undef DOARGS_3
# define DOARGS_3 DOARGS_0
# undef DOARGS_4
# define DOARGS_4 DOARGS_0
# undef DOARGS_5
# define DOARGS_5 \
subi sp, 8; \
cfi_adjust_cfa_offset (8); \
stw r7, (sp, 0); \
cfi_rel_offset (7, 0); \
stw r4, (sp, 4); \
cfi_rel_offset (4, 4); \
ldw r4, (sp, 8)
# undef DOARGS_6
# define DOARGS_6 \
subi sp, 16; \
cfi_adjust_cfa_offset (16); \
stw r7, (sp, 0); \
cfi_rel_offset (7, 0); \
stw r4, (sp, 4); \
cfi_rel_offset (4, 4); \
stw r5, (sp, 8); \
cfi_rel_offset (5, 8); \
ldw r4, (sp, 16); \
ldw r5, (sp, 20)
# undef UNDOARGS_0
# define UNDOARGS_0 \
ldw r7, (sp, 0); \
cfi_restore (r7); \
addi sp, 8; \
cfi_adjust_cfa_offset (-8);
# undef UNDOARGS_1
# define UNDOARGS_1 UNDOARGS_0
# undef UNDOARGS_2
# define UNDOARGS_2 UNDOARGS_0
# undef UNDOARGS_3
# define UNDOARGS_3 UNDOARGS_0
# undef UNDOARGS_4
# define UNDOARGS_4 UNDOARGS_0
# undef UNDOARGS_5
# define UNDOARGS_5 \
ldw r7, (sp, 0); \
cfi_restore (r4); \
ldw r4, (sp, 4); \
cfi_restore (r4); \
addi sp, 8; \
cfi_adjust_cfa_offset (-8);
# undef UNDOARGS_6
# define UNDOARGS_6 \
ldw r7, (sp, 0); \
cfi_restore (r7); \
ldw r4, (sp, 4); \
cfi_restore (r4); \
ldw r5, (sp, 8); \
cfi_restore (r5); \
addi sp, 16; \
cfi_adjust_cfa_offset (-16);
#else /* not __ASSEMBLER__ */
/* Define a macro which expands into the inline wrapper code for a system
call. */
# undef INLINE_SYSCALL
# define INLINE_SYSCALL(name, nr, args...) \
({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args); \
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result,), 0)) \
{ \
__set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \
_sys_result = (unsigned int) -1; \
} \
(int) _sys_result; })
# undef INTERNAL_SYSCALL_DECL
# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
# undef INTERNAL_SYSCALL_ERROR_P
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
((unsigned int) (val) >= 0xffffff01u)
# undef INTERNAL_SYSCALL_ERRNO
# define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
# undef INTERNAL_SYSCALL_RAW
# define INTERNAL_SYSCALL_RAW0(name, err, dummy...) \
({unsigned int __sys_result; \
{ \
register int _a1 __asm__ ("a0"), _nr __asm__ ("r7"); \
_nr = name; \
__asm__ __volatile__ ("trap 0 \n\t" \
: "=r" (_a1) \
: "r" (_nr) \
: "memory"); \
__sys_result = _a1; \
} \
(int) __sys_result; })
# define INTERNAL_SYSCALL_RAW1(name, err, arg1) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1); \
{ \
register int _a1 __asm__ ("a0"), _nr __asm__ ("r7"); \
_a1 = _tmp_arg1; \
_nr = name; \
__asm__ __volatile__ ("trap 0 \n\t" \
: "=r" (_a1) \
: "r" (_nr), "r" (_a1) \
: "memory"); \
__sys_result = _a1; \
} \
(int) __sys_result; })
# define INTERNAL_SYSCALL_RAW2(name, err, arg1, arg2) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
{ \
register int _nr __asm__ ("r7"); \
register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \
_a1 = _tmp_arg1, _a2 = _tmp_arg2; \
_nr = name; \
__asm__ __volatile__ ("trap 0 \n\t" \
: "=r" (_a1) \
: "r" (_nr), "r" (_a1), "r" (_a2) \
: "memory"); \
__sys_result = _a1; \
} \
(int) __sys_result; })
# define INTERNAL_SYSCALL_RAW3(name, err, arg1, arg2, arg3) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
register int _tmp_arg3 = (int)(arg3); \
{ \
register int _nr __asm__ ("r7"); \
register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \
register int _a3 __asm__ ("a2"); \
_a1 = _tmp_arg1; \
_a2 = _tmp_arg2; \
_a3 = _tmp_arg3; \
_nr = name; \
__asm__ __volatile__ ("trap 0 \n\t" \
: "=r" (_a1) \
: "r" (_nr), "r" (_a1), "r" (_a2), \
"r" (_a3) \
: "memory"); \
__sys_result = _a1; \
} \
(int) __sys_result; })
# define INTERNAL_SYSCALL_RAW4(name, err, arg1, arg2, arg3, arg4) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4); \
{ \
register int _nr __asm__ ("r7"); \
register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \
register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3"); \
_a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3; \
_a4 = _tmp_arg4; \
_nr = name; \
__asm__ __volatile__ ("trap 0 \n\t" \
: "=r" (_a1) \
: "r" (_nr), "r" (_a1), "r" (_a2), \
"r" (_a3), "r" (_a4) \
: "memory"); \
__sys_result = _a1; \
} \
(int) __sys_result; })
# define INTERNAL_SYSCALL_RAW5(name, err, arg1, arg2, arg3, arg4, \
arg5) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4); \
register int _tmp_arg5 = (int)(arg5); \
{ \
register int _nr __asm__ ("r7"); \
register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \
register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3"); \
register int _a5 __asm__ ("r4"); \
_a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3; \
_a4 = _tmp_arg4, _a5 = _tmp_arg5; \
_nr = name; \
__asm__ __volatile__ ("trap 0 \n\t" \
: "=r" (_a1) \
: "r" (_nr), "r" (_a1), "r" (_a2), \
"r" (_a3), "r" (_a4), "r" (_a5) \
: "memory"); \
__sys_result = _a1; \
} \
(int) __sys_result; })
# define INTERNAL_SYSCALL_RAW6(name, err, arg1, arg2, arg3, arg4, \
arg5, arg6) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4); \
register int _tmp_arg5 = (int)(arg5), _tmp_arg6 = (int)(arg6); \
{ \
register int _nr __asm__ ("r7"); \
register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \
register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3"); \
register int _a5 __asm__ ("r4"), _a6 __asm__ ("r5"); \
_a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3; \
_a4 = _tmp_arg4, _a5 = _tmp_arg5, _a6 = _tmp_arg6; \
_nr = name; \
__asm__ __volatile__ ("trap 0 \n\t" \
: "=r" (_a1) \
: "r" (_nr), "r" (_a1), "r" (_a2), \
"r" (_a3), "r" (_a4), "r" (_a5), \
"r" (_a6) \
: "memory"); \
__sys_result = _a1; \
} \
(int) __sys_result; })
# define INTERNAL_SYSCALL_RAW7(name, err, arg1, arg2, arg3, arg4, \
arg5, arg6, arg7) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4); \
register int _tmp_arg5 = (int)(arg5), _tmp_arg6 = (int)(arg6); \
register int _tmp_arg7 = (int)(arg7); \
{ \
register int _nr __asm__ ("r7"); \
register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \
register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3"); \
register int _a5 __asm__ ("r4"), _a6 __asm__ ("r5"); \
register int _a7 __asm__ ("r6"); \
_a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3; \
_a4 = _tmp_arg4, _a5 = _tmp_arg5, _a6 = _tmp_arg6; \
_a7 = _tmp_arg7; \
_nr = name; \
__asm__ __volatile__ ("trap 0 \n\t" \
: "=r" (_a1) \
: "r" (_nr), "r" (_a1), "r" (_a2), \
"r" (_a3), "r" (_a4), "r" (_a5), \
"r" (_a6), "r" (_a7) \
: "memory"); \
__sys_result = _a1; \
} \
(int) __sys_result; })
# undef INTERNAL_SYSCALL
# define INTERNAL_SYSCALL(name, err, nr, args...) \
INTERNAL_SYSCALL_RAW##nr(SYS_ify(name), err, args)
# undef INTERNAL_SYSCALL_NCS
# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
INTERNAL_SYSCALL_RAW##nr (number, err, args)
#endif /* __ASSEMBLER__ */
/* Pointer mangling support. */
#if (IS_IN (rtld) || \
(!defined SHARED && (IS_IN (libc) || IS_IN (libpthread))))
# ifdef __ASSEMBLER__
# define PTR_MANGLE(dst, src, guard) \
grs t0, 1f; \
1: \
lrw guard, 1b@GOTPC; \
addu t0, guard; \
lrw guard, __pointer_chk_guard_local@GOT; \
ldr.w guard, (t0, guard << 0); \
ldw guard, (guard, 0); \
xor dst, src, guard;
# define PTR_DEMANGLE(dst, src, guard) PTR_MANGLE (dst, src, guard)
# define PTR_MANGLE2(dst, src, guard) \
xor dst, src, guard
# define PTR_DEMANGLE2(dst, src, guard) PTR_MANGLE2 (dst, src, guard)
# else
extern uintptr_t __pointer_chk_guard_local;
# define PTR_MANGLE(var) \
(var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
# define PTR_DEMANGLE(var) PTR_MANGLE (var)
# endif
#else
# ifdef __ASSEMBLER__
# define PTR_MANGLE(dst, src, guard) \
grs t0, 1f; \
1: \
lrw guard, 1b@GOTPC; \
addu t0, guard; \
lrw guard, __pointer_chk_guard@GOT; \
ldr.w guard, (t0, guard << 0); \
ldw guard, (guard, 0); \
xor dst, src, guard;
# define PTR_DEMANGLE(dst, src, guard) PTR_MANGLE (dst, src, guard)
# define PTR_MANGLE2(dst, src, guard) \
xor dst, src, guard
# define PTR_DEMANGLE2(dst, src, guard) PTR_MANGLE2 (dst, src, guard)
# else
extern uintptr_t __pointer_chk_guard;
# define PTR_MANGLE(var) \
(var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard)
# define PTR_DEMANGLE(var) PTR_MANGLE (var)
# endif
#endif
#endif /* linux/csky/sysdep.h */

View File

@ -1,23 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _ASM_IA64_BREAK_H
#define _ASM_IA64_BREAK_H
/*
* IA-64 Linux break numbers.
*
* Copyright (C) 1999 Hewlett-Packard Co
* Copyright (C) 1999 David Mosberger-Tang <davidm@hpl.hp.com>
*/
/*
* OS-specific debug break numbers:
*/
#define __IA64_BREAK_KDB 0x80100
#define __IA64_BREAK_KPROBE 0x81000 /* .. 0x81fff */
/*
* OS-specific break numbers:
*/
#define __IA64_BREAK_SYSCALL 0x100000
#endif /* _ASM_IA64_BREAK_H */

View File

@ -1,344 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* IA-64 Linux syscall numbers and inline-functions.
*
* Copyright (C) 1998-2005 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
#ifndef _UAPI_ASM_IA64_UNISTD_H
#define _UAPI_ASM_IA64_UNISTD_H
#include <asm/break.h>
#define __BREAK_SYSCALL __IA64_BREAK_SYSCALL
#define __NR_ni_syscall 1024
#define __NR_exit 1025
#define __NR_read 1026
#define __NR_write 1027
#define __NR_open 1028
#define __NR_close 1029
#define __NR_creat 1030
#define __NR_link 1031
#define __NR_unlink 1032
#define __NR_execve 1033
#define __NR_chdir 1034
#define __NR_fchdir 1035
#define __NR_utimes 1036
#define __NR_mknod 1037
#define __NR_chmod 1038
#define __NR_chown 1039
#define __NR_lseek 1040
#define __NR_getpid 1041
#define __NR_getppid 1042
#define __NR_mount 1043
#define __NR_umount 1044
#define __NR_setuid 1045
#define __NR_getuid 1046
#define __NR_geteuid 1047
#define __NR_ptrace 1048
#define __NR_access 1049
#define __NR_sync 1050
#define __NR_fsync 1051
#define __NR_fdatasync 1052
#define __NR_kill 1053
#define __NR_rename 1054
#define __NR_mkdir 1055
#define __NR_rmdir 1056
#define __NR_dup 1057
#define __NR_pipe 1058
#define __NR_times 1059
#define __NR_brk 1060
#define __NR_setgid 1061
#define __NR_getgid 1062
#define __NR_getegid 1063
#define __NR_acct 1064
#define __NR_ioctl 1065
#define __NR_fcntl 1066
#define __NR_umask 1067
#define __NR_chroot 1068
#define __NR_ustat 1069
#define __NR_dup2 1070
#define __NR_setreuid 1071
#define __NR_setregid 1072
#define __NR_getresuid 1073
#define __NR_setresuid 1074
#define __NR_getresgid 1075
#define __NR_setresgid 1076
#define __NR_getgroups 1077
#define __NR_setgroups 1078
#define __NR_getpgid 1079
#define __NR_setpgid 1080
#define __NR_setsid 1081
#define __NR_getsid 1082
#define __NR_sethostname 1083
#define __NR_setrlimit 1084
#define __NR_getrlimit 1085
#define __NR_getrusage 1086
#define __NR_gettimeofday 1087
#define __NR_settimeofday 1088
#define __NR_select 1089
#define __NR_poll 1090
#define __NR_symlink 1091
#define __NR_readlink 1092
#define __NR_uselib 1093
#define __NR_swapon 1094
#define __NR_swapoff 1095
#define __NR_reboot 1096
#define __NR_truncate 1097
#define __NR_ftruncate 1098
#define __NR_fchmod 1099
#define __NR_fchown 1100
#define __NR_getpriority 1101
#define __NR_setpriority 1102
#define __NR_statfs 1103
#define __NR_fstatfs 1104
#define __NR_gettid 1105
#define __NR_semget 1106
#define __NR_semop 1107
#define __NR_semctl 1108
#define __NR_msgget 1109
#define __NR_msgsnd 1110
#define __NR_msgrcv 1111
#define __NR_msgctl 1112
#define __NR_shmget 1113
#define __NR_shmat 1114
#define __NR_shmdt 1115
#define __NR_shmctl 1116
/* also known as klogctl() in GNU libc: */
#define __NR_syslog 1117
#define __NR_setitimer 1118
#define __NR_getitimer 1119
/* 1120 was __NR_old_stat */
/* 1121 was __NR_old_lstat */
/* 1122 was __NR_old_fstat */
#define __NR_vhangup 1123
#define __NR_lchown 1124
#define __NR_remap_file_pages 1125
#define __NR_wait4 1126
#define __NR_sysinfo 1127
#define __NR_clone 1128
#define __NR_setdomainname 1129
#define __NR_uname 1130
#define __NR_adjtimex 1131
/* 1132 was __NR_create_module */
#define __NR_init_module 1133
#define __NR_delete_module 1134
/* 1135 was __NR_get_kernel_syms */
/* 1136 was __NR_query_module */
#define __NR_quotactl 1137
#define __NR_bdflush 1138
#define __NR_sysfs 1139
#define __NR_personality 1140
#define __NR_afs_syscall 1141
#define __NR_setfsuid 1142
#define __NR_setfsgid 1143
#define __NR_getdents 1144
#define __NR_flock 1145
#define __NR_readv 1146
#define __NR_writev 1147
#define __NR_pread64 1148
#define __NR_pwrite64 1149
#define __NR__sysctl 1150
#define __NR_mmap 1151
#define __NR_munmap 1152
#define __NR_mlock 1153
#define __NR_mlockall 1154
#define __NR_mprotect 1155
#define __NR_mremap 1156
#define __NR_msync 1157
#define __NR_munlock 1158
#define __NR_munlockall 1159
#define __NR_sched_getparam 1160
#define __NR_sched_setparam 1161
#define __NR_sched_getscheduler 1162
#define __NR_sched_setscheduler 1163
#define __NR_sched_yield 1164
#define __NR_sched_get_priority_max 1165
#define __NR_sched_get_priority_min 1166
#define __NR_sched_rr_get_interval 1167
#define __NR_nanosleep 1168
#define __NR_nfsservctl 1169
#define __NR_prctl 1170
/* 1171 is reserved for backwards compatibility with old __NR_getpagesize */
#define __NR_mmap2 1172
#define __NR_pciconfig_read 1173
#define __NR_pciconfig_write 1174
#define __NR_perfmonctl 1175
#define __NR_sigaltstack 1176
#define __NR_rt_sigaction 1177
#define __NR_rt_sigpending 1178
#define __NR_rt_sigprocmask 1179
#define __NR_rt_sigqueueinfo 1180
#define __NR_rt_sigreturn 1181
#define __NR_rt_sigsuspend 1182
#define __NR_rt_sigtimedwait 1183
#define __NR_getcwd 1184
#define __NR_capget 1185
#define __NR_capset 1186
#define __NR_sendfile 1187
#define __NR_getpmsg 1188
#define __NR_putpmsg 1189
#define __NR_socket 1190
#define __NR_bind 1191
#define __NR_connect 1192
#define __NR_listen 1193
#define __NR_accept 1194
#define __NR_getsockname 1195
#define __NR_getpeername 1196
#define __NR_socketpair 1197
#define __NR_send 1198
#define __NR_sendto 1199
#define __NR_recv 1200
#define __NR_recvfrom 1201
#define __NR_shutdown 1202
#define __NR_setsockopt 1203
#define __NR_getsockopt 1204
#define __NR_sendmsg 1205
#define __NR_recvmsg 1206
#define __NR_pivot_root 1207
#define __NR_mincore 1208
#define __NR_madvise 1209
#define __NR_stat 1210
#define __NR_lstat 1211
#define __NR_fstat 1212
#define __NR_clone2 1213
#define __NR_getdents64 1214
#define __NR_getunwind 1215
#define __NR_readahead 1216
#define __NR_setxattr 1217
#define __NR_lsetxattr 1218
#define __NR_fsetxattr 1219
#define __NR_getxattr 1220
#define __NR_lgetxattr 1221
#define __NR_fgetxattr 1222
#define __NR_listxattr 1223
#define __NR_llistxattr 1224
#define __NR_flistxattr 1225
#define __NR_removexattr 1226
#define __NR_lremovexattr 1227
#define __NR_fremovexattr 1228
#define __NR_tkill 1229
#define __NR_futex 1230
#define __NR_sched_setaffinity 1231
#define __NR_sched_getaffinity 1232
#define __NR_set_tid_address 1233
#define __NR_fadvise64 1234
#define __NR_tgkill 1235
#define __NR_exit_group 1236
#define __NR_lookup_dcookie 1237
#define __NR_io_setup 1238
#define __NR_io_destroy 1239
#define __NR_io_getevents 1240
#define __NR_io_submit 1241
#define __NR_io_cancel 1242
#define __NR_epoll_create 1243
#define __NR_epoll_ctl 1244
#define __NR_epoll_wait 1245
#define __NR_restart_syscall 1246
#define __NR_semtimedop 1247
#define __NR_timer_create 1248
#define __NR_timer_settime 1249
#define __NR_timer_gettime 1250
#define __NR_timer_getoverrun 1251
#define __NR_timer_delete 1252
#define __NR_clock_settime 1253
#define __NR_clock_gettime 1254
#define __NR_clock_getres 1255
#define __NR_clock_nanosleep 1256
#define __NR_fstatfs64 1257
#define __NR_statfs64 1258
#define __NR_mbind 1259
#define __NR_get_mempolicy 1260
#define __NR_set_mempolicy 1261
#define __NR_mq_open 1262
#define __NR_mq_unlink 1263
#define __NR_mq_timedsend 1264
#define __NR_mq_timedreceive 1265
#define __NR_mq_notify 1266
#define __NR_mq_getsetattr 1267
#define __NR_kexec_load 1268
#define __NR_vserver 1269
#define __NR_waitid 1270
#define __NR_add_key 1271
#define __NR_request_key 1272
#define __NR_keyctl 1273
#define __NR_ioprio_set 1274
#define __NR_ioprio_get 1275
#define __NR_move_pages 1276
#define __NR_inotify_init 1277
#define __NR_inotify_add_watch 1278
#define __NR_inotify_rm_watch 1279
#define __NR_migrate_pages 1280
#define __NR_openat 1281
#define __NR_mkdirat 1282
#define __NR_mknodat 1283
#define __NR_fchownat 1284
#define __NR_futimesat 1285
#define __NR_newfstatat 1286
#define __NR_unlinkat 1287
#define __NR_renameat 1288
#define __NR_linkat 1289
#define __NR_symlinkat 1290
#define __NR_readlinkat 1291
#define __NR_fchmodat 1292
#define __NR_faccessat 1293
#define __NR_pselect6 1294
#define __NR_ppoll 1295
#define __NR_unshare 1296
#define __NR_splice 1297
#define __NR_set_robust_list 1298
#define __NR_get_robust_list 1299
#define __NR_sync_file_range 1300
#define __NR_tee 1301
#define __NR_vmsplice 1302
#define __NR_fallocate 1303
#define __NR_getcpu 1304
#define __NR_epoll_pwait 1305
#define __NR_utimensat 1306
#define __NR_signalfd 1307
#define __NR_timerfd 1308
#define __NR_eventfd 1309
#define __NR_timerfd_create 1310
#define __NR_timerfd_settime 1311
#define __NR_timerfd_gettime 1312
#define __NR_signalfd4 1313
#define __NR_eventfd2 1314
#define __NR_epoll_create1 1315
#define __NR_dup3 1316
#define __NR_pipe2 1317
#define __NR_inotify_init1 1318
#define __NR_preadv 1319
#define __NR_pwritev 1320
#define __NR_rt_tgsigqueueinfo 1321
#define __NR_recvmmsg 1322
#define __NR_fanotify_init 1323
#define __NR_fanotify_mark 1324
#define __NR_prlimit64 1325
#define __NR_name_to_handle_at 1326
#define __NR_open_by_handle_at 1327
#define __NR_clock_adjtime 1328
#define __NR_syncfs 1329
#define __NR_setns 1330
#define __NR_sendmmsg 1331
#define __NR_process_vm_readv 1332
#define __NR_process_vm_writev 1333
#define __NR_accept4 1334
#define __NR_finit_module 1335
#define __NR_sched_setattr 1336
#define __NR_sched_getattr 1337
#define __NR_renameat2 1338
#define __NR_getrandom 1339
#define __NR_memfd_create 1340
#define __NR_bpf 1341
#define __NR_execveat 1342
#define __NR_userfaultfd 1343
#define __NR_membarrier 1344
#define __NR_kcmp 1345
#define __NR_mlock2 1346
#define __NR_copy_file_range 1347
#define __NR_preadv2 1348
#define __NR_pwritev2 1349
#endif /* _UAPI_ASM_IA64_UNISTD_H */

View File

@ -1,390 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _UAPI_ASM_M68K_UNISTD_H_
#define _UAPI_ASM_M68K_UNISTD_H_
/*
* This file contains the system call numbers.
*/
#define __NR_restart_syscall 0
#define __NR_exit 1
#define __NR_fork 2
#define __NR_read 3
#define __NR_write 4
#define __NR_open 5
#define __NR_close 6
#define __NR_waitpid 7
#define __NR_creat 8
#define __NR_link 9
#define __NR_unlink 10
#define __NR_execve 11
#define __NR_chdir 12
#define __NR_time 13
#define __NR_mknod 14
#define __NR_chmod 15
#define __NR_chown 16
/*#define __NR_break 17*/
#define __NR_oldstat 18
#define __NR_lseek 19
#define __NR_getpid 20
#define __NR_mount 21
#define __NR_umount 22
#define __NR_setuid 23
#define __NR_getuid 24
#define __NR_stime 25
#define __NR_ptrace 26
#define __NR_alarm 27
#define __NR_oldfstat 28
#define __NR_pause 29
#define __NR_utime 30
/*#define __NR_stty 31*/
/*#define __NR_gtty 32*/
#define __NR_access 33
#define __NR_nice 34
/*#define __NR_ftime 35*/
#define __NR_sync 36
#define __NR_kill 37
#define __NR_rename 38
#define __NR_mkdir 39
#define __NR_rmdir 40
#define __NR_dup 41
#define __NR_pipe 42
#define __NR_times 43
/*#define __NR_prof 44*/
#define __NR_brk 45
#define __NR_setgid 46
#define __NR_getgid 47
#define __NR_signal 48
#define __NR_geteuid 49
#define __NR_getegid 50
#define __NR_acct 51
#define __NR_umount2 52
/*#define __NR_lock 53*/
#define __NR_ioctl 54
#define __NR_fcntl 55
/*#define __NR_mpx 56*/
#define __NR_setpgid 57
/*#define __NR_ulimit 58*/
/*#define __NR_oldolduname 59*/
#define __NR_umask 60
#define __NR_chroot 61
#define __NR_ustat 62
#define __NR_dup2 63
#define __NR_getppid 64
#define __NR_getpgrp 65
#define __NR_setsid 66
#define __NR_sigaction 67
#define __NR_sgetmask 68
#define __NR_ssetmask 69
#define __NR_setreuid 70
#define __NR_setregid 71
#define __NR_sigsuspend 72
#define __NR_sigpending 73
#define __NR_sethostname 74
#define __NR_setrlimit 75
#define __NR_getrlimit 76
#define __NR_getrusage 77
#define __NR_gettimeofday 78
#define __NR_settimeofday 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_select 82
#define __NR_symlink 83
#define __NR_oldlstat 84
#define __NR_readlink 85
#define __NR_uselib 86
#define __NR_swapon 87
#define __NR_reboot 88
#define __NR_readdir 89
#define __NR_mmap 90
#define __NR_munmap 91
#define __NR_truncate 92
#define __NR_ftruncate 93
#define __NR_fchmod 94
#define __NR_fchown 95
#define __NR_getpriority 96
#define __NR_setpriority 97
/*#define __NR_profil 98*/
#define __NR_statfs 99
#define __NR_fstatfs 100
/*#define __NR_ioperm 101*/
#define __NR_socketcall 102
#define __NR_syslog 103
#define __NR_setitimer 104
#define __NR_getitimer 105
#define __NR_stat 106
#define __NR_lstat 107
#define __NR_fstat 108
/*#define __NR_olduname 109*/
/*#define __NR_iopl 110*/ /* not supported */
#define __NR_vhangup 111
/*#define __NR_idle 112*/ /* Obsolete */
/*#define __NR_vm86 113*/ /* not supported */
#define __NR_wait4 114
#define __NR_swapoff 115
#define __NR_sysinfo 116
#define __NR_ipc 117
#define __NR_fsync 118
#define __NR_sigreturn 119
#define __NR_clone 120
#define __NR_setdomainname 121
#define __NR_uname 122
#define __NR_cacheflush 123
#define __NR_adjtimex 124
#define __NR_mprotect 125
#define __NR_sigprocmask 126
#define __NR_create_module 127
#define __NR_init_module 128
#define __NR_delete_module 129
#define __NR_get_kernel_syms 130
#define __NR_quotactl 131
#define __NR_getpgid 132
#define __NR_fchdir 133
#define __NR_bdflush 134
#define __NR_sysfs 135
#define __NR_personality 136
/*#define __NR_afs_syscall 137*/ /* Syscall for Andrew File System */
#define __NR_setfsuid 138
#define __NR_setfsgid 139
#define __NR__llseek 140
#define __NR_getdents 141
#define __NR__newselect 142
#define __NR_flock 143
#define __NR_msync 144
#define __NR_readv 145
#define __NR_writev 146
#define __NR_getsid 147
#define __NR_fdatasync 148
#define __NR__sysctl 149
#define __NR_mlock 150
#define __NR_munlock 151
#define __NR_mlockall 152
#define __NR_munlockall 153
#define __NR_sched_setparam 154
#define __NR_sched_getparam 155
#define __NR_sched_setscheduler 156
#define __NR_sched_getscheduler 157
#define __NR_sched_yield 158
#define __NR_sched_get_priority_max 159
#define __NR_sched_get_priority_min 160
#define __NR_sched_rr_get_interval 161
#define __NR_nanosleep 162
#define __NR_mremap 163
#define __NR_setresuid 164
#define __NR_getresuid 165
#define __NR_getpagesize 166
#define __NR_query_module 167
#define __NR_poll 168
#define __NR_nfsservctl 169
#define __NR_setresgid 170
#define __NR_getresgid 171
#define __NR_prctl 172
#define __NR_rt_sigreturn 173
#define __NR_rt_sigaction 174
#define __NR_rt_sigprocmask 175
#define __NR_rt_sigpending 176
#define __NR_rt_sigtimedwait 177
#define __NR_rt_sigqueueinfo 178
#define __NR_rt_sigsuspend 179
#define __NR_pread64 180
#define __NR_pwrite64 181
#define __NR_lchown 182
#define __NR_getcwd 183
#define __NR_capget 184
#define __NR_capset 185
#define __NR_sigaltstack 186
#define __NR_sendfile 187
#define __NR_getpmsg 188 /* some people actually want streams */
#define __NR_putpmsg 189 /* some people actually want streams */
#define __NR_vfork 190
#define __NR_ugetrlimit 191
#define __NR_mmap2 192
#define __NR_truncate64 193
#define __NR_ftruncate64 194
#define __NR_stat64 195
#define __NR_lstat64 196
#define __NR_fstat64 197
#define __NR_chown32 198
#define __NR_getuid32 199
#define __NR_getgid32 200
#define __NR_geteuid32 201
#define __NR_getegid32 202
#define __NR_setreuid32 203
#define __NR_setregid32 204
#define __NR_getgroups32 205
#define __NR_setgroups32 206
#define __NR_fchown32 207
#define __NR_setresuid32 208
#define __NR_getresuid32 209
#define __NR_setresgid32 210
#define __NR_getresgid32 211
#define __NR_lchown32 212
#define __NR_setuid32 213
#define __NR_setgid32 214
#define __NR_setfsuid32 215
#define __NR_setfsgid32 216
#define __NR_pivot_root 217
/* 218*/
/* 219*/
#define __NR_getdents64 220
#define __NR_gettid 221
#define __NR_tkill 222
#define __NR_setxattr 223
#define __NR_lsetxattr 224
#define __NR_fsetxattr 225
#define __NR_getxattr 226
#define __NR_lgetxattr 227
#define __NR_fgetxattr 228
#define __NR_listxattr 229
#define __NR_llistxattr 230
#define __NR_flistxattr 231
#define __NR_removexattr 232
#define __NR_lremovexattr 233
#define __NR_fremovexattr 234
#define __NR_futex 235
#define __NR_sendfile64 236
#define __NR_mincore 237
#define __NR_madvise 238
#define __NR_fcntl64 239
#define __NR_readahead 240
#define __NR_io_setup 241
#define __NR_io_destroy 242
#define __NR_io_getevents 243
#define __NR_io_submit 244
#define __NR_io_cancel 245
#define __NR_fadvise64 246
#define __NR_exit_group 247
#define __NR_lookup_dcookie 248
#define __NR_epoll_create 249
#define __NR_epoll_ctl 250
#define __NR_epoll_wait 251
#define __NR_remap_file_pages 252
#define __NR_set_tid_address 253
#define __NR_timer_create 254
#define __NR_timer_settime 255
#define __NR_timer_gettime 256
#define __NR_timer_getoverrun 257
#define __NR_timer_delete 258
#define __NR_clock_settime 259
#define __NR_clock_gettime 260
#define __NR_clock_getres 261
#define __NR_clock_nanosleep 262
#define __NR_statfs64 263
#define __NR_fstatfs64 264
#define __NR_tgkill 265
#define __NR_utimes 266
#define __NR_fadvise64_64 267
#define __NR_mbind 268
#define __NR_get_mempolicy 269
#define __NR_set_mempolicy 270
#define __NR_mq_open 271
#define __NR_mq_unlink 272
#define __NR_mq_timedsend 273
#define __NR_mq_timedreceive 274
#define __NR_mq_notify 275
#define __NR_mq_getsetattr 276
#define __NR_waitid 277
/*#define __NR_vserver 278*/
#define __NR_add_key 279
#define __NR_request_key 280
#define __NR_keyctl 281
#define __NR_ioprio_set 282
#define __NR_ioprio_get 283
#define __NR_inotify_init 284
#define __NR_inotify_add_watch 285
#define __NR_inotify_rm_watch 286
#define __NR_migrate_pages 287
#define __NR_openat 288
#define __NR_mkdirat 289
#define __NR_mknodat 290
#define __NR_fchownat 291
#define __NR_futimesat 292
#define __NR_fstatat64 293
#define __NR_unlinkat 294
#define __NR_renameat 295
#define __NR_linkat 296
#define __NR_symlinkat 297
#define __NR_readlinkat 298
#define __NR_fchmodat 299
#define __NR_faccessat 300
#define __NR_pselect6 301
#define __NR_ppoll 302
#define __NR_unshare 303
#define __NR_set_robust_list 304
#define __NR_get_robust_list 305
#define __NR_splice 306
#define __NR_sync_file_range 307
#define __NR_tee 308
#define __NR_vmsplice 309
#define __NR_move_pages 310
#define __NR_sched_setaffinity 311
#define __NR_sched_getaffinity 312
#define __NR_kexec_load 313
#define __NR_getcpu 314
#define __NR_epoll_pwait 315
#define __NR_utimensat 316
#define __NR_signalfd 317
#define __NR_timerfd_create 318
#define __NR_eventfd 319
#define __NR_fallocate 320
#define __NR_timerfd_settime 321
#define __NR_timerfd_gettime 322
#define __NR_signalfd4 323
#define __NR_eventfd2 324
#define __NR_epoll_create1 325
#define __NR_dup3 326
#define __NR_pipe2 327
#define __NR_inotify_init1 328
#define __NR_preadv 329
#define __NR_pwritev 330
#define __NR_rt_tgsigqueueinfo 331
#define __NR_perf_event_open 332
#define __NR_get_thread_area 333
#define __NR_set_thread_area 334
#define __NR_atomic_cmpxchg_32 335
#define __NR_atomic_barrier 336
#define __NR_fanotify_init 337
#define __NR_fanotify_mark 338
#define __NR_prlimit64 339
#define __NR_name_to_handle_at 340
#define __NR_open_by_handle_at 341
#define __NR_clock_adjtime 342
#define __NR_syncfs 343
#define __NR_setns 344
#define __NR_process_vm_readv 345
#define __NR_process_vm_writev 346
#define __NR_kcmp 347
#define __NR_finit_module 348
#define __NR_sched_setattr 349
#define __NR_sched_getattr 350
#define __NR_renameat2 351
#define __NR_getrandom 352
#define __NR_memfd_create 353
#define __NR_bpf 354
#define __NR_execveat 355
#define __NR_socket 356
#define __NR_socketpair 357
#define __NR_bind 358
#define __NR_connect 359
#define __NR_listen 360
#define __NR_accept4 361
#define __NR_getsockopt 362
#define __NR_setsockopt 363
#define __NR_getsockname 364
#define __NR_getpeername 365
#define __NR_sendto 366
#define __NR_sendmsg 367
#define __NR_recvfrom 368
#define __NR_recvmsg 369
#define __NR_shutdown 370
#define __NR_recvmmsg 371
#define __NR_sendmmsg 372
#define __NR_userfaultfd 373
#define __NR_membarrier 374
#define __NR_mlock2 375
#define __NR_copy_file_range 376
#define __NR_preadv2 377
#define __NR_pwritev2 378
#define __NR_statx 379
#endif /* _UAPI_ASM_M68K_UNISTD_H_ */

View File

@ -1,421 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* Copyright (C) 2007-2008 Michal Simek <monstr@monstr.eu>
* Copyright (C) 2006 Atmark Techno, Inc.
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#ifndef _UAPI_ASM_MICROBLAZE_UNISTD_H
#define _UAPI_ASM_MICROBLAZE_UNISTD_H
#define __NR_restart_syscall 0 /* ok */
#define __NR_exit 1 /* ok */
#define __NR_fork 2 /* not for no MMU - weird */
#define __NR_read 3 /* ok */
#define __NR_write 4 /* ok */
#define __NR_open 5 /* openat */
#define __NR_close 6 /* ok */
#define __NR_waitpid 7 /* waitid */
#define __NR_creat 8 /* openat */
#define __NR_link 9 /* linkat */
#define __NR_unlink 10 /* unlinkat */
#define __NR_execve 11 /* ok */
#define __NR_chdir 12 /* ok */
#define __NR_time 13 /* obsolete -> sys_gettimeofday */
#define __NR_mknod 14 /* mknodat */
#define __NR_chmod 15 /* fchmodat */
#define __NR_lchown 16 /* ok */
#define __NR_break 17 /* don't know */
#define __NR_oldstat 18 /* remove */
#define __NR_lseek 19 /* ok */
#define __NR_getpid 20 /* ok */
#define __NR_mount 21 /* ok */
#define __NR_umount 22 /* ok */ /* use only umount2 */
#define __NR_setuid 23 /* ok */
#define __NR_getuid 24 /* ok */
#define __NR_stime 25 /* obsolete -> sys_settimeofday */
#define __NR_ptrace 26 /* ok */
#define __NR_alarm 27 /* obsolete -> sys_setitimer */
#define __NR_oldfstat 28 /* remove */
#define __NR_pause 29 /* obsolete -> sys_rt_sigtimedwait */
#define __NR_utime 30 /* obsolete -> sys_utimesat */
#define __NR_stty 31 /* remove */
#define __NR_gtty 32 /* remove */
#define __NR_access 33 /* faccessat */
/* can be implemented by sys_setpriority */
#define __NR_nice 34
#define __NR_ftime 35 /* remove */
#define __NR_sync 36 /* ok */
#define __NR_kill 37 /* ok */
#define __NR_rename 38 /* renameat */
#define __NR_mkdir 39 /* mkdirat */
#define __NR_rmdir 40 /* unlinkat */
#define __NR_dup 41 /* ok */
#define __NR_pipe 42 /* ok */
#define __NR_times 43 /* ok */
#define __NR_prof 44 /* remove */
#define __NR_brk 45 /* ok -mmu, nommu specific */
#define __NR_setgid 46 /* ok */
#define __NR_getgid 47 /* ok */
#define __NR_signal 48 /* obsolete -> sys_rt_sigaction */
#define __NR_geteuid 49 /* ok */
#define __NR_getegid 50 /* ok */
#define __NR_acct 51 /* add it and then I can disable it */
#define __NR_umount2 52 /* remove */
#define __NR_lock 53 /* remove */
#define __NR_ioctl 54 /* ok */
#define __NR_fcntl 55 /* ok -> 64bit version*/
#define __NR_mpx 56 /* remove */
#define __NR_setpgid 57 /* ok */
#define __NR_ulimit 58 /* remove */
#define __NR_oldolduname 59 /* remove */
#define __NR_umask 60 /* ok */
#define __NR_chroot 61 /* ok */
#define __NR_ustat 62 /* obsolete -> statfs64 */
#define __NR_dup2 63 /* ok */
#define __NR_getppid 64 /* ok */
#define __NR_getpgrp 65 /* obsolete -> sys_getpgid */
#define __NR_setsid 66 /* ok */
#define __NR_sigaction 67 /* obsolete -> rt_sigaction */
#define __NR_sgetmask 68 /* obsolete -> sys_rt_sigprocmask */
#define __NR_ssetmask 69 /* obsolete ->sys_rt_sigprocmask */
#define __NR_setreuid 70 /* ok */
#define __NR_setregid 71 /* ok */
#define __NR_sigsuspend 72 /* obsolete -> rt_sigsuspend */
#define __NR_sigpending 73 /* obsolete -> sys_rt_sigpending */
#define __NR_sethostname 74 /* ok */
#define __NR_setrlimit 75 /* ok */
#define __NR_getrlimit 76 /* ok Back compatible 2G limited rlimit */
#define __NR_getrusage 77 /* ok */
#define __NR_gettimeofday 78 /* ok */
#define __NR_settimeofday 79 /* ok */
#define __NR_getgroups 80 /* ok */
#define __NR_setgroups 81 /* ok */
#define __NR_select 82 /* obsolete -> sys_pselect6 */
#define __NR_symlink 83 /* symlinkat */
#define __NR_oldlstat 84 /* remove */
#define __NR_readlink 85 /* obsolete -> sys_readlinkat */
#define __NR_uselib 86 /* remove */
#define __NR_swapon 87 /* ok */
#define __NR_reboot 88 /* ok */
#define __NR_readdir 89 /* remove ? */
#define __NR_mmap 90 /* obsolete -> sys_mmap2 */
#define __NR_munmap 91 /* ok - mmu and nommu */
#define __NR_truncate 92 /* ok or truncate64 */
#define __NR_ftruncate 93 /* ok or ftruncate64 */
#define __NR_fchmod 94 /* ok */
#define __NR_fchown 95 /* ok */
#define __NR_getpriority 96 /* ok */
#define __NR_setpriority 97 /* ok */
#define __NR_profil 98 /* remove */
#define __NR_statfs 99 /* ok or statfs64 */
#define __NR_fstatfs 100 /* ok or fstatfs64 */
#define __NR_ioperm 101 /* remove */
#define __NR_socketcall 102 /* remove */
#define __NR_syslog 103 /* ok */
#define __NR_setitimer 104 /* ok */
#define __NR_getitimer 105 /* ok */
#define __NR_stat 106 /* remove */
#define __NR_lstat 107 /* remove */
#define __NR_fstat 108 /* remove */
#define __NR_olduname 109 /* remove */
#define __NR_iopl 110 /* remove */
#define __NR_vhangup 111 /* ok */
#define __NR_idle 112 /* remove */
#define __NR_vm86old 113 /* remove */
#define __NR_wait4 114 /* obsolete -> waitid */
#define __NR_swapoff 115 /* ok */
#define __NR_sysinfo 116 /* ok */
#define __NR_ipc 117 /* remove - direct call */
#define __NR_fsync 118 /* ok */
#define __NR_sigreturn 119 /* obsolete -> sys_rt_sigreturn */
#define __NR_clone 120 /* ok */
#define __NR_setdomainname 121 /* ok */
#define __NR_uname 122 /* remove */
#define __NR_modify_ldt 123 /* remove */
#define __NR_adjtimex 124 /* ok */
#define __NR_mprotect 125 /* remove */
#define __NR_sigprocmask 126 /* obsolete -> sys_rt_sigprocmask */
#define __NR_create_module 127 /* remove */
#define __NR_init_module 128 /* ok */
#define __NR_delete_module 129 /* ok */
#define __NR_get_kernel_syms 130 /* remove */
#define __NR_quotactl 131 /* ok */
#define __NR_getpgid 132 /* ok */
#define __NR_fchdir 133 /* ok */
#define __NR_bdflush 134 /* remove */
#define __NR_sysfs 135 /* needed for busybox */
#define __NR_personality 136 /* ok */
#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
#define __NR_setfsuid 138 /* ok */
#define __NR_setfsgid 139 /* ok */
#define __NR__llseek 140 /* remove only lseek */
#define __NR_getdents 141 /* ok or getdents64 */
#define __NR__newselect 142 /* remove */
#define __NR_flock 143 /* ok */
#define __NR_msync 144 /* remove */
#define __NR_readv 145 /* ok */
#define __NR_writev 146 /* ok */
#define __NR_getsid 147 /* ok */
#define __NR_fdatasync 148 /* ok */
#define __NR__sysctl 149 /* remove */
#define __NR_mlock 150 /* ok - nommu or mmu */
#define __NR_munlock 151 /* ok - nommu or mmu */
#define __NR_mlockall 152 /* ok - nommu or mmu */
#define __NR_munlockall 153 /* ok - nommu or mmu */
#define __NR_sched_setparam 154 /* ok */
#define __NR_sched_getparam 155 /* ok */
#define __NR_sched_setscheduler 156 /* ok */
#define __NR_sched_getscheduler 157 /* ok */
#define __NR_sched_yield 158 /* ok */
#define __NR_sched_get_priority_max 159 /* ok */
#define __NR_sched_get_priority_min 160 /* ok */
#define __NR_sched_rr_get_interval 161 /* ok */
#define __NR_nanosleep 162 /* ok */
#define __NR_mremap 163 /* ok - nommu or mmu */
#define __NR_setresuid 164 /* ok */
#define __NR_getresuid 165 /* ok */
#define __NR_vm86 166 /* remove */
#define __NR_query_module 167 /* ok */
#define __NR_poll 168 /* obsolete -> sys_ppoll */
#define __NR_nfsservctl 169 /* ok */
#define __NR_setresgid 170 /* ok */
#define __NR_getresgid 171 /* ok */
#define __NR_prctl 172 /* ok */
#define __NR_rt_sigreturn 173 /* ok */
#define __NR_rt_sigaction 174 /* ok */
#define __NR_rt_sigprocmask 175 /* ok */
#define __NR_rt_sigpending 176 /* ok */
#define __NR_rt_sigtimedwait 177 /* ok */
#define __NR_rt_sigqueueinfo 178 /* ok */
#define __NR_rt_sigsuspend 179 /* ok */
#define __NR_pread64 180 /* ok */
#define __NR_pwrite64 181 /* ok */
#define __NR_chown 182 /* obsolete -> fchownat */
#define __NR_getcwd 183 /* ok */
#define __NR_capget 184 /* ok */
#define __NR_capset 185 /* ok */
#define __NR_sigaltstack 186 /* remove */
#define __NR_sendfile 187 /* ok -> exist 64bit version*/
#define __NR_getpmsg 188 /* remove */
/* remove - some people actually want streams */
#define __NR_putpmsg 189
/* for noMMU - group with clone -> maybe remove */
#define __NR_vfork 190
#define __NR_ugetrlimit 191 /* remove - SuS compliant getrlimit */
#define __NR_mmap2 192 /* ok */
#define __NR_truncate64 193 /* ok */
#define __NR_ftruncate64 194 /* ok */
#define __NR_stat64 195 /* remove _ARCH_WANT_STAT64 */
#define __NR_lstat64 196 /* remove _ARCH_WANT_STAT64 */
#define __NR_fstat64 197 /* remove _ARCH_WANT_STAT64 */
#define __NR_lchown32 198 /* ok - without 32 */
#define __NR_getuid32 199 /* ok - without 32 */
#define __NR_getgid32 200 /* ok - without 32 */
#define __NR_geteuid32 201 /* ok - without 32 */
#define __NR_getegid32 202 /* ok - without 32 */
#define __NR_setreuid32 203 /* ok - without 32 */
#define __NR_setregid32 204 /* ok - without 32 */
#define __NR_getgroups32 205 /* ok - without 32 */
#define __NR_setgroups32 206 /* ok - without 32 */
#define __NR_fchown32 207 /* ok - without 32 */
#define __NR_setresuid32 208 /* ok - without 32 */
#define __NR_getresuid32 209 /* ok - without 32 */
#define __NR_setresgid32 210 /* ok - without 32 */
#define __NR_getresgid32 211 /* ok - without 32 */
#define __NR_chown32 212 /* ok - without 32 -obsolete -> fchownat */
#define __NR_setuid32 213 /* ok - without 32 */
#define __NR_setgid32 214 /* ok - without 32 */
#define __NR_setfsuid32 215 /* ok - without 32 */
#define __NR_setfsgid32 216 /* ok - without 32 */
#define __NR_pivot_root 217 /* ok */
#define __NR_mincore 218 /* ok */
#define __NR_madvise 219 /* ok */
#define __NR_getdents64 220 /* ok */
#define __NR_fcntl64 221 /* ok */
/* 223 is unused */
#define __NR_gettid 224 /* ok */
#define __NR_readahead 225 /* ok */
#define __NR_setxattr 226 /* ok */
#define __NR_lsetxattr 227 /* ok */
#define __NR_fsetxattr 228 /* ok */
#define __NR_getxattr 229 /* ok */
#define __NR_lgetxattr 230 /* ok */
#define __NR_fgetxattr 231 /* ok */
#define __NR_listxattr 232 /* ok */
#define __NR_llistxattr 233 /* ok */
#define __NR_flistxattr 234 /* ok */
#define __NR_removexattr 235 /* ok */
#define __NR_lremovexattr 236 /* ok */
#define __NR_fremovexattr 237 /* ok */
#define __NR_tkill 238 /* ok */
#define __NR_sendfile64 239 /* ok */
#define __NR_futex 240 /* ok */
#define __NR_sched_setaffinity 241 /* ok */
#define __NR_sched_getaffinity 242 /* ok */
#define __NR_set_thread_area 243 /* remove */
#define __NR_get_thread_area 244 /* remove */
#define __NR_io_setup 245 /* ok */
#define __NR_io_destroy 246 /* ok */
#define __NR_io_getevents 247 /* ok */
#define __NR_io_submit 248 /* ok */
#define __NR_io_cancel 249 /* ok */
#define __NR_fadvise64 250 /* remove -> sys_fadvise64_64 */
/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */
#define __NR_exit_group 252 /* ok */
#define __NR_lookup_dcookie 253 /* ok */
#define __NR_epoll_create 254 /* ok */
#define __NR_epoll_ctl 255 /* ok */
#define __NR_epoll_wait 256 /* obsolete -> sys_epoll_pwait */
#define __NR_remap_file_pages 257 /* only for mmu */
#define __NR_set_tid_address 258 /* ok */
#define __NR_timer_create 259 /* ok */
#define __NR_timer_settime (__NR_timer_create+1) /* 260 */ /* ok */
#define __NR_timer_gettime (__NR_timer_create+2) /* 261 */ /* ok */
#define __NR_timer_getoverrun (__NR_timer_create+3) /* 262 */ /* ok */
#define __NR_timer_delete (__NR_timer_create+4) /* 263 */ /* ok */
#define __NR_clock_settime (__NR_timer_create+5) /* 264 */ /* ok */
#define __NR_clock_gettime (__NR_timer_create+6) /* 265 */ /* ok */
#define __NR_clock_getres (__NR_timer_create+7) /* 266 */ /* ok */
#define __NR_clock_nanosleep (__NR_timer_create+8) /* 267 */ /* ok */
#define __NR_statfs64 268 /* ok */
#define __NR_fstatfs64 269 /* ok */
#define __NR_tgkill 270 /* ok */
#define __NR_utimes 271 /* obsolete -> sys_futimesat */
#define __NR_fadvise64_64 272 /* ok */
#define __NR_vserver 273 /* ok */
#define __NR_mbind 274 /* only for mmu */
#define __NR_get_mempolicy 275 /* only for mmu */
#define __NR_set_mempolicy 276 /* only for mmu */
#define __NR_mq_open 277 /* ok */
#define __NR_mq_unlink (__NR_mq_open+1) /* 278 */ /* ok */
#define __NR_mq_timedsend (__NR_mq_open+2) /* 279 */ /* ok */
#define __NR_mq_timedreceive (__NR_mq_open+3) /* 280 */ /* ok */
#define __NR_mq_notify (__NR_mq_open+4) /* 281 */ /* ok */
#define __NR_mq_getsetattr (__NR_mq_open+5) /* 282 */ /* ok */
#define __NR_kexec_load 283 /* ok */
#define __NR_waitid 284 /* ok */
/* #define __NR_sys_setaltroot 285 */
#define __NR_add_key 286 /* ok */
#define __NR_request_key 287 /* ok */
#define __NR_keyctl 288 /* ok */
#define __NR_ioprio_set 289 /* ok */
#define __NR_ioprio_get 290 /* ok */
#define __NR_inotify_init 291 /* ok */
#define __NR_inotify_add_watch 292 /* ok */
#define __NR_inotify_rm_watch 293 /* ok */
#define __NR_migrate_pages 294 /* mmu */
#define __NR_openat 295 /* ok */
#define __NR_mkdirat 296 /* ok */
#define __NR_mknodat 297 /* ok */
#define __NR_fchownat 298 /* ok */
#define __NR_futimesat 299 /* obsolete -> sys_utimesat */
#define __NR_fstatat64 300 /* stat64 */
#define __NR_unlinkat 301 /* ok */
#define __NR_renameat 302 /* ok */
#define __NR_linkat 303 /* ok */
#define __NR_symlinkat 304 /* ok */
#define __NR_readlinkat 305 /* ok */
#define __NR_fchmodat 306 /* ok */
#define __NR_faccessat 307 /* ok */
#define __NR_pselect6 308 /* ok */
#define __NR_ppoll 309 /* ok */
#define __NR_unshare 310 /* ok */
#define __NR_set_robust_list 311 /* ok */
#define __NR_get_robust_list 312 /* ok */
#define __NR_splice 313 /* ok */
#define __NR_sync_file_range 314 /* ok */
#define __NR_tee 315 /* ok */
#define __NR_vmsplice 316 /* ok */
#define __NR_move_pages 317 /* mmu */
#define __NR_getcpu 318 /* ok */
#define __NR_epoll_pwait 319 /* ok */
#define __NR_utimensat 320 /* ok */
#define __NR_signalfd 321 /* ok */
#define __NR_timerfd_create 322 /* ok */
#define __NR_eventfd 323 /* ok */
#define __NR_fallocate 324 /* ok */
#define __NR_semtimedop 325 /* ok - semaphore group */
#define __NR_timerfd_settime 326 /* ok */
#define __NR_timerfd_gettime 327 /* ok */
/* sysv ipc syscalls */
#define __NR_semctl 328 /* ok */
#define __NR_semget 329 /* ok */
#define __NR_semop 330 /* ok */
#define __NR_msgctl 331 /* ok */
#define __NR_msgget 332 /* ok */
#define __NR_msgrcv 333 /* ok */
#define __NR_msgsnd 334 /* ok */
#define __NR_shmat 335 /* ok */
#define __NR_shmctl 336 /* ok */
#define __NR_shmdt 337 /* ok */
#define __NR_shmget 338 /* ok */
#define __NR_signalfd4 339 /* new */
#define __NR_eventfd2 340 /* new */
#define __NR_epoll_create1 341 /* new */
#define __NR_dup3 342 /* new */
#define __NR_pipe2 343 /* new */
#define __NR_inotify_init1 344 /* new */
#define __NR_socket 345 /* new */
#define __NR_socketpair 346 /* new */
#define __NR_bind 347 /* new */
#define __NR_listen 348 /* new */
#define __NR_accept 349 /* new */
#define __NR_connect 350 /* new */
#define __NR_getsockname 351 /* new */
#define __NR_getpeername 352 /* new */
#define __NR_sendto 353 /* new */
#define __NR_send 354 /* new */
#define __NR_recvfrom 355 /* new */
#define __NR_recv 356 /* new */
#define __NR_setsockopt 357 /* new */
#define __NR_getsockopt 358 /* new */
#define __NR_shutdown 359 /* new */
#define __NR_sendmsg 360 /* new */
#define __NR_recvmsg 361 /* new */
#define __NR_accept4 362 /* new */
#define __NR_preadv 363 /* new */
#define __NR_pwritev 364 /* new */
#define __NR_rt_tgsigqueueinfo 365 /* new */
#define __NR_perf_event_open 366 /* new */
#define __NR_recvmmsg 367 /* new */
#define __NR_fanotify_init 368
#define __NR_fanotify_mark 369
#define __NR_prlimit64 370
#define __NR_name_to_handle_at 371
#define __NR_open_by_handle_at 372
#define __NR_clock_adjtime 373
#define __NR_syncfs 374
#define __NR_setns 375
#define __NR_sendmmsg 376
#define __NR_process_vm_readv 377
#define __NR_process_vm_writev 378
#define __NR_kcmp 379
#define __NR_finit_module 380
#define __NR_sched_setattr 381
#define __NR_sched_getattr 382
#define __NR_renameat2 383
#define __NR_seccomp 384
#define __NR_getrandom 385
#define __NR_memfd_create 386
#define __NR_bpf 387
#define __NR_execveat 388
#define __NR_userfaultfd 389
#define __NR_membarrier 390
#define __NR_mlock2 391
#define __NR_copy_file_range 392
#define __NR_preadv2 393
#define __NR_pwritev2 394
#define __NR_pkey_mprotect 395
#define __NR_pkey_alloc 396
#define __NR_pkey_free 397
#define __NR_statx 398
#define __NR_io_pgetevents 399
#define __NR_rseq 400
#endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */

View File

@ -0,0 +1,31 @@
/* Hacks needed for divdi3 symbol manipulation.
Copyright (C) 2004-2019 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
<http://www.gnu.org/licenses/>. */
/* A very dirty trick: gcc emits references to __divdi3, __udivdi3,
__moddi3, and __umoddi3. These functions are exported and
therefore we get PLTs. Unnecessarily so. Changing gcc is a big
task which might not be worth it so we play tricks with the
assembler.
Note: in_divdi3_c is only used to avoid symbol alias on divdi3
build itself. */
#if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) && defined SHARED
asm ("__divdi3 = __divdi3_internal");
asm ("__udivdi3 = __udivdi3_internal");
asm ("__moddi3 = __moddi3_internal");
asm ("__umoddi3 = __umoddi3_internal");
#endif

View File

@ -0,0 +1,24 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* Copyright (C) 2012 ARM Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ASM_BITSPERLONG_H
#define __ASM_BITSPERLONG_H
#define __BITS_PER_LONG 64
#include <asm-generic/bitsperlong.h>
#endif /* __ASM_BITSPERLONG_H */

View File

@ -0,0 +1,30 @@
/* Copyright (C) 1997-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
/* AArch64 can be either big or little endian. */
#ifdef __AARCH64EB__
# define __BYTE_ORDER __BIG_ENDIAN
#else
# define __BYTE_ORDER __LITTLE_ENDIAN
#endif
#define __FLOAT_WORD_ORDER __BYTE_ORDER

View File

@ -0,0 +1,61 @@
/* O_*, F_*, FD_* bit values for the AArch64 Linux ABI.
Copyright (C) 2011-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
#define __O_DIRECTORY 040000
#define __O_NOFOLLOW 0100000
#define __O_DIRECT 0200000
#ifdef __ILP32__
# define __O_LARGEFILE 0400000
#else
# define __O_LARGEFILE 0
#endif
#ifdef __LP64__
# define F_GETLK64 5
# define F_SETLK64 6
# define F_SETLKW64 7
#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'). */
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
__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>

View File

@ -0,0 +1,82 @@
/* Copyright (C) 2004-2019 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
<http://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
#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

View File

@ -0,0 +1,97 @@
/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
Copyright (C) 2017-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_FLOATN_H
#define _BITS_FLOATN_H
#include <features.h>
#include <bits/long-double.h>
/* 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. */
#ifndef __NO_LONG_DOUBLE_MATH
# define __HAVE_FLOAT128 1
#else
/* glibc does not support _Float128 for platforms where long double is
normally binary128 when building with long double as binary64.
GCC's default for supported scalar modes does not support it either
in that case. */
# define __HAVE_FLOAT128 0
#endif
/* 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 __HAVE_FLOAT128
/* 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 __HAVE_FLOAT128
#ifndef __ASSEMBLER__
/* Defined to concatenate the literal suffix to be used with _Float128
types, if __HAVE_FLOAT128 is 1. */
# if __HAVE_FLOAT128
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
/* The literal suffix f128 exists only since GCC 7.0. */
# define __f128(x) x##l
# else
# define __f128(x) x##f128
# endif
# endif
/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
# if __HAVE_FLOAT128
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# define __CFLOAT128 _Complex long double
# else
# define __CFLOAT128 _Complex _Float128
# endif
# endif
/* The remaining of this file provides support for older compilers. */
# if __HAVE_FLOAT128
/* The type _Float128 exists only since GCC 7.0. */
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef long double _Float128;
# endif
/* Various built-in functions do not exist before GCC 7.0. */
# if !__GNUC_PREREQ (7, 0)
# define __builtin_huge_valf128() (__builtin_huge_vall ())
# define __builtin_inff128() (__builtin_infl ())
# define __builtin_nanf128(x) (__builtin_nanl (x))
# define __builtin_nansf128(x) (__builtin_nansl (x))
# endif
# endif
#endif /* !__ASSEMBLER__. */
#include <bits/floatn-common.h>
#endif /* _BITS_FLOATN_H */

View File

@ -0,0 +1,34 @@
/* Define FP_FAST_* macros. AArch64 version.
Copyright (C) 2016-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _MATH_H
# error "Never use <bits/fp-fast.h> directly; include <math.h> instead."
#endif
#ifdef __USE_ISOC99
/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
builtins are supported. */
# define FP_FAST_FMA 1
# define FP_FAST_FMAF 1
# ifdef __FP_FAST_FMAL
# define FP_FAST_FMAL 1
# endif
#endif

View File

@ -0,0 +1,53 @@
/* Defines for bits in AT_HWCAP. AArch64 Linux version.
Copyright (C) 2016-2019 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
<http://www.gnu.org/licenses/>. */
#if !defined (_SYS_AUXV_H)
# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
#endif
/* The following must match the kernel's <asm/hwcap.h> and update the
list together with sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c. */
#define HWCAP_FP (1 << 0)
#define HWCAP_ASIMD (1 << 1)
#define HWCAP_EVTSTRM (1 << 2)
#define HWCAP_AES (1 << 3)
#define HWCAP_PMULL (1 << 4)
#define HWCAP_SHA1 (1 << 5)
#define HWCAP_SHA2 (1 << 6)
#define HWCAP_CRC32 (1 << 7)
#define HWCAP_ATOMICS (1 << 8)
#define HWCAP_FPHP (1 << 9)
#define HWCAP_ASIMDHP (1 << 10)
#define HWCAP_CPUID (1 << 11)
#define HWCAP_ASIMDRDM (1 << 12)
#define HWCAP_JSCVT (1 << 13)
#define HWCAP_FCMA (1 << 14)
#define HWCAP_LRCPC (1 << 15)
#define HWCAP_DCPOP (1 << 16)
#define HWCAP_SHA3 (1 << 17)
#define HWCAP_SM3 (1 << 18)
#define HWCAP_SM4 (1 << 19)
#define HWCAP_ASIMDDP (1 << 20)
#define HWCAP_SHA512 (1 << 21)
#define HWCAP_SVE (1 << 22)
#define HWCAP_ASIMDFHM (1 << 23)
#define HWCAP_DIT (1 << 24)
#define HWCAP_USCAT (1 << 25)
#define HWCAP_ILRCPC (1 << 26)
#define HWCAP_FLAGM (1 << 27)
#define HWCAP_SSBS (1 << 28)

View File

@ -0,0 +1,54 @@
/* Copyright (C) 1995-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_IPC_H
# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
#endif
#include <bits/types.h>
/* Mode bits for `msgget', `semget', and `shmget'. */
#define IPC_CREAT 01000 /* Create key if key does not exist. */
#define IPC_EXCL 02000 /* Fail if key exists. */
#define IPC_NOWAIT 04000 /* Return error on wait. */
/* Control commands for `msgctl', `semctl', and `shmctl'. */
#define IPC_RMID 0 /* Remove identifier. */
#define IPC_SET 1 /* Set `ipc_perm' options. */
#define IPC_STAT 2 /* Get `ipc_perm' options. */
#ifdef __USE_GNU
# define IPC_INFO 3 /* See ipcs. */
#endif
/* Special key values. */
#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
/* Data structure used to pass permission information to IPC operations. */
struct ipc_perm
{
__key_t __key; /* Key. */
__uid_t uid; /* Owner's user ID. */
__gid_t gid; /* Owner's group ID. */
__uid_t cuid; /* Creator's user ID. */
__gid_t cgid; /* Creator's group ID. */
unsigned int mode; /* Read/write permission. */
unsigned short int __seq; /* Sequence number. */
unsigned short int __pad1;
__syscall_ulong_t __glibc_reserved1;
__syscall_ulong_t __glibc_reserved2;
};

View File

@ -0,0 +1,60 @@
/* Copyright (C) 2005-2019 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
<http://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 AArch64. */
typedef struct La_aarch64_regs
{
uint64_t lr_xreg[8];
uint64_t lr_dreg[8];
uint64_t lr_sp;
uint64_t lr_lr;
} La_aarch64_regs;
/* Return values for calls from PLT on AArch64. */
typedef struct La_aarch64_retval
{
/* Up to two integer registers can be used for a return value. */
uint64_t lrv_xreg[2];
/* Up to four D registers can be used for a return value. */
uint64_t lrv_dreg[4];
} La_aarch64_retval;
__BEGIN_DECLS
extern ElfW(Addr)
la_aarch64_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx,
uintptr_t *__refcook,
uintptr_t *__defcook,
La_aarch64_regs *__regs,
unsigned int *__flags,
const char *__symname,
long int *__framesizep);
extern unsigned int
la_aarch64_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx,
uintptr_t *__refcook,
uintptr_t *__defcook,
const La_aarch64_regs *__inregs,
La_aarch64_retval *__outregs,
const char *__symname);
__END_DECLS

View File

@ -0,0 +1,101 @@
/* Minimum guaranteed maximum values for system limits. Linux version.
Copyright (C) 1993-2019 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
<http://www.gnu.org/licenses/>. */
/* The kernel header pollutes the namespace with the NR_OPEN symbol
and defines LINK_MAX although filesystems have different maxima. A
similar thing is true for OPEN_MAX: the limit can be changed at
runtime and therefore the macro must not be defined. Remove this
after including the header if necessary. */
#ifndef NR_OPEN
# define __undef_NR_OPEN
#endif
#ifndef LINK_MAX
# define __undef_LINK_MAX
#endif
#ifndef OPEN_MAX
# define __undef_OPEN_MAX
#endif
#ifndef ARG_MAX
# define __undef_ARG_MAX
#endif
/* The kernel sources contain a file with all the needed information. */
#include <linux/limits.h>
/* Have to remove NR_OPEN? */
#ifdef __undef_NR_OPEN
# undef NR_OPEN
# undef __undef_NR_OPEN
#endif
/* Have to remove LINK_MAX? */
#ifdef __undef_LINK_MAX
# undef LINK_MAX
# undef __undef_LINK_MAX
#endif
/* Have to remove OPEN_MAX? */
#ifdef __undef_OPEN_MAX
# undef OPEN_MAX
# undef __undef_OPEN_MAX
#endif
/* Have to remove ARG_MAX? */
#ifdef __undef_ARG_MAX
# undef ARG_MAX
# undef __undef_ARG_MAX
#endif
/* The number of data keys per process. */
#define _POSIX_THREAD_KEYS_MAX 128
/* This is the value this implementation supports. */
#define PTHREAD_KEYS_MAX 1024
/* Controlling the iterations of destructors for thread-specific data. */
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
/* Number of iterations this implementation does. */
#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
/* The number of threads per process. */
#define _POSIX_THREAD_THREADS_MAX 64
/* We have no predefined limit on the number of threads. */
#undef PTHREAD_THREADS_MAX
/* Maximum amount by which a process can descrease its asynchronous I/O
priority level. */
#define AIO_PRIO_DELTA_MAX 20
/* Minimum size for a thread. At least two pages for systems with 64k
pages. */
#define PTHREAD_STACK_MIN 131072
/* Maximum number of timer expiration overruns. */
#define DELAYTIMER_MAX 2147483647
/* Maximum tty name length. */
#define TTY_NAME_MAX 32
/* Maximum login name length. This is arbitrary. */
#define LOGIN_NAME_MAX 256
/* Maximum host name length. */
#define HOST_NAME_MAX 64
/* Maximum message queue priority level. */
#define MQ_PRIO_MAX 32768
/* Maximum value the semaphore can have. */
#define SEM_VALUE_MAX (2147483647)

View File

@ -0,0 +1,20 @@
/* Properties of long double type. ldbl-128 version.
Copyright (C) 2016-2019 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
<http://www.gnu.org/licenses/>. */
/* long double is distinct from double, so there is nothing to
define here. */

View File

@ -0,0 +1,35 @@
/* Types for registers for sys/procfs.h. AArch64 version.
Copyright (C) 1996-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_PROCFS_H
# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
#endif
/* Type for a general-purpose register. */
typedef __uint64_t elf_greg_t;
/* And the whole bunch of them. We could have used `struct
pt_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 elf_greg_t elf_gregset_t[ELF_NGREG];
/* Register set for the floating-point registers. */
typedef struct user_fpsimd_struct elf_fpregset_t;

View File

@ -0,0 +1,71 @@
/* Copyright (C) 2002-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_PTHREADTYPES_ARCH_H
#define _BITS_PTHREADTYPES_ARCH_H 1
#include <endian.h>
#ifdef __ILP32__
# define __SIZEOF_PTHREAD_ATTR_T 32
# define __SIZEOF_PTHREAD_MUTEX_T 32
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
# define __SIZEOF_PTHREAD_CONDATTR_T 4
# define __SIZEOF_PTHREAD_RWLOCK_T 48
# define __SIZEOF_PTHREAD_BARRIER_T 20
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
#else
# define __SIZEOF_PTHREAD_ATTR_T 64
# define __SIZEOF_PTHREAD_MUTEX_T 48
# define __SIZEOF_PTHREAD_MUTEXATTR_T 8
# define __SIZEOF_PTHREAD_CONDATTR_T 8
# define __SIZEOF_PTHREAD_RWLOCK_T 56
# define __SIZEOF_PTHREAD_BARRIER_T 32
# define __SIZEOF_PTHREAD_BARRIERATTR_T 8
#endif
#define __SIZEOF_PTHREAD_COND_T 48
#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
/* Definitions for internal mutex struct. */
#define __PTHREAD_COMPAT_PADDING_MID
#define __PTHREAD_COMPAT_PADDING_END
#define __PTHREAD_MUTEX_LOCK_ELISION 0
#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
#define __PTHREAD_MUTEX_USE_UNION 0
#define __LOCK_ALIGNMENT
#define __ONCE_ALIGNMENT
struct __pthread_rwlock_arch_t
{
unsigned int __readers;
unsigned int __writers;
unsigned int __wrphase_futex;
unsigned int __writers_futex;
unsigned int __pad3;
unsigned int __pad4;
int __cur_writer;
int __shared;
unsigned long int __pad1;
unsigned long int __pad2;
unsigned int __flags;
};
#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
#endif /* bits/pthreadtypes.h */

View File

@ -0,0 +1,39 @@
/* Copyright (C) 2002-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SEMAPHORE_H
# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
#endif
#ifdef __ILP32__
# define __SIZEOF_SEM_T 16
#else
# define __SIZEOF_SEM_T 32
#endif
/* Value returned if `sem_open' failed. */
#define SEM_FAILED ((sem_t *) 0)
typedef union
{
char __size[__SIZEOF_SEM_T];
long long int __align;
} sem_t;

View File

@ -0,0 +1,33 @@
/* Copyright (C) 1997-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_SETJMP_H
#define _BITS_SETJMP_H 1
#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
#ifndef _ASM
/* Jump buffer contains:
x19-x28, x29(fp), x30(lr), (x31)sp, d8-d15. Other registers are not
saved. */
__extension__ typedef unsigned long long __jmp_buf [22];
#endif
#endif

View File

@ -0,0 +1,32 @@
/* sigstack, sigaltstack definitions.
Copyright (C) 2015-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_SIGSTACK_H
#define _BITS_SIGSTACK_H 1
#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
# error "Never include this file directly. Use <signal.h> instead"
#endif
/* Minimum stack size for a signal handler. */
#define MINSIGSTKSZ 5120
/* System default stack size. */
#define SIGSTKSZ 16384
#endif /* bits/sigstack.h */

View File

@ -0,0 +1,171 @@
/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
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
<http://www.gnu.org/licenses/>. */
#if !defined _SYS_STAT_H && !defined _FCNTL_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
#endif
#ifndef _BITS_STAT_H
#define _BITS_STAT_H 1
#include <endian.h>
#include <bits/wordsize.h>
/* 64-bit libc uses the kernel's 'struct stat', accessed via the
stat() syscall; 32-bit libc uses the kernel's 'struct stat64'
and accesses it via the stat64() syscall. All the various
APIs offered by libc use the kernel shape for their struct stat
structure; the only difference is that 32-bit programs not
using __USE_FILE_OFFSET64 only see the low 32 bits of some
of the fields (specifically st_ino, st_size, and st_blocks). */
#define _STAT_VER_KERNEL 0
#define _STAT_VER_LINUX 0
#define _STAT_VER _STAT_VER_KERNEL
/* Versions of the `xmknod' interface. */
#define _MKNOD_VER_LINUX 0
#if defined __USE_FILE_OFFSET64
# define __field64(type, type64, name) type64 name
#elif __WORDSIZE == 64
# 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
/* Encoding of the file mode. */
#define __S_IFMT 0170000 /* These bits determine file type. */
/* File types. */
#define __S_IFDIR 0040000 /* Directory. */
#define __S_IFCHR 0020000 /* Character device. */
#define __S_IFBLK 0060000 /* Block device. */
#define __S_IFREG 0100000 /* Regular file. */
#define __S_IFIFO 0010000 /* FIFO. */
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
/* POSIX.1b objects. Note that these macros always evaluate to zero. But
they do it by enforcing the correct use of the macros. */
#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
#define __S_ISGID 02000 /* Set group ID on execution. */
#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
#ifdef __USE_ATFILE
# define UTIME_NOW ((1l << 30) - 1l)
# define UTIME_OMIT ((1l << 30) - 2l)
#endif
#endif /* bits/stat.h */

View File

@ -0,0 +1,86 @@
/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_STATFS_H
# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
#endif
#include <endian.h>
#include <bits/types.h>
#include <bits/wordsize.h>
/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
and accesses it via the statfs64() syscall. All the various
APIs offered by libc use the kernel shape for their struct statfs
structure; the only difference is that 32-bit programs not
using __USE_FILE_OFFSET64 only see the low 32 bits of some
of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
#if defined __USE_FILE_OFFSET64
# define __field64(type, type64, name) type64 name
#elif __WORDSIZE == 64
# 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 statfs
{
__SWORD_TYPE f_type;
__SWORD_TYPE f_bsize;
__field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
__field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
__field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
__field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
__field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
__fsid_t f_fsid;
__SWORD_TYPE f_namelen;
__SWORD_TYPE f_frsize;
__SWORD_TYPE f_flags;
__SWORD_TYPE f_spare[4];
};
#undef __field64
#ifdef __USE_LARGEFILE64
struct statfs64
{
__SWORD_TYPE f_type;
__SWORD_TYPE f_bsize;
__fsblkcnt64_t f_blocks;
__fsblkcnt64_t f_bfree;
__fsblkcnt64_t f_bavail;
__fsfilcnt64_t f_files;
__fsfilcnt64_t f_ffree;
__fsid_t f_fsid;
__SWORD_TYPE f_namelen;
__SWORD_TYPE f_frsize;
__SWORD_TYPE f_flags;
__SWORD_TYPE f_spare[4];
};
#endif
/* Tell code we have these members. */
#define _STATFS_F_NAMELEN
#define _STATFS_F_FRSIZE
#define _STATFS_F_FLAGS

View File

@ -0,0 +1,84 @@
/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
Copyright (C) 2011-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
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
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_TYPES_H
# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
#endif
#ifndef _BITS_TYPESIZES_H
#define _BITS_TYPESIZES_H 1
/* See <bits/types.h> for the meaning of these macros. This file exists so
that <bits/types.h> need not vary across different GNU platforms. */
#define __DEV_T_TYPE __UQUAD_TYPE
#define __UID_T_TYPE __U32_TYPE
#define __GID_T_TYPE __U32_TYPE
#define __INO_T_TYPE __ULONGWORD_TYPE
#define __INO64_T_TYPE __UQUAD_TYPE
#define __MODE_T_TYPE __U32_TYPE
#define __NLINK_T_TYPE __U32_TYPE
#define __OFF_T_TYPE __SLONGWORD_TYPE
#define __OFF64_T_TYPE __SQUAD_TYPE
#define __PID_T_TYPE __S32_TYPE
#define __RLIM_T_TYPE __ULONGWORD_TYPE
#define __RLIM64_T_TYPE __UQUAD_TYPE
#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
#define __BLKCNT64_T_TYPE __SQUAD_TYPE
#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
#define __FSWORD_T_TYPE __SWORD_TYPE
#define __ID_T_TYPE __U32_TYPE
#define __CLOCK_T_TYPE __SLONGWORD_TYPE
#define __TIME_T_TYPE __SLONGWORD_TYPE
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
#define __DADDR_T_TYPE __S32_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
#define __BLKSIZE_T_TYPE __S32_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
#ifdef __LP64__
/* Tell the libc code that off_t and off64_t are actually the same type
for all ABI purposes, even if possibly expressed as different base types
for C type-checking purposes. */
# define __OFF_T_MATCHES_OFF64_T 1
/* Same for ino_t and ino64_t. */
# define __INO_T_MATCHES_INO64_T 1
/* And for __rlim_t and __rlim64_t. */
# define __RLIM_T_MATCHES_RLIM64_T 1
#else
# define __RLIM_T_MATCHES_RLIM64_T 0
#endif
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
#endif /* bits/typesizes.h */

View File

@ -0,0 +1,28 @@
/* Determine the wordsize from the preprocessor defines.
Copyright (C) 2016-2019 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
<http://www.gnu.org/licenses/>. */
#ifdef __LP64__
# define __WORDSIZE 64
#else
# define __WORDSIZE 32
# define __WORDSIZE32_SIZE_ULONG 1
# define __WORDSIZE32_PTRDIFF_LONG 1
#endif
#define __WORDSIZE_TIME64_COMPAT32 0

View File

@ -0,0 +1,90 @@
/* Copyright (C) 1996-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _AARCH64_FPU_CONTROL_H
#define _AARCH64_FPU_CONTROL_H
#include <features.h>
/* Macros for accessing the FPCR and FPSR. */
#if __GNUC_PREREQ (6,0)
# define _FPU_GETCW(fpcr) (fpcr = __builtin_aarch64_get_fpcr ())
# define _FPU_SETCW(fpcr) __builtin_aarch64_set_fpcr (fpcr)
# define _FPU_GETFPSR(fpsr) (fpsr = __builtin_aarch64_get_fpsr ())
# define _FPU_SETFPSR(fpsr) __builtin_aarch64_set_fpsr (fpsr)
#else
# define _FPU_GETCW(fpcr) \
__asm__ __volatile__ ("mrs %0, fpcr" : "=r" (fpcr))
# define _FPU_SETCW(fpcr) \
__asm__ __volatile__ ("msr fpcr, %0" : : "r" (fpcr))
# define _FPU_GETFPSR(fpsr) \
__asm__ __volatile__ ("mrs %0, fpsr" : "=r" (fpsr))
# define _FPU_SETFPSR(fpsr) \
__asm__ __volatile__ ("msr fpsr, %0" : : "r" (fpsr))
#endif
/* Reserved bits should be preserved when modifying register
contents. These two masks indicate which bits in each of FPCR and
FPSR should not be changed. */
#define _FPU_RESERVED 0xfe0fe0ff
#define _FPU_FPSR_RESERVED 0x0fffffe0
#define _FPU_DEFAULT 0x00000000
#define _FPU_FPSR_DEFAULT 0x00000000
/* Layout of FPCR and FPSR:
| | | | | | | |
0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0
s s s s s s s s s s s
c c c c c c c c c c c c
N Z C V Q A D F R R S S S L L L I U U I U O D I I U U I U O D I
C H N Z M M T T B E E E D N N X F F Z O D N N X F F Z O
P O O R R Z N N N E K K E E E E E C K K C C C C C
D D I I P
E E D D
E E
*/
#define _FPU_FPCR_RM_MASK 0xc00000
#define _FPU_FPCR_MASK_IXE 0x1000
#define _FPU_FPCR_MASK_UFE 0x0800
#define _FPU_FPCR_MASK_OFE 0x0400
#define _FPU_FPCR_MASK_DZE 0x0200
#define _FPU_FPCR_MASK_IOE 0x0100
#define _FPU_FPCR_IEEE \
(_FPU_DEFAULT | _FPU_FPCR_MASK_IXE \
| _FPU_FPCR_MASK_UFE | _FPU_FPCR_MASK_OFE \
| _FPU_FPCR_MASK_DZE | _FPU_FPCR_MASK_IOE)
#define _FPU_FPSR_IEEE 0
typedef unsigned int fpu_control_t;
typedef unsigned int fpu_fpsr_t;
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
#endif

View File

@ -0,0 +1,31 @@
/* This file is automatically generated. */
#ifndef __GNU_LIB_NAMES_H
# error "Never use <gnu/lib-names-lp64.h> directly; include <gnu/lib-names.h> instead."
#endif
#define LD_LINUX_AARCH64_SO "ld-linux-aarch64.so.1"
#define LD_SO "ld-linux-aarch64.so.1"
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
#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 LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
#define LIBNSS_NIS_SO "libnss_nis.so.2"
#define LIBNSS_TEST1_SO "libnss_test1.so.2"
#define LIBNSS_TEST2_SO "libnss_test2.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"

View File

@ -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 __AARCH64EB__
# include <gnu/lib-names-lp64.h>
#endif
#if defined __AARCH64EB__
# include <gnu/lib-names-lp64_be.h>
#endif
#endif /* gnu/lib-names.h */

View File

@ -0,0 +1,30 @@
/* 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_fattach
#define __stub_fchflags
#define __stub_fdetach
#define __stub_getmsg
#define __stub_getpmsg
#define __stub_gtty
#define __stub_lchmod
#define __stub_putmsg
#define __stub_putpmsg
#define __stub_revoke
#define __stub_setlogin
#define __stub_sigreturn
#define __stub_sstk
#define __stub_stty
#define __stub_sysctl

View File

@ -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 __AARCH64EB__
# include <gnu/stubs-lp64.h>
#endif
#if defined __AARCH64EB__
# include <gnu/stubs-lp64_be.h>
#endif

View File

@ -0,0 +1,170 @@
/* Copyright (C) 1992-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _IEEE754_H
#define _IEEE754_H 1
#include <features.h>
#include <endian.h>
__BEGIN_DECLS
union ieee754_float
{
float f;
/* This is the IEEE 754 single-precision format. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:8;
unsigned int mantissa:23;
#endif /* Big endian. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int mantissa:23;
unsigned int exponent:8;
unsigned int negative:1;
#endif /* Little endian. */
} ieee;
/* This format makes it easier to see if a NaN is a signalling NaN. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:8;
unsigned int quiet_nan:1;
unsigned int mantissa:22;
#endif /* Big endian. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int mantissa:22;
unsigned int quiet_nan:1;
unsigned int exponent:8;
unsigned int negative:1;
#endif /* Little endian. */
} ieee_nan;
};
#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
union ieee754_double
{
double d;
/* This is the IEEE 754 double-precision format. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:11;
/* Together these comprise the mantissa. */
unsigned int mantissa0:20;
unsigned int mantissa1:32;
#endif /* Big endian. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
/* Together these comprise the mantissa. */
unsigned int mantissa1:32;
unsigned int mantissa0:20;
unsigned int exponent:11;
unsigned int negative:1;
#endif /* Little endian. */
} ieee;
/* This format makes it easier to see if a NaN is a signalling NaN. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:11;
unsigned int quiet_nan:1;
/* Together these comprise the mantissa. */
unsigned int mantissa0:19;
unsigned int mantissa1:32;
#else
/* Together these comprise the mantissa. */
unsigned int mantissa1:32;
unsigned int mantissa0:19;
unsigned int quiet_nan:1;
unsigned int exponent:11;
unsigned int negative:1;
#endif
} ieee_nan;
};
#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
union ieee854_long_double
{
long double d;
/* This is the IEEE 854 quad-precision format. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:15;
/* Together these comprise the mantissa. */
unsigned int mantissa0:16;
unsigned int mantissa1:32;
unsigned int mantissa2:32;
unsigned int mantissa3:32;
#endif /* Big endian. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
/* Together these comprise the mantissa. */
unsigned int mantissa3:32;
unsigned int mantissa2:32;
unsigned int mantissa1:32;
unsigned int mantissa0:16;
unsigned int exponent:15;
unsigned int negative:1;
#endif /* Little endian. */
} ieee;
/* This format makes it easier to see if a NaN is a signalling NaN. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:15;
unsigned int quiet_nan:1;
/* Together these comprise the mantissa. */
unsigned int mantissa0:15;
unsigned int mantissa1:32;
unsigned int mantissa2:32;
unsigned int mantissa3:32;
#else
/* Together these comprise the mantissa. */
unsigned int mantissa3:32;
unsigned int mantissa2:32;
unsigned int mantissa1:32;
unsigned int mantissa0:15;
unsigned int quiet_nan:1;
unsigned int exponent:15;
unsigned int negative:1;
#endif
} ieee_nan;
};
#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
__END_DECLS
#endif /* ieee754.h */

View File

@ -0,0 +1,26 @@
/* Copyright (C) 1996-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_ELF_H
#define _SYS_ELF_H 1
#warning "This header is obsolete; use <sys/procfs.h> instead."
#include <sys/procfs.h>
#endif /* sys/elf.h */

View File

@ -0,0 +1,148 @@
/* `ptrace' debugger support interface. Linux/AArch64 version.
Copyright (C) 1996-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_PTRACE_H
#define _SYS_PTRACE_H 1
#include <features.h>
#include <bits/types.h>
__BEGIN_DECLS
/* Type of the REQUEST argument to `ptrace.' */
enum __ptrace_request
{
/* Indicate that the process making this request should be traced.
All signals received by this process can be intercepted by its
parent, and its parent can use the other `ptrace' requests. */
PTRACE_TRACEME = 0,
#define PT_TRACE_ME PTRACE_TRACEME
/* Return the word in the process's text space at address ADDR. */
PTRACE_PEEKTEXT = 1,
#define PT_READ_I PTRACE_PEEKTEXT
/* Return the word in the process's data space at address ADDR. */
PTRACE_PEEKDATA = 2,
#define PT_READ_D PTRACE_PEEKDATA
/* Return the word in the process's user area at offset ADDR. */
PTRACE_PEEKUSER = 3,
#define PT_READ_U PTRACE_PEEKUSER
/* Write the word DATA into the process's text space at address ADDR. */
PTRACE_POKETEXT = 4,
#define PT_WRITE_I PTRACE_POKETEXT
/* Write the word DATA into the process's data space at address ADDR. */
PTRACE_POKEDATA = 5,
#define PT_WRITE_D PTRACE_POKEDATA
/* Write the word DATA into the process's user area at offset ADDR. */
PTRACE_POKEUSER = 6,
#define PT_WRITE_U PTRACE_POKEUSER
/* Continue the process. */
PTRACE_CONT = 7,
#define PT_CONTINUE PTRACE_CONT
/* Kill the process. */
PTRACE_KILL = 8,
#define PT_KILL PTRACE_KILL
/* Single step the process. */
PTRACE_SINGLESTEP = 9,
#define PT_STEP PTRACE_SINGLESTEP
/* Attach to a process that is already running. */
PTRACE_ATTACH = 16,
#define PT_ATTACH PTRACE_ATTACH
/* Detach from a process attached to with PTRACE_ATTACH. */
PTRACE_DETACH = 17,
#define PT_DETACH PTRACE_DETACH
/* Continue and stop at the next entry to or return from syscall. */
PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
/* Set ptrace filter options. */
PTRACE_SETOPTIONS = 0x4200,
#define PT_SETOPTIONS PTRACE_SETOPTIONS
/* Get last ptrace message. */
PTRACE_GETEVENTMSG = 0x4201,
#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
/* Get siginfo for process. */
PTRACE_GETSIGINFO = 0x4202,
#define PT_GETSIGINFO PTRACE_GETSIGINFO
/* Set new siginfo for process. */
PTRACE_SETSIGINFO = 0x4203,
#define PT_SETSIGINFO PTRACE_SETSIGINFO
/* Get register content. */
PTRACE_GETREGSET = 0x4204,
#define PTRACE_GETREGSET PTRACE_GETREGSET
/* Set register content. */
PTRACE_SETREGSET = 0x4205,
#define PTRACE_SETREGSET PTRACE_SETREGSET
/* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
signal or group stop state. */
PTRACE_SEIZE = 0x4206,
#define PTRACE_SEIZE PTRACE_SEIZE
/* Trap seized tracee. */
PTRACE_INTERRUPT = 0x4207,
#define PTRACE_INTERRUPT PTRACE_INTERRUPT
/* Wait for next group event. */
PTRACE_LISTEN = 0x4208,
#define PTRACE_LISTEN PTRACE_LISTEN
/* Retrieve siginfo_t structures without removing signals from a queue. */
PTRACE_PEEKSIGINFO = 0x4209,
#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
/* Get the mask of blocked signals. */
PTRACE_GETSIGMASK = 0x420a,
#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
/* Change the mask of blocked signals. */
PTRACE_SETSIGMASK = 0x420b,
#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
/* Get seccomp BPF filters. */
PTRACE_SECCOMP_GET_FILTER = 0x420c,
#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
/* Get seccomp BPF filter metadata. */
PTRACE_SECCOMP_GET_METADATA = 0x420d
#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
};
#include <bits/ptrace-shared.h>
__END_DECLS
#endif /* _SYS_PTRACE_H */

View File

@ -0,0 +1,78 @@
/* Copyright (C) 1998-2019 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
<http://www.gnu.org/licenses/>. */
/* System V/AArch64 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>
#ifdef __USE_MISC
# define __ctx(fld) fld
#else
# define __ctx(fld) __ ## fld
#endif
#ifdef __USE_MISC
# include <sys/procfs.h>
typedef elf_greg_t greg_t;
/* Container for all general registers. */
typedef elf_gregset_t gregset_t;
/* Structure to describe FPU registers. */
typedef elf_fpregset_t fpregset_t;
#endif
/* Context to describe whole processor state. This only describes
the core registers; coprocessor registers get saved elsewhere
(e.g. in uc_regspace, or somewhere unspecified on the stack
during non-RT signal handlers). */
typedef struct
{
unsigned long long int __ctx(fault_address);
unsigned long long int __ctx(regs)[31];
unsigned long long int __ctx(sp);
unsigned long long int __ctx(pc);
unsigned long long int __ctx(pstate);
/* This field contains extension records for additional processor
state such as the FP/SIMD state. It has to match the definition
of the corresponding field in the sigcontext struct, see the
arch/arm64/include/uapi/asm/sigcontext.h linux header for details. */
unsigned char __reserved[4096] __attribute__ ((__aligned__ (16)));
} mcontext_t;
/* Userlevel context. */
typedef struct ucontext_t
{
unsigned long __ctx(uc_flags);
struct ucontext_t *uc_link;
stack_t uc_stack;
sigset_t uc_sigmask;
mcontext_t uc_mcontext;
} ucontext_t;
#undef __ctx
#endif /* sys/ucontext.h */

View File

@ -0,0 +1,37 @@
/* Copyright (C) 2009-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_USER_H
#define _SYS_USER_H 1
struct user_regs_struct
{
unsigned long long regs[31];
unsigned long long sp;
unsigned long long pc;
unsigned long long pstate;
};
struct user_fpsimd_struct
{
__uint128_t vregs[32];
unsigned int fpsr;
unsigned int fpcr;
};
#endif

View File

@ -0,0 +1,24 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* Copyright (C) 2012 ARM Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ASM_BITSPERLONG_H
#define __ASM_BITSPERLONG_H
#define __BITS_PER_LONG 64
#include <asm-generic/bitsperlong.h>
#endif /* __ASM_BITSPERLONG_H */

View File

@ -0,0 +1,21 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* Copyright (C) 2012 ARM Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define __ARCH_WANT_RENAMEAT
#define __ARCH_WANT_NEW_STAT
#include <asm-generic/unistd.h>

View File

@ -0,0 +1,30 @@
/* Copyright (C) 1997-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
/* AArch64 can be either big or little endian. */
#ifdef __AARCH64EB__
# define __BYTE_ORDER __BIG_ENDIAN
#else
# define __BYTE_ORDER __LITTLE_ENDIAN
#endif
#define __FLOAT_WORD_ORDER __BYTE_ORDER

View File

@ -0,0 +1,61 @@
/* O_*, F_*, FD_* bit values for the AArch64 Linux ABI.
Copyright (C) 2011-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
#define __O_DIRECTORY 040000
#define __O_NOFOLLOW 0100000
#define __O_DIRECT 0200000
#ifdef __ILP32__
# define __O_LARGEFILE 0400000
#else
# define __O_LARGEFILE 0
#endif
#ifdef __LP64__
# define F_GETLK64 5
# define F_SETLK64 6
# define F_SETLKW64 7
#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'). */
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
__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>

View File

@ -0,0 +1,82 @@
/* Copyright (C) 2004-2019 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
<http://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
#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

View File

@ -0,0 +1,97 @@
/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
Copyright (C) 2017-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_FLOATN_H
#define _BITS_FLOATN_H
#include <features.h>
#include <bits/long-double.h>
/* 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. */
#ifndef __NO_LONG_DOUBLE_MATH
# define __HAVE_FLOAT128 1
#else
/* glibc does not support _Float128 for platforms where long double is
normally binary128 when building with long double as binary64.
GCC's default for supported scalar modes does not support it either
in that case. */
# define __HAVE_FLOAT128 0
#endif
/* 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 __HAVE_FLOAT128
/* 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 __HAVE_FLOAT128
#ifndef __ASSEMBLER__
/* Defined to concatenate the literal suffix to be used with _Float128
types, if __HAVE_FLOAT128 is 1. */
# if __HAVE_FLOAT128
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
/* The literal suffix f128 exists only since GCC 7.0. */
# define __f128(x) x##l
# else
# define __f128(x) x##f128
# endif
# endif
/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
# if __HAVE_FLOAT128
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# define __CFLOAT128 _Complex long double
# else
# define __CFLOAT128 _Complex _Float128
# endif
# endif
/* The remaining of this file provides support for older compilers. */
# if __HAVE_FLOAT128
/* The type _Float128 exists only since GCC 7.0. */
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef long double _Float128;
# endif
/* Various built-in functions do not exist before GCC 7.0. */
# if !__GNUC_PREREQ (7, 0)
# define __builtin_huge_valf128() (__builtin_huge_vall ())
# define __builtin_inff128() (__builtin_infl ())
# define __builtin_nanf128(x) (__builtin_nanl (x))
# define __builtin_nansf128(x) (__builtin_nansl (x))
# endif
# endif
#endif /* !__ASSEMBLER__. */
#include <bits/floatn-common.h>
#endif /* _BITS_FLOATN_H */

View File

@ -0,0 +1,34 @@
/* Define FP_FAST_* macros. AArch64 version.
Copyright (C) 2016-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _MATH_H
# error "Never use <bits/fp-fast.h> directly; include <math.h> instead."
#endif
#ifdef __USE_ISOC99
/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
builtins are supported. */
# define FP_FAST_FMA 1
# define FP_FAST_FMAF 1
# ifdef __FP_FAST_FMAL
# define FP_FAST_FMAL 1
# endif
#endif

View File

@ -0,0 +1,53 @@
/* Defines for bits in AT_HWCAP. AArch64 Linux version.
Copyright (C) 2016-2019 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
<http://www.gnu.org/licenses/>. */
#if !defined (_SYS_AUXV_H)
# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
#endif
/* The following must match the kernel's <asm/hwcap.h> and update the
list together with sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c. */
#define HWCAP_FP (1 << 0)
#define HWCAP_ASIMD (1 << 1)
#define HWCAP_EVTSTRM (1 << 2)
#define HWCAP_AES (1 << 3)
#define HWCAP_PMULL (1 << 4)
#define HWCAP_SHA1 (1 << 5)
#define HWCAP_SHA2 (1 << 6)
#define HWCAP_CRC32 (1 << 7)
#define HWCAP_ATOMICS (1 << 8)
#define HWCAP_FPHP (1 << 9)
#define HWCAP_ASIMDHP (1 << 10)
#define HWCAP_CPUID (1 << 11)
#define HWCAP_ASIMDRDM (1 << 12)
#define HWCAP_JSCVT (1 << 13)
#define HWCAP_FCMA (1 << 14)
#define HWCAP_LRCPC (1 << 15)
#define HWCAP_DCPOP (1 << 16)
#define HWCAP_SHA3 (1 << 17)
#define HWCAP_SM3 (1 << 18)
#define HWCAP_SM4 (1 << 19)
#define HWCAP_ASIMDDP (1 << 20)
#define HWCAP_SHA512 (1 << 21)
#define HWCAP_SVE (1 << 22)
#define HWCAP_ASIMDFHM (1 << 23)
#define HWCAP_DIT (1 << 24)
#define HWCAP_USCAT (1 << 25)
#define HWCAP_ILRCPC (1 << 26)
#define HWCAP_FLAGM (1 << 27)
#define HWCAP_SSBS (1 << 28)

View File

@ -0,0 +1,54 @@
/* Copyright (C) 1995-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_IPC_H
# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
#endif
#include <bits/types.h>
/* Mode bits for `msgget', `semget', and `shmget'. */
#define IPC_CREAT 01000 /* Create key if key does not exist. */
#define IPC_EXCL 02000 /* Fail if key exists. */
#define IPC_NOWAIT 04000 /* Return error on wait. */
/* Control commands for `msgctl', `semctl', and `shmctl'. */
#define IPC_RMID 0 /* Remove identifier. */
#define IPC_SET 1 /* Set `ipc_perm' options. */
#define IPC_STAT 2 /* Get `ipc_perm' options. */
#ifdef __USE_GNU
# define IPC_INFO 3 /* See ipcs. */
#endif
/* Special key values. */
#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
/* Data structure used to pass permission information to IPC operations. */
struct ipc_perm
{
__key_t __key; /* Key. */
__uid_t uid; /* Owner's user ID. */
__gid_t gid; /* Owner's group ID. */
__uid_t cuid; /* Creator's user ID. */
__gid_t cgid; /* Creator's group ID. */
unsigned int mode; /* Read/write permission. */
unsigned short int __seq; /* Sequence number. */
unsigned short int __pad1;
__syscall_ulong_t __glibc_reserved1;
__syscall_ulong_t __glibc_reserved2;
};

View File

@ -0,0 +1,60 @@
/* Copyright (C) 2005-2019 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
<http://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 AArch64. */
typedef struct La_aarch64_regs
{
uint64_t lr_xreg[8];
uint64_t lr_dreg[8];
uint64_t lr_sp;
uint64_t lr_lr;
} La_aarch64_regs;
/* Return values for calls from PLT on AArch64. */
typedef struct La_aarch64_retval
{
/* Up to two integer registers can be used for a return value. */
uint64_t lrv_xreg[2];
/* Up to four D registers can be used for a return value. */
uint64_t lrv_dreg[4];
} La_aarch64_retval;
__BEGIN_DECLS
extern ElfW(Addr)
la_aarch64_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx,
uintptr_t *__refcook,
uintptr_t *__defcook,
La_aarch64_regs *__regs,
unsigned int *__flags,
const char *__symname,
long int *__framesizep);
extern unsigned int
la_aarch64_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx,
uintptr_t *__refcook,
uintptr_t *__defcook,
const La_aarch64_regs *__inregs,
La_aarch64_retval *__outregs,
const char *__symname);
__END_DECLS

View File

@ -0,0 +1,101 @@
/* Minimum guaranteed maximum values for system limits. Linux version.
Copyright (C) 1993-2019 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
<http://www.gnu.org/licenses/>. */
/* The kernel header pollutes the namespace with the NR_OPEN symbol
and defines LINK_MAX although filesystems have different maxima. A
similar thing is true for OPEN_MAX: the limit can be changed at
runtime and therefore the macro must not be defined. Remove this
after including the header if necessary. */
#ifndef NR_OPEN
# define __undef_NR_OPEN
#endif
#ifndef LINK_MAX
# define __undef_LINK_MAX
#endif
#ifndef OPEN_MAX
# define __undef_OPEN_MAX
#endif
#ifndef ARG_MAX
# define __undef_ARG_MAX
#endif
/* The kernel sources contain a file with all the needed information. */
#include <linux/limits.h>
/* Have to remove NR_OPEN? */
#ifdef __undef_NR_OPEN
# undef NR_OPEN
# undef __undef_NR_OPEN
#endif
/* Have to remove LINK_MAX? */
#ifdef __undef_LINK_MAX
# undef LINK_MAX
# undef __undef_LINK_MAX
#endif
/* Have to remove OPEN_MAX? */
#ifdef __undef_OPEN_MAX
# undef OPEN_MAX
# undef __undef_OPEN_MAX
#endif
/* Have to remove ARG_MAX? */
#ifdef __undef_ARG_MAX
# undef ARG_MAX
# undef __undef_ARG_MAX
#endif
/* The number of data keys per process. */
#define _POSIX_THREAD_KEYS_MAX 128
/* This is the value this implementation supports. */
#define PTHREAD_KEYS_MAX 1024
/* Controlling the iterations of destructors for thread-specific data. */
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
/* Number of iterations this implementation does. */
#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
/* The number of threads per process. */
#define _POSIX_THREAD_THREADS_MAX 64
/* We have no predefined limit on the number of threads. */
#undef PTHREAD_THREADS_MAX
/* Maximum amount by which a process can descrease its asynchronous I/O
priority level. */
#define AIO_PRIO_DELTA_MAX 20
/* Minimum size for a thread. At least two pages for systems with 64k
pages. */
#define PTHREAD_STACK_MIN 131072
/* Maximum number of timer expiration overruns. */
#define DELAYTIMER_MAX 2147483647
/* Maximum tty name length. */
#define TTY_NAME_MAX 32
/* Maximum login name length. This is arbitrary. */
#define LOGIN_NAME_MAX 256
/* Maximum host name length. */
#define HOST_NAME_MAX 64
/* Maximum message queue priority level. */
#define MQ_PRIO_MAX 32768
/* Maximum value the semaphore can have. */
#define SEM_VALUE_MAX (2147483647)

View File

@ -0,0 +1,20 @@
/* Properties of long double type. ldbl-128 version.
Copyright (C) 2016-2019 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
<http://www.gnu.org/licenses/>. */
/* long double is distinct from double, so there is nothing to
define here. */

View File

@ -0,0 +1,35 @@
/* Types for registers for sys/procfs.h. AArch64 version.
Copyright (C) 1996-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_PROCFS_H
# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
#endif
/* Type for a general-purpose register. */
typedef __uint64_t elf_greg_t;
/* And the whole bunch of them. We could have used `struct
pt_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 elf_greg_t elf_gregset_t[ELF_NGREG];
/* Register set for the floating-point registers. */
typedef struct user_fpsimd_struct elf_fpregset_t;

View File

@ -0,0 +1,71 @@
/* Copyright (C) 2002-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_PTHREADTYPES_ARCH_H
#define _BITS_PTHREADTYPES_ARCH_H 1
#include <endian.h>
#ifdef __ILP32__
# define __SIZEOF_PTHREAD_ATTR_T 32
# define __SIZEOF_PTHREAD_MUTEX_T 32
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
# define __SIZEOF_PTHREAD_CONDATTR_T 4
# define __SIZEOF_PTHREAD_RWLOCK_T 48
# define __SIZEOF_PTHREAD_BARRIER_T 20
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
#else
# define __SIZEOF_PTHREAD_ATTR_T 64
# define __SIZEOF_PTHREAD_MUTEX_T 48
# define __SIZEOF_PTHREAD_MUTEXATTR_T 8
# define __SIZEOF_PTHREAD_CONDATTR_T 8
# define __SIZEOF_PTHREAD_RWLOCK_T 56
# define __SIZEOF_PTHREAD_BARRIER_T 32
# define __SIZEOF_PTHREAD_BARRIERATTR_T 8
#endif
#define __SIZEOF_PTHREAD_COND_T 48
#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
/* Definitions for internal mutex struct. */
#define __PTHREAD_COMPAT_PADDING_MID
#define __PTHREAD_COMPAT_PADDING_END
#define __PTHREAD_MUTEX_LOCK_ELISION 0
#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
#define __PTHREAD_MUTEX_USE_UNION 0
#define __LOCK_ALIGNMENT
#define __ONCE_ALIGNMENT
struct __pthread_rwlock_arch_t
{
unsigned int __readers;
unsigned int __writers;
unsigned int __wrphase_futex;
unsigned int __writers_futex;
unsigned int __pad3;
unsigned int __pad4;
int __cur_writer;
int __shared;
unsigned long int __pad1;
unsigned long int __pad2;
unsigned int __flags;
};
#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
#endif /* bits/pthreadtypes.h */

View File

@ -0,0 +1,39 @@
/* Copyright (C) 2002-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SEMAPHORE_H
# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
#endif
#ifdef __ILP32__
# define __SIZEOF_SEM_T 16
#else
# define __SIZEOF_SEM_T 32
#endif
/* Value returned if `sem_open' failed. */
#define SEM_FAILED ((sem_t *) 0)
typedef union
{
char __size[__SIZEOF_SEM_T];
long long int __align;
} sem_t;

View File

@ -0,0 +1,33 @@
/* Copyright (C) 1997-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_SETJMP_H
#define _BITS_SETJMP_H 1
#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
#ifndef _ASM
/* Jump buffer contains:
x19-x28, x29(fp), x30(lr), (x31)sp, d8-d15. Other registers are not
saved. */
__extension__ typedef unsigned long long __jmp_buf [22];
#endif
#endif

View File

@ -0,0 +1,32 @@
/* sigstack, sigaltstack definitions.
Copyright (C) 2015-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_SIGSTACK_H
#define _BITS_SIGSTACK_H 1
#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
# error "Never include this file directly. Use <signal.h> instead"
#endif
/* Minimum stack size for a signal handler. */
#define MINSIGSTKSZ 5120
/* System default stack size. */
#define SIGSTKSZ 16384
#endif /* bits/sigstack.h */

View File

@ -0,0 +1,171 @@
/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
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
<http://www.gnu.org/licenses/>. */
#if !defined _SYS_STAT_H && !defined _FCNTL_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
#endif
#ifndef _BITS_STAT_H
#define _BITS_STAT_H 1
#include <endian.h>
#include <bits/wordsize.h>
/* 64-bit libc uses the kernel's 'struct stat', accessed via the
stat() syscall; 32-bit libc uses the kernel's 'struct stat64'
and accesses it via the stat64() syscall. All the various
APIs offered by libc use the kernel shape for their struct stat
structure; the only difference is that 32-bit programs not
using __USE_FILE_OFFSET64 only see the low 32 bits of some
of the fields (specifically st_ino, st_size, and st_blocks). */
#define _STAT_VER_KERNEL 0
#define _STAT_VER_LINUX 0
#define _STAT_VER _STAT_VER_KERNEL
/* Versions of the `xmknod' interface. */
#define _MKNOD_VER_LINUX 0
#if defined __USE_FILE_OFFSET64
# define __field64(type, type64, name) type64 name
#elif __WORDSIZE == 64
# 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
/* Encoding of the file mode. */
#define __S_IFMT 0170000 /* These bits determine file type. */
/* File types. */
#define __S_IFDIR 0040000 /* Directory. */
#define __S_IFCHR 0020000 /* Character device. */
#define __S_IFBLK 0060000 /* Block device. */
#define __S_IFREG 0100000 /* Regular file. */
#define __S_IFIFO 0010000 /* FIFO. */
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
/* POSIX.1b objects. Note that these macros always evaluate to zero. But
they do it by enforcing the correct use of the macros. */
#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
#define __S_ISGID 02000 /* Set group ID on execution. */
#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
#ifdef __USE_ATFILE
# define UTIME_NOW ((1l << 30) - 1l)
# define UTIME_OMIT ((1l << 30) - 2l)
#endif
#endif /* bits/stat.h */

View File

@ -0,0 +1,86 @@
/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_STATFS_H
# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
#endif
#include <endian.h>
#include <bits/types.h>
#include <bits/wordsize.h>
/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
and accesses it via the statfs64() syscall. All the various
APIs offered by libc use the kernel shape for their struct statfs
structure; the only difference is that 32-bit programs not
using __USE_FILE_OFFSET64 only see the low 32 bits of some
of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
#if defined __USE_FILE_OFFSET64
# define __field64(type, type64, name) type64 name
#elif __WORDSIZE == 64
# 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 statfs
{
__SWORD_TYPE f_type;
__SWORD_TYPE f_bsize;
__field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
__field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
__field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
__field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
__field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
__fsid_t f_fsid;
__SWORD_TYPE f_namelen;
__SWORD_TYPE f_frsize;
__SWORD_TYPE f_flags;
__SWORD_TYPE f_spare[4];
};
#undef __field64
#ifdef __USE_LARGEFILE64
struct statfs64
{
__SWORD_TYPE f_type;
__SWORD_TYPE f_bsize;
__fsblkcnt64_t f_blocks;
__fsblkcnt64_t f_bfree;
__fsblkcnt64_t f_bavail;
__fsfilcnt64_t f_files;
__fsfilcnt64_t f_ffree;
__fsid_t f_fsid;
__SWORD_TYPE f_namelen;
__SWORD_TYPE f_frsize;
__SWORD_TYPE f_flags;
__SWORD_TYPE f_spare[4];
};
#endif
/* Tell code we have these members. */
#define _STATFS_F_NAMELEN
#define _STATFS_F_FRSIZE
#define _STATFS_F_FLAGS

View File

@ -0,0 +1,84 @@
/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
Copyright (C) 2011-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
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
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_TYPES_H
# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
#endif
#ifndef _BITS_TYPESIZES_H
#define _BITS_TYPESIZES_H 1
/* See <bits/types.h> for the meaning of these macros. This file exists so
that <bits/types.h> need not vary across different GNU platforms. */
#define __DEV_T_TYPE __UQUAD_TYPE
#define __UID_T_TYPE __U32_TYPE
#define __GID_T_TYPE __U32_TYPE
#define __INO_T_TYPE __ULONGWORD_TYPE
#define __INO64_T_TYPE __UQUAD_TYPE
#define __MODE_T_TYPE __U32_TYPE
#define __NLINK_T_TYPE __U32_TYPE
#define __OFF_T_TYPE __SLONGWORD_TYPE
#define __OFF64_T_TYPE __SQUAD_TYPE
#define __PID_T_TYPE __S32_TYPE
#define __RLIM_T_TYPE __ULONGWORD_TYPE
#define __RLIM64_T_TYPE __UQUAD_TYPE
#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
#define __BLKCNT64_T_TYPE __SQUAD_TYPE
#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
#define __FSWORD_T_TYPE __SWORD_TYPE
#define __ID_T_TYPE __U32_TYPE
#define __CLOCK_T_TYPE __SLONGWORD_TYPE
#define __TIME_T_TYPE __SLONGWORD_TYPE
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
#define __DADDR_T_TYPE __S32_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
#define __BLKSIZE_T_TYPE __S32_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
#ifdef __LP64__
/* Tell the libc code that off_t and off64_t are actually the same type
for all ABI purposes, even if possibly expressed as different base types
for C type-checking purposes. */
# define __OFF_T_MATCHES_OFF64_T 1
/* Same for ino_t and ino64_t. */
# define __INO_T_MATCHES_INO64_T 1
/* And for __rlim_t and __rlim64_t. */
# define __RLIM_T_MATCHES_RLIM64_T 1
#else
# define __RLIM_T_MATCHES_RLIM64_T 0
#endif
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
#endif /* bits/typesizes.h */

View File

@ -0,0 +1,28 @@
/* Determine the wordsize from the preprocessor defines.
Copyright (C) 2016-2019 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
<http://www.gnu.org/licenses/>. */
#ifdef __LP64__
# define __WORDSIZE 64
#else
# define __WORDSIZE 32
# define __WORDSIZE32_SIZE_ULONG 1
# define __WORDSIZE32_PTRDIFF_LONG 1
#endif
#define __WORDSIZE_TIME64_COMPAT32 0

View File

@ -0,0 +1,90 @@
/* Copyright (C) 1996-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _AARCH64_FPU_CONTROL_H
#define _AARCH64_FPU_CONTROL_H
#include <features.h>
/* Macros for accessing the FPCR and FPSR. */
#if __GNUC_PREREQ (6,0)
# define _FPU_GETCW(fpcr) (fpcr = __builtin_aarch64_get_fpcr ())
# define _FPU_SETCW(fpcr) __builtin_aarch64_set_fpcr (fpcr)
# define _FPU_GETFPSR(fpsr) (fpsr = __builtin_aarch64_get_fpsr ())
# define _FPU_SETFPSR(fpsr) __builtin_aarch64_set_fpsr (fpsr)
#else
# define _FPU_GETCW(fpcr) \
__asm__ __volatile__ ("mrs %0, fpcr" : "=r" (fpcr))
# define _FPU_SETCW(fpcr) \
__asm__ __volatile__ ("msr fpcr, %0" : : "r" (fpcr))
# define _FPU_GETFPSR(fpsr) \
__asm__ __volatile__ ("mrs %0, fpsr" : "=r" (fpsr))
# define _FPU_SETFPSR(fpsr) \
__asm__ __volatile__ ("msr fpsr, %0" : : "r" (fpsr))
#endif
/* Reserved bits should be preserved when modifying register
contents. These two masks indicate which bits in each of FPCR and
FPSR should not be changed. */
#define _FPU_RESERVED 0xfe0fe0ff
#define _FPU_FPSR_RESERVED 0x0fffffe0
#define _FPU_DEFAULT 0x00000000
#define _FPU_FPSR_DEFAULT 0x00000000
/* Layout of FPCR and FPSR:
| | | | | | | |
0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0
s s s s s s s s s s s
c c c c c c c c c c c c
N Z C V Q A D F R R S S S L L L I U U I U O D I I U U I U O D I
C H N Z M M T T B E E E D N N X F F Z O D N N X F F Z O
P O O R R Z N N N E K K E E E E E C K K C C C C C
D D I I P
E E D D
E E
*/
#define _FPU_FPCR_RM_MASK 0xc00000
#define _FPU_FPCR_MASK_IXE 0x1000
#define _FPU_FPCR_MASK_UFE 0x0800
#define _FPU_FPCR_MASK_OFE 0x0400
#define _FPU_FPCR_MASK_DZE 0x0200
#define _FPU_FPCR_MASK_IOE 0x0100
#define _FPU_FPCR_IEEE \
(_FPU_DEFAULT | _FPU_FPCR_MASK_IXE \
| _FPU_FPCR_MASK_UFE | _FPU_FPCR_MASK_OFE \
| _FPU_FPCR_MASK_DZE | _FPU_FPCR_MASK_IOE)
#define _FPU_FPSR_IEEE 0
typedef unsigned int fpu_control_t;
typedef unsigned int fpu_fpsr_t;
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
#endif

View File

@ -0,0 +1,31 @@
/* This file is automatically generated. */
#ifndef __GNU_LIB_NAMES_H
# error "Never use <gnu/lib-names-lp64_be.h> directly; include <gnu/lib-names.h> instead."
#endif
#define LD_LINUX_AARCH64_BE_SO "ld-linux-aarch64_be.so.1"
#define LD_SO "ld-linux-aarch64_be.so.1"
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
#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 LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
#define LIBNSS_NIS_SO "libnss_nis.so.2"
#define LIBNSS_TEST1_SO "libnss_test1.so.2"
#define LIBNSS_TEST2_SO "libnss_test2.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"

View File

@ -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 __AARCH64EB__
# include <gnu/lib-names-lp64.h>
#endif
#if defined __AARCH64EB__
# include <gnu/lib-names-lp64_be.h>
#endif
#endif /* gnu/lib-names.h */

View File

@ -0,0 +1,30 @@
/* 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_fattach
#define __stub_fchflags
#define __stub_fdetach
#define __stub_getmsg
#define __stub_getpmsg
#define __stub_gtty
#define __stub_lchmod
#define __stub_putmsg
#define __stub_putpmsg
#define __stub_revoke
#define __stub_setlogin
#define __stub_sigreturn
#define __stub_sstk
#define __stub_stty
#define __stub_sysctl

View File

@ -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 __AARCH64EB__
# include <gnu/stubs-lp64.h>
#endif
#if defined __AARCH64EB__
# include <gnu/stubs-lp64_be.h>
#endif

View File

@ -0,0 +1,170 @@
/* Copyright (C) 1992-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _IEEE754_H
#define _IEEE754_H 1
#include <features.h>
#include <endian.h>
__BEGIN_DECLS
union ieee754_float
{
float f;
/* This is the IEEE 754 single-precision format. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:8;
unsigned int mantissa:23;
#endif /* Big endian. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int mantissa:23;
unsigned int exponent:8;
unsigned int negative:1;
#endif /* Little endian. */
} ieee;
/* This format makes it easier to see if a NaN is a signalling NaN. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:8;
unsigned int quiet_nan:1;
unsigned int mantissa:22;
#endif /* Big endian. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int mantissa:22;
unsigned int quiet_nan:1;
unsigned int exponent:8;
unsigned int negative:1;
#endif /* Little endian. */
} ieee_nan;
};
#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
union ieee754_double
{
double d;
/* This is the IEEE 754 double-precision format. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:11;
/* Together these comprise the mantissa. */
unsigned int mantissa0:20;
unsigned int mantissa1:32;
#endif /* Big endian. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
/* Together these comprise the mantissa. */
unsigned int mantissa1:32;
unsigned int mantissa0:20;
unsigned int exponent:11;
unsigned int negative:1;
#endif /* Little endian. */
} ieee;
/* This format makes it easier to see if a NaN is a signalling NaN. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:11;
unsigned int quiet_nan:1;
/* Together these comprise the mantissa. */
unsigned int mantissa0:19;
unsigned int mantissa1:32;
#else
/* Together these comprise the mantissa. */
unsigned int mantissa1:32;
unsigned int mantissa0:19;
unsigned int quiet_nan:1;
unsigned int exponent:11;
unsigned int negative:1;
#endif
} ieee_nan;
};
#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
union ieee854_long_double
{
long double d;
/* This is the IEEE 854 quad-precision format. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:15;
/* Together these comprise the mantissa. */
unsigned int mantissa0:16;
unsigned int mantissa1:32;
unsigned int mantissa2:32;
unsigned int mantissa3:32;
#endif /* Big endian. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
/* Together these comprise the mantissa. */
unsigned int mantissa3:32;
unsigned int mantissa2:32;
unsigned int mantissa1:32;
unsigned int mantissa0:16;
unsigned int exponent:15;
unsigned int negative:1;
#endif /* Little endian. */
} ieee;
/* This format makes it easier to see if a NaN is a signalling NaN. */
struct
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int negative:1;
unsigned int exponent:15;
unsigned int quiet_nan:1;
/* Together these comprise the mantissa. */
unsigned int mantissa0:15;
unsigned int mantissa1:32;
unsigned int mantissa2:32;
unsigned int mantissa3:32;
#else
/* Together these comprise the mantissa. */
unsigned int mantissa3:32;
unsigned int mantissa2:32;
unsigned int mantissa1:32;
unsigned int mantissa0:15;
unsigned int quiet_nan:1;
unsigned int exponent:15;
unsigned int negative:1;
#endif
} ieee_nan;
};
#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
__END_DECLS
#endif /* ieee754.h */

View File

@ -0,0 +1,26 @@
/* Copyright (C) 1996-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_ELF_H
#define _SYS_ELF_H 1
#warning "This header is obsolete; use <sys/procfs.h> instead."
#include <sys/procfs.h>
#endif /* sys/elf.h */

View File

@ -0,0 +1,148 @@
/* `ptrace' debugger support interface. Linux/AArch64 version.
Copyright (C) 1996-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_PTRACE_H
#define _SYS_PTRACE_H 1
#include <features.h>
#include <bits/types.h>
__BEGIN_DECLS
/* Type of the REQUEST argument to `ptrace.' */
enum __ptrace_request
{
/* Indicate that the process making this request should be traced.
All signals received by this process can be intercepted by its
parent, and its parent can use the other `ptrace' requests. */
PTRACE_TRACEME = 0,
#define PT_TRACE_ME PTRACE_TRACEME
/* Return the word in the process's text space at address ADDR. */
PTRACE_PEEKTEXT = 1,
#define PT_READ_I PTRACE_PEEKTEXT
/* Return the word in the process's data space at address ADDR. */
PTRACE_PEEKDATA = 2,
#define PT_READ_D PTRACE_PEEKDATA
/* Return the word in the process's user area at offset ADDR. */
PTRACE_PEEKUSER = 3,
#define PT_READ_U PTRACE_PEEKUSER
/* Write the word DATA into the process's text space at address ADDR. */
PTRACE_POKETEXT = 4,
#define PT_WRITE_I PTRACE_POKETEXT
/* Write the word DATA into the process's data space at address ADDR. */
PTRACE_POKEDATA = 5,
#define PT_WRITE_D PTRACE_POKEDATA
/* Write the word DATA into the process's user area at offset ADDR. */
PTRACE_POKEUSER = 6,
#define PT_WRITE_U PTRACE_POKEUSER
/* Continue the process. */
PTRACE_CONT = 7,
#define PT_CONTINUE PTRACE_CONT
/* Kill the process. */
PTRACE_KILL = 8,
#define PT_KILL PTRACE_KILL
/* Single step the process. */
PTRACE_SINGLESTEP = 9,
#define PT_STEP PTRACE_SINGLESTEP
/* Attach to a process that is already running. */
PTRACE_ATTACH = 16,
#define PT_ATTACH PTRACE_ATTACH
/* Detach from a process attached to with PTRACE_ATTACH. */
PTRACE_DETACH = 17,
#define PT_DETACH PTRACE_DETACH
/* Continue and stop at the next entry to or return from syscall. */
PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
/* Set ptrace filter options. */
PTRACE_SETOPTIONS = 0x4200,
#define PT_SETOPTIONS PTRACE_SETOPTIONS
/* Get last ptrace message. */
PTRACE_GETEVENTMSG = 0x4201,
#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
/* Get siginfo for process. */
PTRACE_GETSIGINFO = 0x4202,
#define PT_GETSIGINFO PTRACE_GETSIGINFO
/* Set new siginfo for process. */
PTRACE_SETSIGINFO = 0x4203,
#define PT_SETSIGINFO PTRACE_SETSIGINFO
/* Get register content. */
PTRACE_GETREGSET = 0x4204,
#define PTRACE_GETREGSET PTRACE_GETREGSET
/* Set register content. */
PTRACE_SETREGSET = 0x4205,
#define PTRACE_SETREGSET PTRACE_SETREGSET
/* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
signal or group stop state. */
PTRACE_SEIZE = 0x4206,
#define PTRACE_SEIZE PTRACE_SEIZE
/* Trap seized tracee. */
PTRACE_INTERRUPT = 0x4207,
#define PTRACE_INTERRUPT PTRACE_INTERRUPT
/* Wait for next group event. */
PTRACE_LISTEN = 0x4208,
#define PTRACE_LISTEN PTRACE_LISTEN
/* Retrieve siginfo_t structures without removing signals from a queue. */
PTRACE_PEEKSIGINFO = 0x4209,
#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
/* Get the mask of blocked signals. */
PTRACE_GETSIGMASK = 0x420a,
#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
/* Change the mask of blocked signals. */
PTRACE_SETSIGMASK = 0x420b,
#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
/* Get seccomp BPF filters. */
PTRACE_SECCOMP_GET_FILTER = 0x420c,
#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
/* Get seccomp BPF filter metadata. */
PTRACE_SECCOMP_GET_METADATA = 0x420d
#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
};
#include <bits/ptrace-shared.h>
__END_DECLS
#endif /* _SYS_PTRACE_H */

View File

@ -0,0 +1,78 @@
/* Copyright (C) 1998-2019 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
<http://www.gnu.org/licenses/>. */
/* System V/AArch64 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>
#ifdef __USE_MISC
# define __ctx(fld) fld
#else
# define __ctx(fld) __ ## fld
#endif
#ifdef __USE_MISC
# include <sys/procfs.h>
typedef elf_greg_t greg_t;
/* Container for all general registers. */
typedef elf_gregset_t gregset_t;
/* Structure to describe FPU registers. */
typedef elf_fpregset_t fpregset_t;
#endif
/* Context to describe whole processor state. This only describes
the core registers; coprocessor registers get saved elsewhere
(e.g. in uc_regspace, or somewhere unspecified on the stack
during non-RT signal handlers). */
typedef struct
{
unsigned long long int __ctx(fault_address);
unsigned long long int __ctx(regs)[31];
unsigned long long int __ctx(sp);
unsigned long long int __ctx(pc);
unsigned long long int __ctx(pstate);
/* This field contains extension records for additional processor
state such as the FP/SIMD state. It has to match the definition
of the corresponding field in the sigcontext struct, see the
arch/arm64/include/uapi/asm/sigcontext.h linux header for details. */
unsigned char __reserved[4096] __attribute__ ((__aligned__ (16)));
} mcontext_t;
/* Userlevel context. */
typedef struct ucontext_t
{
unsigned long __ctx(uc_flags);
struct ucontext_t *uc_link;
stack_t uc_stack;
sigset_t uc_sigmask;
mcontext_t uc_mcontext;
} ucontext_t;
#undef __ctx
#endif /* sys/ucontext.h */

View File

@ -0,0 +1,37 @@
/* Copyright (C) 2009-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_USER_H
#define _SYS_USER_H 1
struct user_regs_struct
{
unsigned long long regs[31];
unsigned long long sp;
unsigned long long pc;
unsigned long long pstate;
};
struct user_fpsimd_struct
{
__uint128_t vregs[32];
unsigned int fpsr;
unsigned int fpcr;
};
#endif

View File

@ -0,0 +1,10 @@
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
/* ARM can be either big or little endian. */
#ifdef __ARMEB__
#define __BYTE_ORDER __BIG_ENDIAN
#else
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif

View File

@ -0,0 +1,54 @@
/* O_*, F_*, FD_* bit values for Linux.
Copyright (C) 1995-2019 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
<http://www.gnu.org/licenses/>. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
#define __O_DIRECTORY 040000 /* Must be a directory. */
#define __O_NOFOLLOW 0100000 /* Do not follow links. */
#define __O_DIRECT 0200000 /* Direct disk access. */
#define __O_LARGEFILE 0400000
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>

View File

@ -0,0 +1,90 @@
/* Copyright (C) 2004-2019 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
<http://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 FPU 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 to a mask bit. */
#define FE_EXCEPT_SHIFT 8
/* All supported exceptions. */
#define FE_ALL_EXCEPT \
(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
/* VFP supports all of the four defined rounding modes. */
enum
{
FE_TONEAREST =
#define FE_TONEAREST 0
FE_TONEAREST,
FE_UPWARD =
#define FE_UPWARD 0x400000
FE_UPWARD,
FE_DOWNWARD =
#define FE_DOWNWARD 0x800000
FE_DOWNWARD,
FE_TOWARDZERO =
#define FE_TOWARDZERO 0xc00000
FE_TOWARDZERO
};
/* Type representing exception flags. */
typedef unsigned int fexcept_t;
/* Type representing floating-point environment. */
typedef struct
{
unsigned int __cw;
}
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
#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

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