fn read_stack_size(cli: &Cli) -> String {
    let file = elf::File::open_path(&cli.elf).expect("Unable to open ELF");
    for section in file.sections {
        // This section name comes from runtime/libtock_layout.ld, and it
        // matches the size (and location) of the process binary's stack.
        if section.shdr.name == ".stack" {
            let stack_size = section.shdr.size.to_string();
            if cli.verbose {
                println!("Found .stack section, size: {}", stack_size);
            }
            return stack_size;
        }
    }

    panic!("Unable to find the .stack section in {}", cli.elf.display());
}
// Reads the stack size, and returns it as a String for use on elf2tab's command
// line.
Reads the stack size, and returns it as a String for use on elf2tab's command
line.
Reads the stack size and returns it as a String for use on elf2tab ' s command line .
fn read_stack_size(cli: &Cli) -> String {
    let file = elf::File::open_path(&cli.elf).expect("Unable to open ELF");
    for section in file.sections {
        // This section name comes from runtime/libtock_layout.ld, and it
        // matches the size (and location) of the process binary's stack.
        if section.shdr.name == ".stack" {
            let stack_size = section.shdr.size.to_string();
            if cli.verbose {
                println!("Found .stack section, size: {}", stack_size);
            }
            return stack_size;
        }
    }
    panic!("Unable to find the .stack section in {}", cli.elf.display());
}
fn read_stack_size ( cli : & Cli ) -> String { let file = elf :: File :: open_path ( & cli . elf ) . expect ( " " ) ; for section in file . sections { // This section name comes from runtime/libtock_layout.ld, and it // matches the size (and location) of the process binary's stack. if section . shdr . name == " " { let stack_size = section . shdr . size . to_string ( ) ; if cli . verbose { println ! ( " " stack_size ) ; } return stack_size ; } } panic ! ( " " cli elf display ( ) ) ; }
Reads the stack size, and returns it as a String for use on elf2tab's command
line.
Reads the stack size and returns it as a String for use on elf2tab ' s command line .
cli
&Cli
cli
&Cli