vsta

Exec
Login

=== Exec - Process Creation ===

In VSTa, the kernel does not know about any file formats (a.out, etc),
instead, libc is responsible for setting up the new process and
calling the kernel "exec()".

An execv() is implemented as the process opening the target a.out with
a mmap()-type mapping of an open file, verifying that it is sane, then
building a table of offsets and protections for the open file. It then
calls the VSTa exec() syscall, which simply replaces your address
space with the mappings described by the table. The process is
re-entered at the PC value it specifies in the exec() call, and you're
now running with the new executable.


Page faults are converted into FS_READ requests to the server of the
open file. Full copy-on-write is not supported, but VSTa can break
your association with a mapped page as you write it. This is enough to
do exec().