Back to index

cell-binutils  2.17cvs20070401
i860.h
Go to the documentation of this file.
00001 /* COFF information for the Intel i860.
00002    
00003    Copyright 2001, 2003 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 /* This file was hacked from i386.h   [dolan@ssd.intel.com] */
00020 
00021 #define L_LNNO_SIZE 2
00022 #include "coff/external.h"
00023 
00024 /* Bits for f_flags:
00025        F_RELFLG      relocation info stripped from file
00026        F_EXEC        file is executable (no unresolved external references)
00027        F_LNNO        line numbers stripped from file
00028        F_LSYMS              local symbols stripped from file
00029        F_AR32WR      file has byte ordering of an AR32WR machine (e.g. vax).  */
00030 
00031 #define F_RELFLG     (0x0001)
00032 #define F_EXEC              (0x0002)
00033 #define F_LNNO              (0x0004)
00034 #define F_LSYMS             (0x0008)
00035 
00036 #define       I860MAGIC     0x14d
00037 
00038 #define I860BADMAG(x)   ((x).f_magic != I860MAGIC)
00039 
00040 #undef AOUTSZ
00041 #define AOUTSZ 36
00042 
00043 /* FIXME: What are the a.out magic numbers?  */
00044 
00045 #define _ETEXT       "etext"
00046 
00047 /********************** RELOCATION DIRECTIVES **********************/
00048 
00049 struct external_reloc
00050 {
00051   char r_vaddr[4];
00052   char r_symndx[4];
00053   char r_type[2];
00054 };
00055 
00056 #define RELOC struct external_reloc
00057 #define RELSZ 10
00058 
00059 /* The relocation directory entry types.
00060      PAIR   : The low half that follows relates to the preceeding HIGH[ADJ].
00061      HIGH   : The high half of a 32-bit constant.
00062      LOWn   : The low half, insn bits 15..(n-1), 2^n-byte aligned. 
00063      SPLITn : The low half, insn bits 20..16 and 10..(n-1), 2^n-byte aligned. 
00064      HIGHADJ: Similar to HIGH, but with adjustment.
00065      BRADDR : 26-bit branch displacement.
00066 
00067    Note: The Intel assembler manual lists LOW4 as one of the
00068    relocation types, but it appears to be useless for the i860.
00069    We will recognize it anyway, just in case it actually appears in
00070    any object files.  */
00071 
00072 enum {
00073   COFF860_R_PAIR     = 0x1c,
00074   COFF860_R_HIGH     = 0x1e,
00075   COFF860_R_LOW0     = 0x1f,
00076   COFF860_R_LOW1     = 0x20,
00077   COFF860_R_LOW2     = 0x21,
00078   COFF860_R_LOW3     = 0x22,
00079   COFF860_R_LOW4     = 0x23,
00080   COFF860_R_SPLIT0   = 0x24,
00081   COFF860_R_SPLIT1   = 0x25,
00082   COFF860_R_SPLIT2   = 0x26,
00083   COFF860_R_HIGHADJ  = 0x27,
00084   COFF860_R_BRADDR   = 0x28
00085 };
00086