pub fn search_tohost(
        &self,
        progbits_sec_headers: &Vec<&SectionHeader>,
        strtab_sec_headers: &Vec<&SectionHeader>,
    ) -> Option<u64> {
        for i in 0..progbits_sec_headers.len() {
            for j in 0..strtab_sec_headers.len() {
                let offset = (progbits_sec_headers[i].sh_name as u64
                    + strtab_sec_headers[j].sh_offset) as usize;
                match self.read64(offset) {
                    TOHOST => return Some(progbits_sec_headers[i].sh_addr),
                    _ => {}
                }
            }
        }
        None
    }
/// find .tohost section and get address of that.
find .tohost section and get address of that.
find . tohost section and get address of that .
pub fn search_tohost(
        &self,
        progbits_sec_headers: &Vec<&SectionHeader>,
        strtab_sec_headers: &Vec<&SectionHeader>,
    ) -> Option<u64> {
        for i in 0..progbits_sec_headers.len() {
            for j in 0..strtab_sec_headers.len() {
                let offset = (progbits_sec_headers[i].sh_name as u64
                    + strtab_sec_headers[j].sh_offset) as usize;
                match self.read64(offset) {
                    TOHOST => return Some(progbits_sec_headers[i].sh_addr),
                    _ => {}
                }
            }
        }
        None
    }
pub fn search_tohost ( & self , progbits_sec_headers : & Vec < & SectionHeader > , strtab_sec_headers : & Vec < & SectionHeader > , ) -> Option < u64 > { for i in 0 .. progbits_sec_headers . len ( ) { for j in 0 .. strtab_sec_headers . len ( ) { let offset = ( progbits_sec_headers [ i ] . sh_name as u64 + strtab_sec_headers [ j ] . sh_offset ) as usize ; match self . read64 ( offset ) { TOHOST => return Some ( progbits_sec_headers [ i ] . sh_addr ) , _ => { } } } } None }
find .tohost section and get address of that.
find . tohost section and get address of that .
&self
progbits_sec_headers
&Vec<&SectionHeader>
strtab_sec_headers
&Vec<&SectionHeader>