pub fn prepare_dynamic_linking(
_elf_data: &[u8],
elf_binary: &ElfBinary,
load_base: u64,
) -> Result<Option<DynamicLinkerInfo>, KernelError>Expand description
Prepare everything needed to run a dynamically linked ELF binary.
This function:
- Checks whether the binary has an interpreter.
- Loads the interpreter (if present) using the ELF loader.
- Builds the auxiliary vector for the dynamic linker.
Returns a DynamicLinkerInfo with all information needed to start the
process. If the binary is statically linked, returns None.
§Arguments
_elf_data- Raw bytes of the ELF file (reserved for future use).elf_binary- Pre-parsed ELF binary metadata.load_base- Base address where the main binary was loaded.