unsafe fn load(tbf_header: TbfHeader,
               mem_base: *mut u8)
               -> Option<LoadResult> {
    if tbf_header.needs_pic_fixup() {
        unimplemented!("Kernel PIC fixup has been deprecated and removed. See \
                       https://github.com/helena-project/tock/pull/714 for \
                       more information");
    } else {
        // No PIC fixup requested from the kernel. We only need to set an
        // initial stack pointer and sbrk size. The app will do the rest on its
        // own.
        let load_result = LoadResult {
            // Set the initial stack and process memory size to 64 bytes.
            initial_stack_pointer: mem_base.offset(64),
            initial_sbrk_pointer: mem_base.offset(64),
            header: tbf_header,
        };

        Some(load_result)
    }
}
/// Loads the process into memory
///
/// Loads the process whos binary starts at `flash_start_addr` into the memory
/// region beginning at `mem_base`. The process binary must fit within
/// `mem_size` bytes.
///
/// This function will optionally copy the GOT and data segment into memory as
/// well as zero out the BSS section. It also optionally performs relocation on
/// the GOT and on variables named in the relocation section of the binary.
///
/// Note: If we are doing the relocation, we place the stack at the bottom of
/// the memory space so that a stack overflow will trigger an MPU violation
/// rather than overwriting GOT/BSS/.data sections. The stack is not included in
/// the flash data, however, which means that the offset values for everything
/// above the stack in the elf header need to have the stack offset added.
///
/// The function returns a `LoadResult` containing metadata about the loaded
/// process or None if loading failed.
Loads the process into memory
Loads the process whos binary starts at `flash_start_addr` into the memory
region beginning at `mem_base`. The process binary must fit within
`mem_size` bytes.

This function will optionally copy the GOT and data segment into memory as
well as zero out the BSS section. It also optionally performs relocation on
the GOT and on variables named in the relocation section of the binary.

If we are doing the relocation, we place the stack at the bottom of
the memory space so that a stack overflow will trigger an MPU violation
rather than overwriting GOT/BSS/.data sections. The stack is not included in
the flash data, however, which means that the offset values for everything
above the stack in the elf header need to have the stack offset added.

The function returns a `LoadResult` containing metadata about the loaded
process or None if loading failed.
Loads the process into memory Loads the process whos binary starts at ` flash_start_addr ` into the memory region beginning at ` mem_base ` . The process binary must fit within ` mem_size ` bytes . This function will optionally copy the GOT and data segment into memory as well as zero out the BSS section . It also optionally performs relocation on the GOT and on variables named in the relocation section of the binary . If we are doing the relocation we place the stack at the bottom of the memory space so that a stack overflow will trigger an MPU violation rather than overwriting GOT / BSS / . data sections . The stack is not included in the flash data however which means that the offset values for everything above the stack in the elf header need to have the stack offset added . The function returns a ` LoadResult ` containing metadata about the loaded process or None if loading failed .
unsafe fn load(tbf_header: TbfHeader,
               mem_base: *mut u8)
               -> Option<LoadResult> {
    if tbf_header.needs_pic_fixup() {
        unimplemented!("Kernel PIC fixup has been deprecated and removed. See \
                       https://github.com/helena-project/tock/pull/714 for \
                       more information");
    } else {
        // No PIC fixup requested from the kernel. We only need to set an
        // initial stack pointer and sbrk size. The app will do the rest on its
        // own.
        let load_result = LoadResult {
            // Set the initial stack and process memory size to 64 bytes.
            initial_stack_pointer: mem_base.offset(64),
            initial_sbrk_pointer: mem_base.offset(64),
            header: tbf_header,
        };
        Some(load_result)
    }
}
unsafe fn load ( tbf_header : TbfHeader , mem_base : * mut u8 ) -> Option < LoadResult > { if tbf_header . needs_pic_fixup ( ) { unimplemented ! ( " \
 \
 " ) ; } else { // No PIC fixup requested from the kernel. We only need to set an // initial stack pointer and sbrk size. The app will do the rest on its // own. let load_result = LoadResult { // Set the initial stack and process memory size to 64 bytes. initial_stack_pointer : mem_base . offset ( 64 ) , initial_sbrk_pointer : mem_base . offset ( 64 ) , header : tbf_header , } ; Some ( load_result ) } }
Loads the process into memory
Loads the process whos binary starts at `flash_start_addr` into the memory
region beginning at `mem_base`.
Loads the process into memory Loads the process whos binary starts at ` flash_start_addr ` into the memory region beginning at ` mem_base ` .
tbf_header
TbfHeader
mem_base
*mut u8
tbf_header
TbfHeader
mem_base
*mut u8