I'm playing around with a new init system with #![no_std]
and extern crate rlibc
and making syscalls with asm, and currently trying to not allocate memory either. So the scope of possible tools I have is limited.
I need to call the execve syscall, and it requires a char** argv
, and a char **envp
. I can hack together c-style strings as arrays of bytes with zeros, but how can I null-terminate a statically declared list of such (the last pointer being NULL)?