Skip to main content

Module startup

Module startup 

Source
Expand description

Process startup state (argc, argv, environ, auxv), ELF note, and _start entry macro.

Structs§

AuxSummary
Decoded summary of known auxiliary vector tags.
ElfNote24
24-byte ELF note header + 4-byte owner + 4-byte version descriptor.

Constants§

AT_ENTRY
AT_EXECFN
AT_HWCAP
AT_HWCAP2
AT_NULL
AT_PAGESZ
AT_PHDR
AT_PHENT
AT_PHNUM
AT_RANDOM
DEFAULT_PAGE_SIZE
Default page size when AT_PAGESZ is absent or startup state has not been initialized.
MAX_STACK_WORDS
Maximum number of u64 stack words inspected by init_from_stack.

Traits§

EntryOutcome
Trait allowing process_entry! to accept (), u8, i32, or Result<(), E>.

Functions§

args_vec
Returns the command-line arguments (argv[0..argc]) as byte vectors.
aux_summary
Returns the decoded AuxSummary captured at process startup.
environ_vec
Returns all environment variables as KEY=VALUE byte vectors.
getauxval
Looks up a value from the auxiliary vector by tag key.
getenv_vec
Looks up the environment variable name and returns a cloned byte vector of its value.
init_from_stack⚠
Parses the initial EL0 process stack at sp (argc, argv, envp, auxv) and records process startup state.
make_elf_note
Constructs a 24-byte ElfNote24 for a 4-byte owner tag.
page_size
Returns the active system page size in bytes (defaulting to 4096).
setenv_bytes
Inserts or updates the environment variable name with value.