Lines Matching refs:Ehdr
1460 const typename ELFT::Ehdr &Ehdr = HeadersFile.getHeader(); in readProgramHeaders() local
1468 PrHdr.OriginalOffset = PrHdr.Offset = PrHdr.VAddr = EhdrOffset + Ehdr.e_phoff; in readProgramHeaders()
1470 PrHdr.FileSize = PrHdr.MemSize = Ehdr.e_phentsize * Ehdr.e_phnum; in readProgramHeaders()
1902 const typename ELFFile<ELFT>::Elf_Ehdr &Ehdr = HeadersFile->getHeader(); in build() local
1903 Obj.OSABI = Ehdr.e_ident[EI_OSABI]; in build()
1904 Obj.ABIVersion = Ehdr.e_ident[EI_ABIVERSION]; in build()
1905 Obj.Type = Ehdr.e_type; in build()
1906 Obj.Machine = Ehdr.e_machine; in build()
1907 Obj.Version = Ehdr.e_version; in build()
1908 Obj.Entry = Ehdr.e_entry; in build()
1909 Obj.Flags = Ehdr.e_flags; in build()
1987 Elf_Ehdr &Ehdr = *reinterpret_cast<Elf_Ehdr *>(Buf->getBufferStart()); in writeEhdr() local
1988 std::fill(Ehdr.e_ident, Ehdr.e_ident + 16, 0); in writeEhdr()
1989 Ehdr.e_ident[EI_MAG0] = 0x7f; in writeEhdr()
1990 Ehdr.e_ident[EI_MAG1] = 'E'; in writeEhdr()
1991 Ehdr.e_ident[EI_MAG2] = 'L'; in writeEhdr()
1992 Ehdr.e_ident[EI_MAG3] = 'F'; in writeEhdr()
1993 Ehdr.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32; in writeEhdr()
1994 Ehdr.e_ident[EI_DATA] = in writeEhdr()
1996 Ehdr.e_ident[EI_VERSION] = EV_CURRENT; in writeEhdr()
1997 Ehdr.e_ident[EI_OSABI] = Obj.OSABI; in writeEhdr()
1998 Ehdr.e_ident[EI_ABIVERSION] = Obj.ABIVersion; in writeEhdr()
2000 Ehdr.e_type = Obj.Type; in writeEhdr()
2001 Ehdr.e_machine = Obj.Machine; in writeEhdr()
2002 Ehdr.e_version = Obj.Version; in writeEhdr()
2003 Ehdr.e_entry = Obj.Entry; in writeEhdr()
2006 Ehdr.e_phnum = llvm::size(Obj.segments()); in writeEhdr()
2007 Ehdr.e_phoff = (Ehdr.e_phnum != 0) ? Obj.ProgramHdrSegment.Offset : 0; in writeEhdr()
2008 Ehdr.e_phentsize = (Ehdr.e_phnum != 0) ? sizeof(Elf_Phdr) : 0; in writeEhdr()
2009 Ehdr.e_flags = Obj.Flags; in writeEhdr()
2010 Ehdr.e_ehsize = sizeof(Elf_Ehdr); in writeEhdr()
2012 Ehdr.e_shentsize = sizeof(Elf_Shdr); in writeEhdr()
2013 Ehdr.e_shoff = Obj.SHOff; in writeEhdr()
2022 Ehdr.e_shnum = 0; in writeEhdr()
2024 Ehdr.e_shnum = Shnum; in writeEhdr()
2032 Ehdr.e_shstrndx = SHN_XINDEX; in writeEhdr()
2034 Ehdr.e_shstrndx = Obj.SectionNames->Index; in writeEhdr()
2036 Ehdr.e_shentsize = 0; in writeEhdr()
2037 Ehdr.e_shoff = 0; in writeEhdr()
2038 Ehdr.e_shnum = 0; in writeEhdr()
2039 Ehdr.e_shstrndx = 0; in writeEhdr()