Function app_stack_region

Source
pub fn app_stack_region(
    args: &[String],
    envs: &[String],
    auxv: &mut [AuxvEntry],
    stack_base: VirtAddr,
    stack_size: usize,
) -> Vec<u8>
Expand description

Generate initial stack frame for user stack

§Arguments

  • args - Arguments of the application
  • envs - Environment variables of the application
  • auxv - Auxiliary vectors of the application
  • stack_base - Lowest address of the stack
  • stack_size - Size of the stack.

§Return

  • Vec<u8> - Initial stack frame of the application

§Notes

The detailed format is described in https://articles.manugarg.com/aboutelfauxiliaryvectors.html