ref: 50937b595b6ac19d583f8a4974f081e6c39a0173
parent: d98e084e77dc2794355477421e8e6386236285bc
author: Hiltjo Posthuma <[email protected]>
date: Thu May 19 14:36:12 EDT 2022
libc/obsd: Add access() and execve() Access() is used in system() and in tmpnam(), while execve() is used only in system().
--- a/src/libc/arch/amd64/openbsd/.gitignore
+++ b/src/libc/arch/amd64/openbsd/.gitignore
@@ -1,5 +1,7 @@
+_access.s
_brk.s
_close.s
+_execve.s
_exit.s
_fork.s
_getpid.s
--- a/src/libc/arch/amd64/openbsd/Makefile
+++ b/src/libc/arch/amd64/openbsd/Makefile
@@ -5,8 +5,10 @@
include ../../../rules.mk
GENOBJS =\
+ _access.$O\
_brk.$O\
_close.$O\
+ _execve.$O\
_exit.$O\
_fork.$O\
_getpid.$O\
--- a/src/libc/arch/amd64/openbsd/syscall.lst
+++ b/src/libc/arch/amd64/openbsd/syscall.lst
@@ -9,7 +9,9 @@
11 _wait4 4
17 _brk 1
20 _getpid 0
+33 _access 2
46 _sigaction 3
+59 _execve 3
67 _gettimeofday 2
122 _kill 2
198 _lseek 3
--- a/src/libc/objs/amd64-openbsd.mk
+++ b/src/libc/objs/amd64-openbsd.mk
@@ -2,8 +2,10 @@
OBJS =\
$(COMMON_OBJS)\
+ arch/amd64/openbsd/_access.$O\
arch/amd64/openbsd/_brk.$O\
arch/amd64/openbsd/_close.$O\
+ arch/amd64/openbsd/_execve.$O\
arch/amd64/openbsd/_exit.$O\
arch/amd64/openbsd/_fork.$O\
arch/amd64/openbsd/_getpid.$O\