Back to index

cell-binutils  2.17cvs20070401
ia64.h
Go to the documentation of this file.
00001 /* coff information for HP/Intel IA-64.
00002    
00003    Copyright 2000 Free Software Foundation, Inc.
00004 
00005    This program is free software; you can redistribute it and/or modify
00006    it under the terms of the GNU General Public License as published by
00007    the Free Software Foundation; either version 2 of the License, or
00008    (at your option) any later version.
00009    
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014    
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software
00017    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00018 
00019 #define DO_NOT_DEFINE_AOUTHDR
00020 #define L_LNNO_SIZE 2
00021 #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
00022 #include "coff/external.h"
00023 
00024 #define IA64MAGIC    0x200
00025 
00026 #define IA64BADMAG(x)       (((x).f_magic != IA64MAGIC))
00027 
00028 /* Bits for f_flags:
00029  *     F_RELFLG      relocation info stripped from file
00030  *     F_EXEC        file is executable (no unresolved external references)
00031  *     F_LNNO        line numbers stripped from file
00032  *     F_LSYMS              local symbols stripped from file
00033  *     F_AR32WR      file has byte ordering of an AR32WR machine (e.g. vax)
00034  */
00035 
00036 #define F_RELFLG     (0x0001)
00037 #define F_EXEC              (0x0002)
00038 #define F_LNNO              (0x0004)
00039 #define F_LSYMS             (0x0008)
00040 
00041 /********************** AOUT "OPTIONAL HEADER" **********************/
00042 typedef struct 
00043 {
00044   char        magic[2];            /* type of file                           */
00045   char vstamp[2];           /* version stamp                   */
00046   char tsize[4];            /* text size in bytes, padded to FW bdry*/
00047   char dsize[4];            /* initialized data "  "           */
00048   char bsize[4];            /* uninitialized data "   "        */
00049   char entry[4];            /* entry pt.                       */
00050   char        text_start[4];              /* base of text used for this file */
00051 #ifndef BFD64
00052   char        data_start[4];              /* base of data used for this file */
00053 #endif
00054 }
00055 AOUTHDR;
00056 
00057 #define PE32MAGIC    0x10b  /* 32-bit image */
00058 #define PE32PMAGIC   0x20b  /* 32-bit image inside 64-bit address space */
00059 
00060 #define PE32PBADMAG(x) (((x).f_magic != PE32PMAGIC))
00061 
00062 #define AOUTSZ              108
00063 #define AOUTHDRSZ    108
00064 
00065 #define OMAGIC          0404    /* object files, eg as output */
00066 #define ZMAGIC          0413    /* demand load format, eg normal ld output */
00067 #define STMAGIC             0401   /* target shlib */
00068 #define SHMAGIC             0443   /* host   shlib */
00069 
00070 /* define some NT default values */
00071 /*  #define NT_IMAGE_BASE        0x400000 moved to internal.h */
00072 #define NT_SECTION_ALIGNMENT 0x1000
00073 #define NT_FILE_ALIGNMENT    0x200
00074 #define NT_DEF_RESERVE       0x100000
00075 #define NT_DEF_COMMIT        0x1000
00076 
00077 /********************** RELOCATION DIRECTIVES **********************/
00078 
00079 struct external_reloc
00080 {
00081   char r_vaddr[4];
00082   char r_symndx[4];
00083   char r_type[2];
00084 };
00085 
00086 #define RELOC struct external_reloc
00087 #define RELSZ 10
00088