pub fn new(
        elf_linker: &ElfLinker,
        base_path: Option<PathBuf>,
        constants: &'static Constants,
    ) -> Result<Linux> {
        // We need to find the address after the "data" segment to start the
        // program break... really just the highest address we can find
        let backing = elf_linker.memory()?;

        let mut address: u64 = 0;

        for (section_address, section) in backing.sections() {
            let high = section_address + section.len() as u64;
            if high > address {
                address = high;
            }
        }

        trace!("brk set to 0x{:x}", address);

        Ok(Linux {
            brk_base: address,
            brk_address: address,
            constants,
            file_system: FileSystem::new(base_path)?,
            mmap_address: MMAP_BASE,
        })
    }
/// Create a new basic model of the Linux Operating System.
Create a new basic model of the Linux Operating System.
Create a new basic model of the Linux Operating System .
pub fn new(
        elf_linker: &ElfLinker,
        base_path: Option<PathBuf>,
        constants: &'static Constants,
    ) -> Result<Linux> {
        // We need to find the address after the "data" segment to start the
        // program break... really just the highest address we can find
        let backing = elf_linker.memory()?;
        let mut address: u64 = 0;
        for (section_address, section) in backing.sections() {
            let high = section_address + section.len() as u64;
            if high > address {
                address = high;
            }
        }
        trace!("brk set to 0x{:x}", address);
        Ok(Linux {
            brk_base: address,
            brk_address: address,
            constants,
            file_system: FileSystem::new(base_path)?,
            mmap_address: MMAP_BASE,
        })
    }
pub fn new ( elf_linker : & ElfLinker , base_path : Option < PathBuf > , constants : & ' static Constants , ) -> Result < Linux > { // We need to find the address after the "data" segment to start the // program break... really just the highest address we can find let backing = elf_linker . memory ( ) ? ; let mut address : u64 = 0 ; for ( section_address , section ) in backing . sections ( ) { let high = section_address + section . len ( ) as u64 ; if high > address { address = high ; } } trace ! ( " " address ) ; Ok ( Linux { brk_base : address , brk_address : address , constants , file_system : FileSystem :: new ( base_path ) ? , mmap_address : MMAP_BASE , } ) }
Create a new basic model of the Linux Operating System.
Create a new basic model of the Linux Operating System .
elf_linker
&ElfLinker
base_path
Option<PathBuf>
constants
&'static Constants