commit ae09cb99cc6d9c19ae78849c43c50b834edccb8d
parent 6a905ce8d9bda1ca61b7e197153aa8a31df10fce
Author: afify <hassan@afify.dev>
Date: Mon, 21 Mar 2022 11:58:08 +0300
openbsd syscalls
Diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/openbsd_x86_64.csv b/openbsd_x86_64.csv
@@ -0,0 +1,2 @@
+%rax,System call,ret,%rdi,%rsi,%rdx,%r10,%r8,%r9
+59,execve,int,const char *,char *const *,char *const *,,,
diff --git a/syscalls.s b/syscalls.s
@@ -6,8 +6,12 @@
%ifdef Linux
%define SYS_exit 60
%define SYS_write 1
- %define SYS_gettimeofday 96
%define SYS_execve 59
+%elifdef OpenBSD
+ %define SYS_exit 1
+ %define SYS_write 4
+ %define SYS_execve 59
+ %define SYS_pledge 108
%else
%fatal "OS not supported"
%endif