You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, most architectures on Linux are supported, but other platforms such as FreeBSD are not yet supported.
The master list of FreeBSD syscalls is at https://cgit.freebsd.org/src/tree/sys/kern/syscalls.master. It should be possible to parse this and generate the necessary syscall tables. Unlike Linux, I believe this list is the same for all architectures under FreeBSD.
To support the addition of another platform besides Linux, I think the following structure should be used:
syscalls::Sysno - Still has the syscall list for the current target architecture and target platform.
syscalls::{target_arch}::Sysno will be the syscall list for the architecture target_archand the current platform.
syscalls::{target_os}::{target_arch}::Sysno will be the syscall list for target_osandtarget_arch.
This should be a backwards compatible change while still allowing the syscall table of other platforms to be available. That is, it might be useful to be able to access the FreeBSD syscall table even if the target OS is Linux.
Thus, the source tree should look like this:
src/linux/{target_arch}.rs
src/freebsd.rs - Might not need individual Sysno tables for each architecture.
src/macos.rs
The text was updated successfully, but these errors were encountered:
Currently, most architectures on Linux are supported, but other platforms such as FreeBSD are not yet supported.
The master list of FreeBSD syscalls is at https://cgit.freebsd.org/src/tree/sys/kern/syscalls.master. It should be possible to parse this and generate the necessary syscall tables. Unlike Linux, I believe this list is the same for all architectures under FreeBSD.
For the MacOS kernel, the list is similar: https://github.com/apple-oss-distributions/xnu/blob/main/bsd/kern/syscalls.master (But it looks harder to parse because of
#ifdef
usage.)To support the addition of another platform besides Linux, I think the following structure should be used:
syscalls::Sysno
- Still has the syscall list for the current target architecture and target platform.syscalls::{target_arch}::Sysno
will be the syscall list for the architecturetarget_arch
and the current platform.syscalls::{target_os}::{target_arch}::Sysno
will be the syscall list fortarget_os
andtarget_arch
.This should be a backwards compatible change while still allowing the syscall table of other platforms to be available. That is, it might be useful to be able to access the FreeBSD syscall table even if the target OS is Linux.
Thus, the source tree should look like this:
src/linux/{target_arch}.rs
src/freebsd.rs
- Might not need individualSysno
tables for each architecture.src/macos.rs
The text was updated successfully, but these errors were encountered: