Lines Matching refs:Header
120 void initELFHeader(Elf_Ehdr &Header);
145 // - section header string table (.shstrtab) (placed last)
159 void ELFState<ELFT>::initELFHeader(Elf_Ehdr &Header) {
161 zero(Header);
162 Header.e_ident[EI_MAG0] = 0x7f;
163 Header.e_ident[EI_MAG1] = 'E';
164 Header.e_ident[EI_MAG2] = 'L';
165 Header.e_ident[EI_MAG3] = 'F';
166 Header.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32;
168 Header.e_ident[EI_DATA] = IsLittleEndian ? ELFDATA2LSB : ELFDATA2MSB;
169 Header.e_ident[EI_VERSION] = EV_CURRENT;
170 Header.e_ident[EI_OSABI] = Doc.Header.OSABI;
171 Header.e_ident[EI_ABIVERSION] = 0;
172 Header.e_type = Doc.Header.Type;
173 Header.e_machine = Doc.Header.Machine;
174 Header.e_version = EV_CURRENT;
175 Header.e_entry = Doc.Header.Entry;
176 Header.e_flags = Doc.Header.Flags;
177 Header.e_ehsize = sizeof(Elf_Ehdr);
178 Header.e_shentsize = sizeof(Elf_Shdr);
179 // Immediately following the ELF header.
180 Header.e_shoff = sizeof(Header);
181 Header.e_shnum = getSectionCount();
182 Header.e_shstrndx = getDotShStrTabSecNo();
188 // Ensure SHN_UNDEF entry is present. An all-zero section header is a
357 return Doc.Header.Machine == ELFYAML::ELF_EM(llvm::ELF::EM_MIPS) &&
358 Doc.Header.Class == ELFYAML::ELF_ELFCLASS(ELF::ELFCLASS64) &&
359 Doc.Header.Data == ELFYAML::ELF_ELFDATA(ELF::ELFDATA2LSB);
508 Elf_Ehdr Header;
509 State.initELFHeader(Header);
511 // TODO: Flesh out section header support.
517 Header.e_ehsize + Header.e_shentsize * Header.e_shnum;
535 // .strtab string table header.
541 // .shstrtab string table header.
547 OS.write((const char *)&Header, sizeof(Header));
554 return Doc.Header.Class == ELFYAML::ELF_ELFCLASS(ELF::ELFCLASS64);
558 return Doc.Header.Data == ELFYAML::ELF_ELFDATA(ELF::ELFDATA2LSB);