Specifications

There are no floating-point exceptions. The optional floating point unit (FPU) does not support
exceptions and any process wanting exact IEEE conformance needs to use a soft-float library (possibly
accelerated by use of the attached FPU).
The break instruction in a user process might generate a SIGTRAP signal for that process, but is not
required to. Userspace programs should not use the break instruction and userspace debuggers should
not insert one. If no hardware debugger is connected, the OS should assure that the break instruction
does not cause the system to stop responding.
For information about userspace debugging, refer to "Userspace Breakpoints”.
The page size is 4 KB. Virtual addresses in user mode are all below 2 GB due to the MMU design. The
NULL page is not mapped.
Related Information
Userspace Breakpoints on page 7-22
Linux Process Initialization
The stack pointer, sp, points to the argument count on the stack.
Table 7-8: Stack Initial State at User Process Start
Purpose Start Address Length
Unspecified High addresses
Referenced strings Varies
Unspecified
Null auxilliary vector entry 4 bytes
Auxilliary vector entries 8 bytes each
NULL terminator for envp 4 bytes
Environment pointers sp + 8 + 4 × argc 4 bytes each
NULL terminator for argv sp + 4 + 4 × argc 4 bytes
Argument pointers sp + 4 4 bytes each
Argument count sp 4 bytes
Unspecified Low addresses
If the application should register a destructor function with atexit, the pointer is placed in r4. Otherwise
r4 is zero.
The contents of all other registers are unspecified. User code should set fp to zero to mark the end of the
frame chain.
The auxiliary vector is a series of pairs of 32-bit tag and 32-bit value, terminated by an AT_NULL tag.
Linux Position-Independent Code
Every position-independent code (PIC) function which uses global data or global functions must load the
value of the GOT pointer into a register. Any available register may be used. If a caller-saved register is
used the function must save and restore it around calls. If a callee-saved register is used it must be saved
and restored around the current function. Examples in this document use r22 for the GOT pointer.
NII51016
2015.04.02
Linux Process Initialization
7-17
Application Binary Interface
Altera Corporation
Send Feedback