Lines Matching refs:Header
103 COFF::section Header;
125 COFF::header Header;
139 memset(&Header, 0, sizeof(Header));
140 Header.Machine = TargetObjectWriter->getMachine();
169 void WriteFileHeader(const COFF::header &Header);
223 memset(&Header, 0, sizeof(Header));
232 memset(&Header, 0, sizeof(Header));
234 Header.Machine = TargetObjectWriter->getMachine();
288 coff_section->Header.Characteristics = Sec.getCharacteristics();
290 uint32_t &Characteristics = coff_section->Header.Characteristics;
471 std::memcpy(S.Header.Name, Buffer.data(), Buffer.size());
474 encodeBase64StringEntry(S.Header.Name, StringTableEntry);
479 std::memcpy(S.Header.Name, S.Name.c_str(), S.Name.size());
491 return (S->Header.Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA) ==
498 void WinCOFFObjectWriter::WriteFileHeader(const COFF::header &Header) {
503 writeLE16(Header.Machine);
504 writeLE32(Header.TimeDateStamp);
510 writeLE32(Header.NumberOfSections);
511 writeLE32(Header.PointerToSymbolTable);
512 writeLE32(Header.NumberOfSymbols);
514 writeLE16(Header.Machine);
515 writeLE16(static_cast<int16_t>(Header.NumberOfSections));
516 writeLE32(Header.TimeDateStamp);
517 Header.PointerToSymbolTable);
518 writeLE32(Header.NumberOfSymbols);
519 writeLE16(Header.SizeOfOptionalHeader);
520 writeLE16(Header.Characteristics);
751 if ((Header.Machine == COFF::IMAGE_FILE_MACHINE_AMD64 &&
753 (Header.Machine == COFF::IMAGE_FILE_MACHINE_I386 &&
757 if (Header.Machine == COFF::IMAGE_FILE_MACHINE_ARMNT) {
824 Header.NumberOfSections = NumberOfSections;
825 Header.NumberOfSymbols = 0;
859 Symbol->setIndex(Header.NumberOfSymbols++);
862 Header.NumberOfSymbols += Symbol->Data.NumberOfAuxSymbols;
924 offset += COFF::SectionSize * Header.NumberOfSections;
932 Sec->Header.SizeOfRawData = Layout.getSectionAddressSize(&Section);
937 Sec->Header.PointerToRawData = offset;
939 offset += Sec->Header.SizeOfRawData;
948 Sec->Header.NumberOfRelocations = 0xffff;
950 Sec->Header.NumberOfRelocations = Sec->Relocations.size();
952 Sec->Header.PointerToRelocations = offset;
972 Aux.Aux.SectionDefinition.Length = Sec->Header.SizeOfRawData;
974 Sec->Header.NumberOfRelocations;
976 Sec->Header.NumberOfLineNumbers;
979 Header
987 Header.TimeDateStamp = Now;
990 Header.TimeDateStamp = 0;
994 WriteFileHeader(Header);
1003 Section->Header.Characteristics |= COFF::IMAGE_SCN_LNK_NRELOC_OVFL;
1004 writeSectionHeader(Section->Header);
1016 if ((*i)->Header.PointerToRawData != 0) {
1017 assert(getStream().tell() <= (*i)->Header.PointerToRawData &&
1021 (*i)->Header.PointerToRawData - getStream().tell();
1057 assert(getStream().tell() == (*i)->Header.PointerToRelocations &&
1073 assert((*i)->Header.PointerToRelocations == 0 &&
1078 assert(getStream().tell() == Header.PointerToSymbolTable &&
1079 "Header::PointerToSymbolTable is insane!");