178828Sobrien/* coff information for Intel 386/486.
278828Sobrien
378828Sobrien   Copyright 2001 Free Software Foundation, Inc.
433965Sjdp
578828Sobrien   This program is free software; you can redistribute it and/or modify
678828Sobrien   it under the terms of the GNU General Public License as published by
778828Sobrien   the Free Software Foundation; either version 2 of the License, or
878828Sobrien   (at your option) any later version.
978828Sobrien
1078828Sobrien   This program is distributed in the hope that it will be useful,
1178828Sobrien   but WITHOUT ANY WARRANTY; without even the implied warranty of
1278828Sobrien   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1378828Sobrien   GNU General Public License for more details.
1478828Sobrien
1578828Sobrien   You should have received a copy of the GNU General Public License
1678828Sobrien   along with this program; if not, write to the Free Software
17218822Sdim   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
1833965Sjdp
1989857Sobrien#define L_LNNO_SIZE 2
2089857Sobrien#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
2189857Sobrien#include "coff/external.h"
2278828Sobrien
2333965Sjdp/* Bits for f_flags:
2489857Sobrien 	F_RELFLG	relocation info stripped from file
2589857Sobrien 	F_EXEC		file is executable (no unresolved external references)
2689857Sobrien 	F_LNNO		line numbers stripped from file
2789857Sobrien 	F_LSYMS		local symbols stripped from file
2889857Sobrien 	F_AR32WR	file has byte ordering of an AR32WR machine (e.g. vax).  */
2933965Sjdp
3033965Sjdp#define F_RELFLG	(0x0001)
3133965Sjdp#define F_EXEC		(0x0002)
3233965Sjdp#define F_LNNO		(0x0004)
3333965Sjdp#define F_LSYMS		(0x0008)
3433965Sjdp
3533965Sjdp#define	I386MAGIC	0x14c
3633965Sjdp#define I386PTXMAGIC	0x154
3733965Sjdp#define I386AIXMAGIC	0x175
3833965Sjdp
3933965Sjdp/* This is Lynx's all-platform magic number for executables. */
4033965Sjdp
4133965Sjdp#define LYNXCOFFMAGIC	0415
4233965Sjdp
4389857Sobrien#define I386BADMAG(x) (  ((x).f_magic != I386MAGIC) \
4433965Sjdp		       && (x).f_magic != I386AIXMAGIC \
4533965Sjdp		       && (x).f_magic != I386PTXMAGIC \
4633965Sjdp		       && (x).f_magic != LYNXCOFFMAGIC)
4733965Sjdp
4833965Sjdp#define OMAGIC          0404    /* object files, eg as output */
4933965Sjdp#define ZMAGIC          0413    /* demand load format, eg normal ld output */
5033965Sjdp#define STMAGIC		0401	/* target shlib */
5133965Sjdp#define SHMAGIC		0443	/* host   shlib */
5233965Sjdp
5333965Sjdp/* define some NT default values */
5433965Sjdp/*  #define NT_IMAGE_BASE        0x400000 moved to internal.h */
5533965Sjdp#define NT_SECTION_ALIGNMENT 0x1000
5633965Sjdp#define NT_FILE_ALIGNMENT    0x200
5733965Sjdp#define NT_DEF_RESERVE       0x100000
5833965Sjdp#define NT_DEF_COMMIT        0x1000
5933965Sjdp
6089857Sobrien/********************** RELOCATION DIRECTIVES **********************/
6133965Sjdp
6289857Sobrienstruct external_reloc
6333965Sjdp{
6433965Sjdp  char r_vaddr[4];
6533965Sjdp  char r_symndx[4];
6633965Sjdp  char r_type[2];
6733965Sjdp};
6833965Sjdp
6933965Sjdp#define RELOC struct external_reloc
7033965Sjdp#define RELSZ 10
7133965Sjdp
72