load_elf_into_task

Function load_elf_into_task 

Source
pub fn load_elf_into_task(
    file_obj: &dyn FileObject,
    task: &Task,
) -> Result<u64, ElfLoaderError>
Expand description

Load an ELF file into a task’s memory space

§Arguments

  • file: A mutable reference to a file object containing the ELF file
  • task: A mutable reference to the task into which the ELF file will be loaded

§Returns

  • Result<u64, ElfLoaderError>: The entry point address of the loaded ELF file on success, or an ElfLoaderError on failure

§Errors

  • ElfLoaderError: If any error occurs during the loading process, such as file read errors, parsing errors, or memory allocation errors

Load ELF file into task (backward compatibility wrapper)

This function provides backward compatibility with the existing API. It calls the new analyze_and_load_elf function and returns only the entry point.