syscall-alt
[syscall-alt] is a rust crate that provides inline assembler (asm!
macro) definitions of syscalls for some Linux platforms. It also includes:-
- An enum defining common Linux syscalls;
- Some minor wrapper logic to make straightforward to work with syscalls.
- Correct Syscall / Posix error codes ('E'), eg
EINVAL
- These differ slightly on MIPS and PowerPC
- MIPS64 is the same as MIPS
- PowerPC64 is the same as PowerPC
- PowerPC is nearly identical to x8664 bar
EDEADLOCK
:-
- PowerPC is the only platform on which
EDEADLOCK != EDEADLK
(so watch out when using match
)
- MIPS is very different to x8664
- But it has exactly the same set of E numbers
- SYS call numbers and E numbers are available for every arch, eg if you want to know them for
arm
, but are compiled for x86_64
, they are available
The code is very much 'early-days', so expect breaking changes.
TODO
- syscalls are not actually implemented for mips, mips64, powerpc, powerpc64, or s390x but could be by tring to use musl's
syscall_arch.h
headers (bar s390x)
Licensing
The license for this project is AGPL.