Back to index

cell-binutils  2.17cvs20070401
i386.h
Go to the documentation of this file.
00001 /* coff information for Intel 386/486.
00002    
00003    Copyright 2001 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 L_LNNO_SIZE 2
00020 #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
00021 #include "coff/external.h"
00022 
00023 /* Bits for f_flags:
00024        F_RELFLG      relocation info stripped from file
00025        F_EXEC        file is executable (no unresolved external references)
00026        F_LNNO        line numbers stripped from file
00027        F_LSYMS              local symbols stripped from file
00028        F_AR32WR      file has byte ordering of an AR32WR machine (e.g. vax).  */
00029 
00030 #define F_RELFLG     (0x0001)
00031 #define F_EXEC              (0x0002)
00032 #define F_LNNO              (0x0004)
00033 #define F_LSYMS             (0x0008)
00034 
00035 #define       I386MAGIC     0x14c
00036 #define I386PTXMAGIC 0x154
00037 #define I386AIXMAGIC 0x175
00038 
00039 /* This is Lynx's all-platform magic number for executables. */
00040 
00041 #define LYNXCOFFMAGIC       0415
00042 
00043 #define I386BADMAG(x) (  ((x).f_magic != I386MAGIC) \
00044                      && (x).f_magic != I386AIXMAGIC \
00045                      && (x).f_magic != I386PTXMAGIC \
00046                      && (x).f_magic != LYNXCOFFMAGIC)
00047 
00048 #define OMAGIC          0404    /* object files, eg as output */
00049 #define ZMAGIC          0413    /* demand load format, eg normal ld output */
00050 #define STMAGIC             0401   /* target shlib */
00051 #define SHMAGIC             0443   /* host   shlib */
00052 
00053 /* define some NT default values */
00054 /*  #define NT_IMAGE_BASE        0x400000 moved to internal.h */
00055 #define NT_SECTION_ALIGNMENT 0x1000
00056 #define NT_FILE_ALIGNMENT    0x200
00057 #define NT_DEF_RESERVE       0x100000
00058 #define NT_DEF_COMMIT        0x1000
00059 
00060 /********************** RELOCATION DIRECTIVES **********************/
00061 
00062 struct external_reloc
00063 {
00064   char r_vaddr[4];
00065   char r_symndx[4];
00066   char r_type[2];
00067 };
00068 
00069 #define RELOC struct external_reloc
00070 #define RELSZ 10
00071