Home | History | Annotate | Download | only in coff
      1 /* coff information for HP/Intel IA-64.
      2 
      3    Copyright (C) 2000-2016 Free Software Foundation, Inc.
      4 
      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 3 of the License, or
      8    (at your option) any later version.
      9 
     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.
     14 
     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,
     18    MA 02110-1301, USA.  */
     19 
     20 #define DO_NOT_DEFINE_AOUTHDR
     21 #define L_LNNO_SIZE 2
     22 #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
     23 #include "coff/external.h"
     24 
     25 #define IA64MAGIC	0x200
     26 
     27 #define IA64BADMAG(x)	(((x).f_magic != IA64MAGIC))
     28 
     29 /* Bits for f_flags:
     30  *	F_RELFLG	relocation info stripped from file
     31  *	F_EXEC		file is executable (no unresolved external references)
     32  *	F_LNNO		line numbers stripped from file
     33  *	F_LSYMS		local symbols stripped from file
     34  *	F_AR32WR	file has byte ordering of an AR32WR machine (e.g. vax)
     35  */
     36 
     37 #define F_RELFLG	(0x0001)
     38 #define F_EXEC		(0x0002)
     39 #define F_LNNO		(0x0004)
     40 #define F_LSYMS		(0x0008)
     41 
     42 /********************** AOUT "OPTIONAL HEADER" **********************/
     43 typedef struct
     44 {
     45   char 	magic[2];		/* type of file				*/
     46   char	vstamp[2];		/* version stamp			*/
     47   char	tsize[4];		/* text size in bytes, padded to FW bdry*/
     48   char	dsize[4];		/* initialized data "  "		*/
     49   char	bsize[4];		/* uninitialized data "   "		*/
     50   char	entry[4];		/* entry pt.				*/
     51   char 	text_start[4];		/* base of text used for this file	*/
     52 #ifndef BFD64
     53   char 	data_start[4];		/* base of data used for this file	*/
     54 #endif
     55 }
     56 AOUTHDR;
     57 
     58 #define PE32MAGIC	0x10b	/* 32-bit image */
     59 #define PE32PMAGIC	0x20b	/* 32-bit image inside 64-bit address space */
     60 
     61 #define PE32PBADMAG(x) (((x).f_magic != PE32PMAGIC))
     62 
     63 #define AOUTSZ		108
     64 #define AOUTHDRSZ	108
     65 
     66 #define OMAGIC          0404    /* object files, eg as output */
     67 #define ZMAGIC          0413    /* demand load format, eg normal ld output */
     68 #define STMAGIC		0401	/* target shlib */
     69 #define SHMAGIC		0443	/* host   shlib */
     70 
     71 /* define some NT default values */
     72 /*  #define NT_IMAGE_BASE        0x400000 moved to internal.h */
     73 #define NT_SECTION_ALIGNMENT 0x1000
     74 #define NT_FILE_ALIGNMENT    0x200
     75 #define NT_DEF_RESERVE       0x100000
     76 #define NT_DEF_COMMIT        0x1000
     77 
     78 /********************** RELOCATION DIRECTIVES **********************/
     79 
     80 struct external_reloc
     81 {
     82   char r_vaddr[4];
     83   char r_symndx[4];
     84   char r_type[2];
     85 };
     86 
     87 #define RELOC struct external_reloc
     88 #define RELSZ 10
     89 
     90