Lines Matching full:coff
1 //===- COFFYAML.cpp - COFF YAMLIO implementation --------------------------===//
10 // This file defines classes for handling the YAML representation of COFF.
16 #define ECase(X) IO.enumCase(Value, #X, COFF::X);
20 Section::Section() { memset(&Header, 0, sizeof(COFF::section)); } in Section()
21 Symbol::Symbol() { memset(&Header, 0, sizeof(COFF::symbol)); } in Symbol()
22 Object::Object() { memset(&Header, 0, sizeof(COFF::header)); } in Object()
52 void ScalarEnumerationTraits<COFF::MachineTypes>::enumeration( in enumeration()
53 IO &IO, COFF::MachineTypes &Value) { in enumeration()
78 void ScalarEnumerationTraits<COFF::SymbolBaseType>::enumeration( in enumeration()
79 IO &IO, COFF::SymbolBaseType &Value) { in enumeration()
98 void ScalarEnumerationTraits<COFF::SymbolStorageClass>::enumeration( in enumeration()
99 IO &IO, COFF::SymbolStorageClass &Value) { in enumeration()
129 void ScalarEnumerationTraits<COFF::SymbolComplexType>::enumeration( in enumeration()
130 IO &IO, COFF::SymbolComplexType &Value) { in enumeration()
137 void ScalarEnumerationTraits<COFF::RelocationTypeI386>::enumeration( in enumeration()
138 IO &IO, COFF::RelocationTypeI386 &Value) { in enumeration()
152 void ScalarEnumerationTraits<COFF::RelocationTypeAMD64>::enumeration( in enumeration()
153 IO &IO, COFF::RelocationTypeAMD64 &Value) { in enumeration()
173 void ScalarEnumerationTraits<COFF::WindowsSubsystem>::enumeration( in enumeration()
174 IO &IO, COFF::WindowsSubsystem &Value) { in enumeration()
192 #define BCase(X) IO.bitSetCase(Value, #X, COFF::X);
193 void ScalarBitSetTraits<COFF::Characteristics>::bitset( in bitset()
194 IO &IO, COFF::Characteristics &Value) { in bitset()
212 void ScalarBitSetTraits<COFF::SectionCharacteristics>::bitset( in bitset()
213 IO &IO, COFF::SectionCharacteristics &Value) { in bitset()
238 void ScalarBitSetTraits<COFF::DLLCharacteristics>::bitset( in bitset()
239 IO &IO, COFF::DLLCharacteristics &Value) { in bitset()
275 : Characteristics(COFF::SectionCharacteristics(0)) {} in NSectionCharacteristics()
277 : Characteristics(COFF::SectionCharacteristics(C)) {} in NSectionCharacteristics()
279 COFF::SectionCharacteristics Characteristics;
292 NStorageClass(IO &) : StorageClass(COFF::SymbolStorageClass(0)) {} in NStorageClass()
293 NStorageClass(IO &, uint8_t S) : StorageClass(COFF::SymbolStorageClass(S)) {} in NStorageClass()
296 COFF::SymbolStorageClass StorageClass;
300 NMachine(IO &) : Machine(COFF::MachineTypes(0)) {} in NMachine()
301 NMachine(IO &, uint16_t M) : Machine(COFF::MachineTypes(M)) {} in NMachine()
303 COFF::MachineTypes Machine;
307 NHeaderCharacteristics(IO &) : Characteristics(COFF::Characteristics(0)) {} in NHeaderCharacteristics()
309 : Characteristics(COFF::Characteristics(C)) {} in NHeaderCharacteristics()
312 COFF::Characteristics Characteristics;
324 NWindowsSubsystem(IO &) : Subsystem(COFF::WindowsSubsystem(0)) {} in NWindowsSubsystem()
325 NWindowsSubsystem(IO &, uint16_t C) : Subsystem(COFF::WindowsSubsystem(C)) {} in NWindowsSubsystem()
328 COFF::WindowsSubsystem Subsystem;
332 NDLLCharacteristics(IO &) : Characteristics(COFF::DLLCharacteristics(0)) {} in NDLLCharacteristics()
334 : Characteristics(COFF::DLLCharacteristics(C)) {} in NDLLCharacteristics()
337 COFF::DLLCharacteristics Characteristics;
347 COFF::header &H = *static_cast<COFF::header *>(IO.getContext()); in mapping()
348 if (H.Machine == COFF::IMAGE_FILE_MACHINE_I386) { in mapping()
349 MappingNormalization<NType<COFF::RelocationTypeI386>, uint16_t> NT( in mapping()
352 } else if (H.Machine == COFF::IMAGE_FILE_MACHINE_AMD64) { in mapping()
353 MappingNormalization<NType<COFF::RelocationTypeAMD64>, uint16_t> NT( in mapping()
361 void MappingTraits<COFF::DataDirectory>::mapping(IO &IO, in mapping()
362 COFF::DataDirectory &DD) { in mapping()
393 IO.mapOptional("ExportTable", PH.DataDirectories[COFF::EXPORT_TABLE]); in mapping()
394 IO.mapOptional("ImportTable", PH.DataDirectories[COFF::IMPORT_TABLE]); in mapping()
395 IO.mapOptional("ResourceTable", PH.DataDirectories[COFF::RESOURCE_TABLE]); in mapping()
396 IO.mapOptional("ExceptionTable", PH.DataDirectories[COFF::EXCEPTION_TABLE]); in mapping()
397 IO.mapOptional("CertificateTable", PH.DataDirectories[COFF::CERTIFICATE_TABLE]); in mapping()
399 PH.DataDirectories[COFF::BASE_RELOCATION_TABLE]); in mapping()
400 IO.mapOptional("Debug", PH.DataDirectories[COFF::DEBUG_DIRECTORY]); in mapping()
401 IO.mapOptional("Architecture", PH.DataDirectories[COFF::ARCHITECTURE]); in mapping()
402 IO.mapOptional("GlobalPtr", PH.DataDirectories[COFF::GLOBAL_PTR]); in mapping()
403 IO.mapOptional("TlsTable", PH.DataDirectories[COFF::TLS_TABLE]); in mapping()
405 PH.DataDirectories[COFF::LOAD_CONFIG_TABLE]); in mapping()
406 IO.mapOptional("BoundImport", PH.DataDirectories[COFF::BOUND_IMPORT]); in mapping()
407 IO.mapOptional("IAT", PH.DataDirectories[COFF::IAT]); in mapping()
409 PH.DataDirectories[COFF::DELAY_IMPORT_DESCRIPTOR]); in mapping()
411 PH.DataDirectories[COFF::CLR_RUNTIME_HEADER]); in mapping()
414 void MappingTraits<COFF::header>::mapping(IO &IO, COFF::header &H) { in mapping()
424 void MappingTraits<COFF::AuxiliaryFunctionDefinition>::mapping( in mapping()
425 IO &IO, COFF::AuxiliaryFunctionDefinition &AFD) { in mapping()
432 void MappingTraits<COFF::AuxiliarybfAndefSymbol>::mapping( in mapping()
433 IO &IO, COFF::AuxiliarybfAndefSymbol &AAS) { in mapping()
438 void MappingTraits<COFF::AuxiliaryWeakExternal>::mapping( in mapping()
439 IO &IO, COFF::AuxiliaryWeakExternal &AWE) { in mapping()
446 void MappingTraits<COFF::AuxiliarySectionDefinition>::mapping( in mapping()
447 IO &IO, COFF::AuxiliarySectionDefinition &ASD) { in mapping()
459 void MappingTraits<COFF::AuxiliaryCLRToken>::mapping( in mapping()
460 IO &IO, COFF::AuxiliaryCLRToken &ACT) { in mapping()
496 IO.mapTag("!COFF", true); in mapping()