ARM: Fix syscalls, part 2.

* include/linux/arm/syscall.h: Fix syscalls.
This commit is contained in:
Danny Milosavljevic 2019-03-06 10:15:58 +01:00 committed by Jan Nieuwenhuizen
parent 01ca0678c1
commit b314c66b3b
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 50 additions and 48 deletions

View File

@ -21,65 +21,67 @@
#ifndef __MES_LINUX_ARM_SYSCALL_H #ifndef __MES_LINUX_ARM_SYSCALL_H
#define __MES_LINUX_ARM_SYSCALL_H 1 #define __MES_LINUX_ARM_SYSCALL_H 1
/* See https://github.com/torvalds/linux/blob/v4.19/arch/arm/tools/syscall.tbl */
// libc // libc
#define SYS_fork 0x900002 #define SYS_fork 0x02
#define SYS_read 0x900003 #define SYS_read 0x03
#define SYS_open 0x900005 #define SYS_open 0x05
//#define SYS_waitpid //#define SYS_waitpid
#define SYS_wait4 0x900072 #define SYS_wait4 0x72
#define SYS_execve 0x90000b #define SYS_execve 0x0b
#define SYS_chmod 0x90000f #define SYS_chmod 0x0f
#define SYS_access 0x900021 #define SYS_access 0x21
#define SYS_brk 0x90002d #define SYS_brk 0x2d
#define SYS_ioctl 0x900036 #define SYS_ioctl 0x36
#define SYS_fsync 0x900076 #define SYS_fsync 0x76
// libc+tcc // libc+tcc
#define SYS_close 0x900006 #define SYS_close 0x06
#define SYS_time 0x90000d #define SYS_time 0x0d
#define SYS_lseek 0x900013 #define SYS_lseek 0x13
#define SYS_unlink 0x90000a #define SYS_unlink 0x0a
#define SYS_rmdir 0x900028 #define SYS_rmdir 0x28
#define SYS_gettimeofday 0x90004e #define SYS_gettimeofday 0x4e
#define SYS_stat 0x90006a #define SYS_stat 0x6a
#define SYS_getcwd 0x9000b7 #define SYS_getcwd 0xb7
// libc+gnu // libc+gnu
#define SYS_chdir 0x90000c #define SYS_chdir 0x0c
#define SYS_link 0x900009 #define SYS_link 0x09
#define SYS_getpid 0x900014 #define SYS_getpid 0x14
#define SYS_getuid 0x900018 #define SYS_getuid 0x18
#define SYS_kill 0x900025 #define SYS_kill 0x25
#define SYS_rename 0x900026 #define SYS_rename 0x26
#define SYS_mkdir 0x900027 #define SYS_mkdir 0x27
#define SYS_dup 0x900029 #define SYS_dup 0x29
#define SYS_pipe 0x90002a #define SYS_pipe 0x2a
#define SYS_getgid 0x90002f #define SYS_getgid 0x2f
#define SYS_rt_sigaction 0x9000ae #define SYS_rt_sigaction 0xae
#define SYS_rt_sigreturn 0x9000ad #define SYS_rt_sigreturn 0xad
#define SYS_fcntl 0x900037 #define SYS_fcntl 0x37
#define SYS_dup2 0x90003f #define SYS_dup2 0x3f
#define SYS_getrusage 0x90004d #define SYS_getrusage 0x4d
#define SYS_lstat 0x90006b #define SYS_lstat 0x6b
#define SYS_setitimer 0x900068 #define SYS_setitimer 0x68
#define SYS_fstat 0x90006c #define SYS_fstat 0x6c
#define SYS_nanosleep 0x9000a2 #define SYS_nanosleep 0xa2
#define SYS_getdents 0x90008d #define SYS_getdents 0x8d
#define SYS_clock_gettime 0x900107 #define SYS_clock_gettime 0x07
// bash // bash
#define SYS_setuid 0x900017 #define SYS_setuid 0x17
#define SYS_setgid 0x90002e #define SYS_setgid 0x2e
#define SYS_geteuid 0x900031 #define SYS_geteuid 0x31
#define SYS_getegid 0x900032 #define SYS_getegid 0x32
#define SYS_getppid 0x900040 #define SYS_getppid 0x40
// make+WITH_GLIBC // make+WITH_GLIBC
#define SYS_rt_sigprocmask 0x9000af #define SYS_rt_sigprocmask 0xaf
// tar // tar
#define SYS_symlink 0x900053 #define SYS_symlink 0x53
#define SYS_readlink 0x900055 #define SYS_readlink 0x55
#define SYS_mknod 0x90000e #define SYS_mknod 0x0e
#endif // __MES_LINUX_ARM_SYSCALL_H #endif // __MES_LINUX_ARM_SYSCALL_H