Process Initialization
jsix follows the System V ABI on the amd64
architecture. All arguments
needed for program initialization are passed to the program’s initial thread on
the stack.
Note that jsix adds a number of additional auxiliary vector entry types for
passing jsix-specific data to a program. The jsix-specific auxiliary vector type
codes (what the ABI document refers to as a_type
) start from 0xf000
. See
the header file <j6/init.h>
for more detail.
The initial stack frame
Address |
Value |
Bytes |
Notes |
---|---|---|---|
|
Stack top (out of stack bounds) |
||
|
0 |
16 |
Stack sentinel |
|
? |
||
|
? |
||
… |
? |
Possible padding |
|
0, 0 ( |
16 |
Aux vector sentinel |
|
Aux vectors |
16 * m |
|
|
0 |
8 |
Environment sentinel |
|
|
8 * n |
0-terminated array of environment string pointers |
|
0 |
8 |
Args sentinel |
|
|
8 * |
Pointers to argument strings |
|
|
|
8 |
Number of elements in argv |