Lines Matching refs:COFF
46 typedef SmallString<COFF::NameSize> name;
58 COFF::Auxiliary Aux;
66 COFF::symbol Data;
92 COFF::relocation Data;
96 static size_t size() { return COFF::RelocationSize; } in size()
103 COFF::section Header;
125 COFF::header Header;
169 void WriteFileHeader(const COFF::header &Header);
172 void writeSectionHeader(const COFF::section &S);
173 void WriteRelocation(const COFF::relocation &R);
269 if (Sec.getSelection() != COFF::IMAGE_COMDAT_SELECT_ASSOCIATIVE) { in defineSection()
280 coff_symbol->Data.StorageClass = COFF::IMAGE_SYM_CLASS_STATIC; in defineSection()
293 Characteristics |= COFF::IMAGE_SCN_ALIGN_1BYTES; in defineSection()
296 Characteristics |= COFF::IMAGE_SCN_ALIGN_2BYTES; in defineSection()
299 Characteristics |= COFF::IMAGE_SCN_ALIGN_4BYTES; in defineSection()
302 Characteristics |= COFF::IMAGE_SCN_ALIGN_8BYTES; in defineSection()
305 Characteristics |= COFF::IMAGE_SCN_ALIGN_16BYTES; in defineSection()
308 Characteristics |= COFF::IMAGE_SCN_ALIGN_32BYTES; in defineSection()
311 Characteristics |= COFF::IMAGE_SCN_ALIGN_64BYTES; in defineSection()
314 Characteristics |= COFF::IMAGE_SCN_ALIGN_128BYTES; in defineSection()
317 Characteristics |= COFF::IMAGE_SCN_ALIGN_256BYTES; in defineSection()
320 Characteristics |= COFF::IMAGE_SCN_ALIGN_512BYTES; in defineSection()
323 Characteristics |= COFF::IMAGE_SCN_ALIGN_1024BYTES; in defineSection()
326 Characteristics |= COFF::IMAGE_SCN_ALIGN_2048BYTES; in defineSection()
329 Characteristics |= COFF::IMAGE_SCN_ALIGN_4096BYTES; in defineSection()
332 Characteristics |= COFF::IMAGE_SCN_ALIGN_8192BYTES; in defineSection()
386 coff_symbol->Data.StorageClass = COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL; in DefineSymbol()
393 WeakDefault->Data.SectionNumber = COFF::IMAGE_SYM_ABSOLUTE; in DefineSymbol()
407 COFF::IMAGE_WEAK_EXTERN_SEARCH_LIBRARY; in DefineSymbol()
410 coff_symbol->Data.SectionNumber = COFF::IMAGE_SYM_ABSOLUTE; in DefineSymbol()
424 if (Local->Data.StorageClass == COFF::IMAGE_SYM_CLASS_NULL) { in DefineSymbol()
428 Local->Data.StorageClass = IsExternal ? COFF::IMAGE_SYM_CLASS_EXTERNAL in DefineSymbol()
429 : COFF::IMAGE_SYM_CLASS_STATIC; in DefineSymbol()
463 if (S.Name.size() > COFF::NameSize) { in SetSectionName()
467 SmallVector<char, COFF::NameSize> Buffer; in SetSectionName()
469 assert(Buffer.size() <= COFF::NameSize && Buffer.size() >= 2); in SetSectionName()
484 if (S.Name.size() > COFF::NameSize) in SetSymbolName()
491 return (S->Header.Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA) == in IsPhysicalSection()
498 void WinCOFFObjectWriter::WriteFileHeader(const COFF::header &Header) { in WriteFileHeader()
500 writeLE16(COFF::IMAGE_FILE_MACHINE_UNKNOWN); in WriteFileHeader()
502 writeLE16(COFF::BigObjHeader::MinBigObjectVersion); in WriteFileHeader()
505 writeBytes(StringRef(COFF::BigObjMagic, sizeof(COFF::BigObjMagic))); in WriteFileHeader()
525 writeBytes(StringRef(S.Data.Name, COFF::NameSize)); in WriteSymbol()
548 WriteZeros(COFF::Symbol32Size - COFF::Symbol16Size); in WriteAuxiliarySymbols()
557 WriteZeros(COFF::Symbol32Size - COFF::Symbol16Size); in WriteAuxiliarySymbols()
564 WriteZeros(COFF::Symbol32Size - COFF::Symbol16Size); in WriteAuxiliarySymbols()
569 UseBigObj ? COFF::Symbol32Size : COFF::Symbol16Size)); in WriteAuxiliarySymbols()
581 WriteZeros(COFF::Symbol32Size - COFF::Symbol16Size); in WriteAuxiliarySymbols()
587 void WinCOFFObjectWriter::writeSectionHeader(const COFF::section &S) { in writeSectionHeader()
588 writeBytes(StringRef(S.Name, COFF::NameSize)); in writeSectionHeader()
601 void WinCOFFObjectWriter::WriteRelocation(const COFF::relocation &R) { in WriteRelocation()
630 (Type >> COFF::SCT_COMPLEX_TYPE_SHIFT) == COFF::IMAGE_SYM_DTYPE_FUNCTION) in isSymbolRefDifferenceFullyResolvedImpl()
751 if ((Header.Machine == COFF::IMAGE_FILE_MACHINE_AMD64 && in recordRelocation()
752 Reloc.Data.Type == COFF::IMAGE_REL_AMD64_REL32) || in recordRelocation()
753 (Header.Machine == COFF::IMAGE_FILE_MACHINE_I386 && in recordRelocation()
754 Reloc.Data.Type == COFF::IMAGE_REL_I386_REL32)) in recordRelocation()
757 if (Header.Machine == COFF::IMAGE_FILE_MACHINE_ARMNT) { in recordRelocation()
759 case COFF::IMAGE_REL_ARM_ABSOLUTE: in recordRelocation()
760 case COFF::IMAGE_REL_ARM_ADDR32: in recordRelocation()
761 case COFF::IMAGE_REL_ARM_ADDR32NB: in recordRelocation()
762 case COFF::IMAGE_REL_ARM_TOKEN: in recordRelocation()
763 case COFF::IMAGE_REL_ARM_SECTION: in recordRelocation()
764 case COFF::IMAGE_REL_ARM_SECREL: in recordRelocation()
766 case COFF::IMAGE_REL_ARM_BRANCH11: in recordRelocation()
767 case COFF::IMAGE_REL_ARM_BLX11: in recordRelocation()
771 case COFF::IMAGE_REL_ARM_BRANCH24: in recordRelocation()
772 case COFF::IMAGE_REL_ARM_BLX24: in recordRelocation()
773 case COFF::IMAGE_REL_ARM_MOV32A: in recordRelocation()
781 case COFF::IMAGE_REL_ARM_MOV32T: in recordRelocation()
783 case COFF::IMAGE_REL_ARM_BRANCH20T: in recordRelocation()
784 case COFF::IMAGE_REL_ARM_BRANCH24T: in recordRelocation()
785 case COFF::IMAGE_REL_ARM_BLX23T: in recordRelocation()
813 UseBigObj = NumberOfSections > COFF::MaxNumberOfSections16; in writeObject()
829 unsigned SymbolSize = UseBigObj ? COFF::Symbol32Size : COFF::Symbol16Size; in writeObject()
833 file->Data.SectionNumber = COFF::IMAGE_SYM_DEBUG; in writeObject()
834 file->Data.StorageClass = COFF::IMAGE_SYM_CLASS_FILE; in writeObject()
867 if (S->Name.size() > COFF::NameSize) in writeObject()
870 if (S->Name.size() > COFF::NameSize) in writeObject()
894 COFF::IMAGE_COMDAT_SELECT_ASSOCIATIVE) in writeObject()
921 offset += COFF::Header32Size; in writeObject()
923 offset += COFF::Header16Size; in writeObject()
924 offset += COFF::SectionSize * Header.NumberOfSections; in writeObject()
956 offset += COFF::RelocationSize; in writeObject()
959 offset += COFF::RelocationSize * Sec->Relocations.size(); in writeObject()
1003 Section->Header.Characteristics |= COFF::IMAGE_SCN_LNK_NRELOC_OVFL; in writeObject()
1063 COFF::relocation r; in writeObject()