1 //===--- COFFModuleDefinition.h ---------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // Windows-specific. 11 // A parser for the module-definition file (.def file). 12 // Parsed results are directly written to Config global variable. 13 // 14 // The format of module-definition files are described in this document: 15 // https://msdn.microsoft.com/en-us/library/28d6s79h.aspx 16 // 17 //===----------------------------------------------------------------------===// 18 19 20 #ifndef LLVM_OBJECT_COFF_MODULE_DEFINITION_H 21 #define LLVM_OBJECT_COFF_MODULE_DEFINITION_H 22 23 #include "llvm/Object/COFF.h" 24 #include "llvm/Object/COFFImportFile.h" 25 26 namespace llvm { 27 namespace object { 28 29 struct COFFModuleDefinition { 30 std::vector<COFFShortExport> Exports; 31 std::string OutputFile; 32 uint64_t ImageBase = 0; 33 uint64_t StackReserve = 0; 34 uint64_t StackCommit = 0; 35 uint64_t HeapReserve = 0; 36 uint64_t HeapCommit = 0; 37 uint32_t MajorImageVersion = 0; 38 uint32_t MinorImageVersion = 0; 39 uint32_t MajorOSVersion = 0; 40 uint32_t MinorOSVersion = 0; 41 }; 42 43 Expected<COFFModuleDefinition> 44 parseCOFFModuleDefinition(MemoryBufferRef MB, COFF::MachineTypes Machine); 45 46 } // End namespace object. 47 } // End namespace llvm. 48 49 #endif 50