Lines Matching refs:ehdr

54         ehdr: &FileHeader<AnyEndian>,  in probe_x86_64()
57 if ehdr.class != elf::file::Class::ELF64 { in probe_x86_64()
62 if ElfMachine::from(ehdr.e_machine) != ElfMachine::X86_64 { in probe_x86_64()
69 if ElfType::from(ehdr.e_type) != ElfType::Executable { in probe_x86_64()
346 ehdr: &elf::file::FileHeader<AnyEndian>, in create_auxv()
353 .insert(AtType::PhEnt as u8, ehdr.e_phentsize as usize); in create_auxv()
360 .insert(AtType::PhNum as u8, ehdr.e_phnum as usize); in create_auxv()
380 let ehdr: FileHeader<_> = FileHeader::parse_tail(ident, tail_buf)?; in parse_ehdr() localVariable
381 return Ok(ehdr); in parse_ehdr()
398 ehdr: &FileHeader<AnyEndian>, in parse_segments()
402 if ehdr.e_phoff == 0 { in parse_segments()
409 let mut phnum = ehdr.e_phnum as usize; in parse_segments()
411 let shoff: usize = ehdr.e_shoff.try_into()?; in parse_segments()
416 let shdr_buf_size = ehdr.e_shentsize * 2; in parse_segments()
423 ehdr.endianness, in parse_segments()
424 ehdr.class, in parse_segments()
433 ehdr.class, in parse_segments()
434 ehdr.e_phentsize as usize, in parse_segments()
436 let phoff: usize = ehdr.e_phoff.try_into()?; in parse_segments()
456 ehdr.endianness, in parse_segments()
457 ehdr.class, in parse_segments()
468 let ehdr = Self::parse_ehdr(buf).map_err(|_| ExecError::NotExecutable)?; in probe() localVariable
471 return self.probe_x86_64(param, &ehdr); in probe()
483 let ehdr = Self::parse_ehdr(head_buf).map_err(|_| ExecError::NotExecutable)?; in load() localVariable
488 let elf_type = ElfType::from(ehdr.e_type); in load()
501 let loadable_sections = Self::parse_segments(param, &ehdr, &mut phdr_buf) in load()
608 if (seg_to_load.p_offset <= ehdr.e_phoff) in load()
609 && (ehdr.e_phoff < (seg_to_load.p_offset + seg_to_load.p_filesz)) in load()
612 (ehdr.e_phoff - seg_to_load.p_offset + seg_to_load.p_vaddr) as usize, in load()
672 let program_entrypoint = VirtAddr::new(ehdr.e_entry as usize + load_bias); in load()
701 self.create_auxv(param, program_entrypoint, phdr_vaddr, &ehdr)?; in load()