output: Introduce pecoff.h
[nasm/nasm.git] / output / pecoff.h
blob81310f90fa98d5b01ca339663b5d0bd06b48d574
1 /* ----------------------------------------------------------------------- *
3 * Copyright 1996-2010 The NASM Authors - All Rights Reserved
4 * See the file AUTHORS included with the NASM distribution for
5 * the specific copyright holders.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following
9 * conditions are met:
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 * ----------------------------------------------------------------------- */
34 #ifndef PECOFF_H
35 #define PECOFF_H
38 * Machine types
40 #define IMAGE_FILE_MACHINE_UNKNOWN 0x000
41 #define IMAGE_FILE_MACHINE_ALPHA 0x184
42 #define IMAGE_FILE_MACHINE_ARM 0x1c0
43 #define IMAGE_FILE_MACHINE_ALPHA64 0x284
44 #define IMAGE_FILE_MACHINE_I386 0x14c
45 #define IMAGE_FILE_MACHINE_IA64 0x200
46 #define IMAGE_FILE_MACHINE_M68K 0x268
47 #define IMAGE_FILE_MACHINE_MIPS16 0x266
48 #define IMAGE_FILE_MACHINE_MIPSFPU 0x366
49 #define IMAGE_FILE_MACHINE_MIPSFPU16 0x466
50 #define IMAGE_FILE_MACHINE_POWERPC 0x1f0
51 #define IMAGE_FILE_MACHINE_R3000 0x162
52 #define IMAGE_FILE_MACHINE_R4000 0x166
53 #define IMAGE_FILE_MACHINE_R10000 0x168
54 #define IMAGE_FILE_MACHINE_SH3 0x1a2
55 #define IMAGE_FILE_MACHINE_SH4 0x1a6
56 #define IMAGE_FILE_MACHINE_THUMB 0x1c2
57 #define IMAGE_FILE_MACHINE_MASK 0xfff
60 * Section flags
62 #define IMAGE_SCN_TYPE_REG 0x00000000
63 #define IMAGE_SCN_TYPE_DSECT 0x00000001
64 #define IMAGE_SCN_TYPE_NOLOAD 0x00000002
65 #define IMAGE_SCN_TYPE_GROUP 0x00000004
66 #define IMAGE_SCN_TYPE_NO_PAD 0x00000008
67 #define IMAGE_SCN_TYPE_COPY 0x00000010
69 #define IMAGE_SCN_CNT_CODE 0x00000020
70 #define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040
71 #define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080
73 #define IMAGE_SCN_LNK_OTHER 0x00000100
74 #define IMAGE_SCN_LNK_INFO 0x00000200
75 #define IMAGE_SCN_TYPE_OVER 0x00000400
76 #define IMAGE_SCN_LNK_REMOVE 0x00000800
77 #define IMAGE_SCN_LNK_COMDAT 0x00001000
79 #define IMAGE_SCN_MEM_FARDATA 0x00008000
80 #define IMAGE_SCN_MEM_PURGEABLE 0x00020000
81 #define IMAGE_SCN_MEM_16BIT 0x00020000
82 #define IMAGE_SCN_MEM_LOCKED 0x00040000
83 #define IMAGE_SCN_MEM_PRELOAD 0x00080000
85 #define IMAGE_SCN_ALIGN_1BYTES 0x00100000
86 #define IMAGE_SCN_ALIGN_2BYTES 0x00200000
87 #define IMAGE_SCN_ALIGN_4BYTES 0x00300000
88 #define IMAGE_SCN_ALIGN_8BYTES 0x00400000
89 #define IMAGE_SCN_ALIGN_16BYTES 0x00500000
90 #define IMAGE_SCN_ALIGN_32BYTES 0x00600000
91 #define IMAGE_SCN_ALIGN_64BYTES 0x00700000
92 #define IMAGE_SCN_ALIGN_128BYTES 0x00800000
93 #define IMAGE_SCN_ALIGN_256BYTES 0x00900000
94 #define IMAGE_SCN_ALIGN_512BYTES 0x00a00000
95 #define IMAGE_SCN_ALIGN_1024BYTES 0x00b00000
96 #define IMAGE_SCN_ALIGN_2048BYTES 0x00c00000
97 #define IMAGE_SCN_ALIGN_4096BYTES 0x00d00000
98 #define IMAGE_SCN_ALIGN_8192BYTES 0x00e00000
99 #define IMAGE_SCN_ALIGN_MASK 0x00f00000
101 #define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000
102 #define IMAGE_SCN_MEM_DISCARDABLE 0x02000000
103 #define IMAGE_SCN_MEM_NOT_CACHED 0x04000000
104 #define IMAGE_SCN_MEM_NOT_PAGED 0x08000000
105 #define IMAGE_SCN_MEM_SHARED 0x10000000
106 #define IMAGE_SCN_MEM_EXECUTE 0x20000000
107 #define IMAGE_SCN_MEM_READ 0x40000000
108 #define IMAGE_SCN_MEM_WRITE 0x80000000
110 #endif /* PECOFF_H */