Lines Matching refs:Ehdr

1491   const typename ELFT::Ehdr &Ehdr = HeadersFile.getHeader();  in readProgramHeaders()  local
1499 PrHdr.OriginalOffset = PrHdr.Offset = PrHdr.VAddr = EhdrOffset + Ehdr.e_phoff; in readProgramHeaders()
1501 PrHdr.FileSize = PrHdr.MemSize = Ehdr.e_phentsize * Ehdr.e_phnum; in readProgramHeaders()
1937 const typename ELFFile<ELFT>::Elf_Ehdr &Ehdr = HeadersFile->getHeader(); in build() local
1938 Obj.Is64Bits = Ehdr.e_ident[EI_CLASS] == ELFCLASS64; in build()
1939 Obj.OSABI = Ehdr.e_ident[EI_OSABI]; in build()
1940 Obj.ABIVersion = Ehdr.e_ident[EI_ABIVERSION]; in build()
1941 Obj.Type = Ehdr.e_type; in build()
1942 Obj.Machine = Ehdr.e_machine; in build()
1943 Obj.Version = Ehdr.e_version; in build()
1944 Obj.Entry = Ehdr.e_entry; in build()
1945 Obj.Flags = Ehdr.e_flags; in build()
2023 Elf_Ehdr &Ehdr = *reinterpret_cast<Elf_Ehdr *>(Buf->getBufferStart()); in writeEhdr() local
2024 std::fill(Ehdr.e_ident, Ehdr.e_ident + 16, 0); in writeEhdr()
2025 Ehdr.e_ident[EI_MAG0] = 0x7f; in writeEhdr()
2026 Ehdr.e_ident[EI_MAG1] = 'E'; in writeEhdr()
2027 Ehdr.e_ident[EI_MAG2] = 'L'; in writeEhdr()
2028 Ehdr.e_ident[EI_MAG3] = 'F'; in writeEhdr()
2029 Ehdr.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32; in writeEhdr()
2030 Ehdr.e_ident[EI_DATA] = in writeEhdr()
2032 Ehdr.e_ident[EI_VERSION] = EV_CURRENT; in writeEhdr()
2033 Ehdr.e_ident[EI_OSABI] = Obj.OSABI; in writeEhdr()
2034 Ehdr.e_ident[EI_ABIVERSION] = Obj.ABIVersion; in writeEhdr()
2036 Ehdr.e_type = Obj.Type; in writeEhdr()
2037 Ehdr.e_machine = Obj.Machine; in writeEhdr()
2038 Ehdr.e_version = Obj.Version; in writeEhdr()
2039 Ehdr.e_entry = Obj.Entry; in writeEhdr()
2042 Ehdr.e_phnum = llvm::size(Obj.segments()); in writeEhdr()
2043 Ehdr.e_phoff = (Ehdr.e_phnum != 0) ? Obj.ProgramHdrSegment.Offset : 0; in writeEhdr()
2044 Ehdr.e_phentsize = (Ehdr.e_phnum != 0) ? sizeof(Elf_Phdr) : 0; in writeEhdr()
2045 Ehdr.e_flags = Obj.Flags; in writeEhdr()
2046 Ehdr.e_ehsize = sizeof(Elf_Ehdr); in writeEhdr()
2048 Ehdr.e_shentsize = sizeof(Elf_Shdr); in writeEhdr()
2049 Ehdr.e_shoff = Obj.SHOff; in writeEhdr()
2058 Ehdr.e_shnum = 0; in writeEhdr()
2060 Ehdr.e_shnum = Shnum; in writeEhdr()
2068 Ehdr.e_shstrndx = SHN_XINDEX; in writeEhdr()
2070 Ehdr.e_shstrndx = Obj.SectionNames->Index; in writeEhdr()
2072 Ehdr.e_shentsize = 0; in writeEhdr()
2073 Ehdr.e_shoff = 0; in writeEhdr()
2074 Ehdr.e_shnum = 0; in writeEhdr()
2075 Ehdr.e_shstrndx = 0; in writeEhdr()