diff --git a/plat/linux/libsys/execve.c b/plat/linux/libsys/execve.c new file mode 100644 index 000000000..d8f37b1cf --- /dev/null +++ b/plat/linux/libsys/execve.c @@ -0,0 +1,7 @@ +#include +#include "libsys.h" + +int execve(const char *path, char *const argv[], char *const envp[]) +{ + return _syscall(__NR_execve, (quad) path, (quad) argv, (quad) envp); +} diff --git a/plat/linux386/include/unistd.h b/plat/linux386/include/unistd.h index 35dc8dde7..5c6f31ef4 100644 --- a/plat/linux386/include/unistd.h +++ b/plat/linux386/include/unistd.h @@ -69,6 +69,7 @@ extern pid_t getpid(void); extern int brk(void* ptr); extern void* sbrk(int increment); extern int isatty(int d); +extern int execve(const char *path, char *const argv[], char *const envp[]); /* Signal handling */ diff --git a/plat/linuxppc/include/unistd.h b/plat/linuxppc/include/unistd.h index 307192f77..a31bd9f0d 100644 --- a/plat/linuxppc/include/unistd.h +++ b/plat/linuxppc/include/unistd.h @@ -67,6 +67,7 @@ extern pid_t getpid(void); extern int brk(void* ptr); extern void* sbrk(int increment); extern int isatty(int d); +extern int execve(const char *path, char *const argv[], char *const envp[]); /* Signal handling */