ARM swi numbers
I’ve tried to keep this down to a semi-reasonable length, rather than just dump all 377+ here...
#ilASM {mov r7, sys_exit} and #ilASM {swi sys_exit} should be recognised, even though there is no matching hll sys_exit constant.
(The latter having 0x900000 added that the former does not, other attempted uses of sys_exit, and similar, may or may not work.)
Of course it may often be easier and simply all-round better to use libc routines, but there is a limit to what I can document...
As an [untested] example, #ilASM{call "libc", "dlsym"} is likely to get you much further than anything here possibly can.
In general, it is usually much better to try using libc, like that, before resorting to any of these...
#ilASM {mov r7, sys_exit} and #ilASM {swi sys_exit} should be recognised, even though there is no matching hll sys_exit constant.
(The latter having 0x900000 added that the former does not, other attempted uses of sys_exit, and similar, may or may not work.)
Of course it may often be easier and simply all-round better to use libc routines, but there is a limit to what I can document...
As an [untested] example, #ilASM{call "libc", "dlsym"} is likely to get you much further than anything here possibly can.
In general, it is usually much better to try using libc, like that, before resorting to any of these...
| Name | Registers | ||||||
|---|---|---|---|---|---|---|---|
| r7 | r0 | r1 | r2 | r3 | r4 | r5 | |
| restart_syscall | 0x900000 | - | - | - | - | - | - |
| exit | 0x900001 | int error_code | - | - | - | - | - |
| fork | 0x900002 | - | - | - | - | - | - |
| read | 0x900003 | unsigned int fd | char *buf | size_t count | - | - | - |
| write | 0x900004 | unsigned int fd | const char *buf | size_t count | - | - | - |
| open | 0x900005 | const char *filename | int flags | umode_t mode | - | - | - |
| close | 0x900006 | unsigned int fd | - | - | - | - | - |
| execve | 0x90000b | const char *filenamei | const char *const *argv | const char *const *envp | - | - | - |
| chdir | 0x90000c | const char *filename | - | - | - | - | - |
| time | 0x90000d | time_t *tloc | - | - | - | - | - |
| pipe | 0x90002a | int *fildes | - | - | - | - | - |
| brk | 0x90002d | unsigned long brk | - | - | - | - | - |
| ioctl | 0x900036 | unsigned int fd | unsigned int cmd | unsigned long arg | - | - | - |
| sigaction | 0x900043 | int sig | const struct old_sigaction *act | struct old_sigaction *oact | - | - | - |
| gettimeofday | 0x90004e | struct timeval *tv | struct timezone *tz | - | - | - | - |
| select | 0x900052 | int n | fd_set *inp | fd_set *outp | fd_set *exp | struct timeval *tvp | - |
| mmap | 0x90005a | struct mmap_arg_struct *arg | - | - | - | - | - |
| munmap | 0x90005b | unsigned long addr | size_t len | - | - | - | - |
| flock | 0x90008f | unsigned int fd | unsigned int cmd | - | - | - | - |
| nanosleep | 0x9000a2 | struct timespec *rqtp | struct timespec *rmtp | - | - | - | - |
| mremap | 0x9000a3 | unsigned long addr | unsigned long old_len | unsigned long new_len | unsigned long flags | unsigned long new_addr | - |
| pread64 | 0x9000b4 | char *buf size_t count | loff_t pos | - | - | - | - |
| pwrite64 | 0x9000b5 | const char *buf size_t count | loff_t pos | - | - | - | - |
| chown | 0x9000b6 | const char *filename | uid_t user | gid_t group | - | - | - |
| getcwd | 0x9000b7 | char *buf | unsigned long size | - | - | - | - |
| mmap2 | 0x9000c0 | unsigned long addr | unsigned long len | unsigned long prot | unsigned long flags | unsigned long fd | unsigned long pgoff |
| stat64 | 0x9000c3 | const char *filename | struct stat64 *statbuf | - | - | - | - |
| lstat64 | 0x9000c4 | const char *filename | struct stat64 *statbuf | - | - | - | - |
| fstat64 | 0x9000c5 | unsigned long fd | struct stat64 *statbuf | - | - | - | - |
| fcntl64 | 0x9000dd | unsigned int fd | unsigned int cmd | unsigned long arg | - | - | - |
| gettid | 0x9000e0 | - | - | - | - | - | - |
| futex | 0x9000f0 | u32 *uaddr | int op | u32 val | struct timespec *utime | u32 *uaddr2 | u32 val3 |
| exit_group | 0x9000f8 | int error_code | - | - | - | - | - |
| clock_settime | 0x900106 | const clockid_t which_clock | const struct timespec *tp | - | - | - | - |
| clock_gettime | 0x900107 | const clockid_t which_clock | struct timespec *tp | - | - | - | - |
| clock_getres | 0x900108 | const clockid_t which_clock | struct timespec *tp | - | - | - | - |
| clock_nanosleep | 0x900109 | const clockid_t which_clock | int flags | const struct timespec *rqtp | struct timespec *rmtp | - | - |
| statfs64 | 0x90010a | const char *pathname | size_t sz | struct statfs64 *buf | - | - | - |
| fstatfs64 | 0x90010b | unsigned int fd | size_t sz | struct statfs64 *buf | - | - | - |
| waitid | 0x900118 | int which | pid_t upid | struct siginfo *infop | int options | struct rusage *ru | - |
| socket | 0x900119 | int family | int type | int protocol | - | - | - |
| bind | 0x90011a | int fd | struct sockaddr *umyaddr | int addrlen | - | - | - |
| connect | 0x90011b | int fd | struct sockaddr *uservaddr | int addrlen | - | - | - |
| listen | 0x90011c | int fd | int backlog | - | - | - | - |
| accept | 0x90011d | int fd | struct sockaddr *upeer_sockaddr | int *upeer_addrlen | - | - | - |
| getsockname | 0x90011e | int fd | struct sockaddr *usockaddr | int *usockaddr_len | - | - | - |
| getpeername | 0x90011f | int fd | struct sockaddr *usockaddr | int *usockaddr_len | - | - | - |
| socketpair | 0x900120 | int family | int type | int protocol | int *usockvec | - | - |
| send | 0x900121 | int fd | void *buff | size_t len | unsigned int flags | - | - |
| sendto | 0x900122 | int fd | void *buff | size_t len | unsigned int flags | struct sockaddr *addr | int addr_len |
| recv | 0x900123 | int fd | void *ubuf | size_t size | unsigned int flags | - | - |
| recvfrom | 0x900124 | int fd | void *ubuf | size_t size | unsigned int flags | struct sockaddr *addr | int *addr_len |
| shutdown | 0x900125 | int fd | int how | - | - | - | - |
| setsockopt | 0x900126 | int fd | int level | int optname | char *optval | int optlen | - |
| getsockopt | 0x900127 | int fd | int level | int optname | char *optval | int *optlen | - |
| sendmsg | 0x900128 | int fd | struct msghdr *msg | unsigned int flags | - | - | - |
| recvmsg | 0x900129 | int fd | struct msghdr *msg | unsigned int flags | - | - | - |