184865Sobrien/* coff information for HP/Intel IA-64.
284865Sobrien
3218822Sdim   Copyright 2000 Free Software Foundation, Inc.
484865Sobrien
584865Sobrien   This program is free software; you can redistribute it and/or modify
684865Sobrien   it under the terms of the GNU General Public License as published by
784865Sobrien   the Free Software Foundation; either version 2 of the License, or
884865Sobrien   (at your option) any later version.
984865Sobrien
1084865Sobrien   This program is distributed in the hope that it will be useful,
1184865Sobrien   but WITHOUT ANY WARRANTY; without even the implied warranty of
1284865Sobrien   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1384865Sobrien   GNU General Public License for more details.
1484865Sobrien
1584865Sobrien   You should have received a copy of the GNU General Public License
1684865Sobrien   along with this program; if not, write to the Free Software
17218822Sdim   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
1884865Sobrien
1989857Sobrien#define DO_NOT_DEFINE_AOUTHDR
2089857Sobrien#define L_LNNO_SIZE 2
2189857Sobrien#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
2289857Sobrien#include "coff/external.h"
2384865Sobrien
2484865Sobrien#define IA64MAGIC	0x200
2584865Sobrien
2684865Sobrien#define IA64BADMAG(x)	(((x).f_magic != IA64MAGIC))
2784865Sobrien
2884865Sobrien/* Bits for f_flags:
2984865Sobrien *	F_RELFLG	relocation info stripped from file
3084865Sobrien *	F_EXEC		file is executable (no unresolved external references)
3184865Sobrien *	F_LNNO		line numbers stripped from file
3284865Sobrien *	F_LSYMS		local symbols stripped from file
3384865Sobrien *	F_AR32WR	file has byte ordering of an AR32WR machine (e.g. vax)
3484865Sobrien */
3584865Sobrien
3684865Sobrien#define F_RELFLG	(0x0001)
3784865Sobrien#define F_EXEC		(0x0002)
3884865Sobrien#define F_LNNO		(0x0004)
3984865Sobrien#define F_LSYMS		(0x0008)
4084865Sobrien
4184865Sobrien/********************** AOUT "OPTIONAL HEADER" **********************/
4284865Sobrientypedef struct
4384865Sobrien{
4484865Sobrien  char 	magic[2];		/* type of file				*/
4584865Sobrien  char	vstamp[2];		/* version stamp			*/
4684865Sobrien  char	tsize[4];		/* text size in bytes, padded to FW bdry*/
4784865Sobrien  char	dsize[4];		/* initialized data "  "		*/
4884865Sobrien  char	bsize[4];		/* uninitialized data "   "		*/
4984865Sobrien  char	entry[4];		/* entry pt.				*/
5084865Sobrien  char 	text_start[4];		/* base of text used for this file	*/
5184865Sobrien#ifndef BFD64
5284865Sobrien  char 	data_start[4];		/* base of data used for this file	*/
5384865Sobrien#endif
5484865Sobrien}
5584865SobrienAOUTHDR;
5684865Sobrien
5784865Sobrien#define PE32MAGIC	0x10b	/* 32-bit image */
5884865Sobrien#define PE32PMAGIC	0x20b	/* 32-bit image inside 64-bit address space */
5984865Sobrien
6084865Sobrien#define PE32PBADMAG(x) (((x).f_magic != PE32PMAGIC))
6184865Sobrien
6284865Sobrien#define AOUTSZ		108
6384865Sobrien#define AOUTHDRSZ	108
6484865Sobrien
6584865Sobrien#define OMAGIC          0404    /* object files, eg as output */
6684865Sobrien#define ZMAGIC          0413    /* demand load format, eg normal ld output */
6784865Sobrien#define STMAGIC		0401	/* target shlib */
6884865Sobrien#define SHMAGIC		0443	/* host   shlib */
6984865Sobrien
7084865Sobrien/* define some NT default values */
7184865Sobrien/*  #define NT_IMAGE_BASE        0x400000 moved to internal.h */
7284865Sobrien#define NT_SECTION_ALIGNMENT 0x1000
7384865Sobrien#define NT_FILE_ALIGNMENT    0x200
7484865Sobrien#define NT_DEF_RESERVE       0x100000
7584865Sobrien#define NT_DEF_COMMIT        0x1000
7684865Sobrien
7789857Sobrien/********************** RELOCATION DIRECTIVES **********************/
7884865Sobrien
7989857Sobrienstruct external_reloc
8084865Sobrien{
8184865Sobrien  char r_vaddr[4];
8284865Sobrien  char r_symndx[4];
8384865Sobrien  char r_type[2];
8484865Sobrien};
8584865Sobrien
8684865Sobrien#define RELOC struct external_reloc
8784865Sobrien#define RELSZ 10
8884865Sobrien
89