PR binutils/11017
[binutils/dougsmingw.git] / include / coff / i386.h
blob798a097eb5acec419c6129746ecb8c44e4fdfd17
1 /* coff information for Intel 386/486.
3 Copyright 2001, 2009 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
19 #define L_LNNO_SIZE 2
20 #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
21 #include "coff/external.h"
23 #define COFF_PAGE_SIZE 0x1000
25 /* Bits for f_flags:
26 F_RELFLG Relocation info stripped from file
27 F_EXEC File is executable (no unresolved external references)
28 F_LNNO Line numbers stripped from file
29 F_LSYMS Local symbols stripped from file
30 F_AR32WR File has byte ordering of an AR32WR machine (e.g. vax). */
32 #define F_RELFLG (0x0001)
33 #define F_EXEC (0x0002)
34 #define F_LNNO (0x0004)
35 #define F_LSYMS (0x0008)
37 #define I386MAGIC 0x14c
38 #define I386PTXMAGIC 0x154
39 #define I386AIXMAGIC 0x175
41 /* This is Lynx's all-platform magic number for executables. */
43 #define LYNXCOFFMAGIC 0415
45 #define I386BADMAG(x) ( ((x).f_magic != I386MAGIC) \
46 && (x).f_magic != I386AIXMAGIC \
47 && (x).f_magic != I386PTXMAGIC \
48 && (x).f_magic != LYNXCOFFMAGIC)
50 #define OMAGIC 0404 /* Object files, eg as output. */
51 #define ZMAGIC 0413 /* Demand load format, eg normal ld output. */
52 #define STMAGIC 0401 /* Target shlib. */
53 #define SHMAGIC 0443 /* Host shlib. */
55 /* Define some NT default values. */
56 /* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
57 #define NT_SECTION_ALIGNMENT 0x1000
58 #define NT_FILE_ALIGNMENT 0x200
59 #define NT_DEF_RESERVE 0x100000
60 #define NT_DEF_COMMIT 0x1000
62 /* Relocation directives. */
64 struct external_reloc
66 char r_vaddr[4];
67 char r_symndx[4];
68 char r_type[2];
71 #define RELOC struct external_reloc
72 #define RELSZ 10