1 //===--- COFFModuleDefinition.h ---------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 // A parser for the module-definition file (.def file).
12 // Parsed results are directly written to Config global variable.
14 // The format of module-definition files are described in this document:
15 // https://msdn.microsoft.com/en-us/library/28d6s79h.aspx
17 //===----------------------------------------------------------------------===//
20 #ifndef LLVM_OBJECT_COFF_MODULE_DEFINITION_H
21 #define LLVM_OBJECT_COFF_MODULE_DEFINITION_H
23 #include "llvm/Object/COFFImportFile.h"
24 #include "llvm/Object/COFF.h"
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;
43 Expected<COFFModuleDefinition>
44 parseCOFFModuleDefinition(MemoryBufferRef MB, COFF::MachineTypes Machine);
46 } // End namespace object.
47 } // End namespace llvm.