Lines Matching refs:Ehdr
1423 const typename ELFT::Ehdr &Ehdr = HeadersFile.getHeader(); in readProgramHeaders() local
1431 PrHdr.OriginalOffset = PrHdr.Offset = PrHdr.VAddr = EhdrOffset + Ehdr.e_phoff; in readProgramHeaders()
1433 PrHdr.FileSize = PrHdr.MemSize = Ehdr.e_phentsize * Ehdr.e_phnum; in readProgramHeaders()
1857 const typename ELFFile<ELFT>::Elf_Ehdr &Ehdr = HeadersFile->getHeader(); in build() local
1858 Obj.OSABI = Ehdr.e_ident[EI_OSABI]; in build()
1859 Obj.ABIVersion = Ehdr.e_ident[EI_ABIVERSION]; in build()
1860 Obj.Type = Ehdr.e_type; in build()
1861 Obj.Machine = Ehdr.e_machine; in build()
1862 Obj.Version = Ehdr.e_version; in build()
1863 Obj.Entry = Ehdr.e_entry; in build()
1864 Obj.Flags = Ehdr.e_flags; in build()
1942 Elf_Ehdr &Ehdr = *reinterpret_cast<Elf_Ehdr *>(Buf->getBufferStart()); in writeEhdr() local
1943 std::fill(Ehdr.e_ident, Ehdr.e_ident + 16, 0); in writeEhdr()
1944 Ehdr.e_ident[EI_MAG0] = 0x7f; in writeEhdr()
1945 Ehdr.e_ident[EI_MAG1] = 'E'; in writeEhdr()
1946 Ehdr.e_ident[EI_MAG2] = 'L'; in writeEhdr()
1947 Ehdr.e_ident[EI_MAG3] = 'F'; in writeEhdr()
1948 Ehdr.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32; in writeEhdr()
1949 Ehdr.e_ident[EI_DATA] = in writeEhdr()
1951 Ehdr.e_ident[EI_VERSION] = EV_CURRENT; in writeEhdr()
1952 Ehdr.e_ident[EI_OSABI] = Obj.OSABI; in writeEhdr()
1953 Ehdr.e_ident[EI_ABIVERSION] = Obj.ABIVersion; in writeEhdr()
1955 Ehdr.e_type = Obj.Type; in writeEhdr()
1956 Ehdr.e_machine = Obj.Machine; in writeEhdr()
1957 Ehdr.e_version = Obj.Version; in writeEhdr()
1958 Ehdr.e_entry = Obj.Entry; in writeEhdr()
1961 Ehdr.e_phnum = llvm::size(Obj.segments()); in writeEhdr()
1962 Ehdr.e_phoff = (Ehdr.e_phnum != 0) ? Obj.ProgramHdrSegment.Offset : 0; in writeEhdr()
1963 Ehdr.e_phentsize = (Ehdr.e_phnum != 0) ? sizeof(Elf_Phdr) : 0; in writeEhdr()
1964 Ehdr.e_flags = Obj.Flags; in writeEhdr()
1965 Ehdr.e_ehsize = sizeof(Elf_Ehdr); in writeEhdr()
1967 Ehdr.e_shentsize = sizeof(Elf_Shdr); in writeEhdr()
1968 Ehdr.e_shoff = Obj.SHOff; in writeEhdr()
1977 Ehdr.e_shnum = 0; in writeEhdr()
1979 Ehdr.e_shnum = Shnum; in writeEhdr()
1987 Ehdr.e_shstrndx = SHN_XINDEX; in writeEhdr()
1989 Ehdr.e_shstrndx = Obj.SectionNames->Index; in writeEhdr()
1991 Ehdr.e_shentsize = 0; in writeEhdr()
1992 Ehdr.e_shoff = 0; in writeEhdr()
1993 Ehdr.e_shnum = 0; in writeEhdr()
1994 Ehdr.e_shstrndx = 0; in writeEhdr()