Back to index

cell-binutils  2.17cvs20070401
mep.h
Go to the documentation of this file.
00001 /* Toshiba MeP ELF support for BFD.
00002    Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc.
00003 
00004    This file is part of BFD, the Binary File Descriptor library.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software Foundation, Inc.,
00018    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00019 
00020 #ifndef _ELF_MEP_H
00021 #define _ELF_MEP_H
00022 
00023 /* Bits in the sh_flags field of Elf32_Shdr:  */
00024 
00025 #define SHF_MEP_VLIW        0x10000000    /* contains vliw code */
00026 
00027 /* This bit is reserved by BFD for processor specific stuff.  Name
00028    it properly so that we can easily stay consistent elsewhere.  */
00029 #define SEC_MEP_VLIW        SEC_TIC54X_BLOCK
00030 
00031 #include "elf/reloc-macros.h"
00032 
00033 /* Note: The comments in this file are used by bfd/mep-relocs.pl to
00034    build parts of bfd/elf32-mep.c.  */
00035 
00036 /* Relocations.  */
00037 START_RELOC_NUMBERS (elf_mep_reloc_type)
00038 
00039   /* These two must appear first so that they are not processed by bfd/mep-relocs.pl.  */
00040   RELOC_NUMBER (R_MEP_NONE, 0)
00041   RELOC_NUMBER (R_RELC, 1)
00042 
00043   RELOC_NUMBER (R_MEP_8, 2)        /* 7654 3210                               U */
00044   RELOC_NUMBER (R_MEP_16, 3)              /* fedc ba98 7654 3210                     U */
00045   RELOC_NUMBER (R_MEP_32, 4)              /* vuts rqpo nmlk jihg fedc ba98 7654 3210 U */
00046 
00047   RELOC_NUMBER (R_MEP_PCREL8A2, 5) /* ---- ---- 7654 321-                     S PC-REL */
00048   RELOC_NUMBER (R_MEP_PCREL12A2, 6)       /* ---- ba98 7654 321-                     S PC-REL */
00049   RELOC_NUMBER (R_MEP_PCREL17A2, 7)       /* ---- ---- ---- ---- gfed cba9 8765 4321 S PC-REL */
00050   RELOC_NUMBER (R_MEP_PCREL24A2, 8)       /* ---- -765 4321 ---- nmlk jihg fedc ba98 S PC-REL */
00051   RELOC_NUMBER (R_MEP_PCABS24A2, 9)       /* ---- -765 4321 ---- nmlk jihg fedc ba98 U */
00052 
00053   RELOC_NUMBER (R_MEP_LOW16, 10)   /* ---- ---- ---- ---- fedc ba98 7654 3210 U no-overflow */
00054   RELOC_NUMBER (R_MEP_HI16U, 11)   /* ---- ---- ---- ---- vuts rqpo nmlk jihg U no-overflow */
00055   RELOC_NUMBER (R_MEP_HI16S, 12)   /* ---- ---- ---- ---- vuts rqpo nmlk jihg S no-overflow */
00056   RELOC_NUMBER (R_MEP_GPREL, 13)   /* ---- ---- ---- ---- fedc ba98 7654 3210 S GP-REL*/
00057   RELOC_NUMBER (R_MEP_TPREL, 14)   /* ---- ---- ---- ---- fedc ba98 7654 3210 S TP-REL*/
00058 
00059   RELOC_NUMBER (R_MEP_TPREL7, 15)  /* ---- ---- -654 3210                     U TP-REL */
00060   RELOC_NUMBER (R_MEP_TPREL7A2, 16)       /* ---- ---- -654 321-                     U TP-REL */
00061   RELOC_NUMBER (R_MEP_TPREL7A4, 17)       /* ---- ---- -654 32--                     U TP-REL */
00062 
00063   RELOC_NUMBER (R_MEP_UIMM24, 18)  /* ---- ---- 7654 3210 nmlk jihg fedc ba98 U */
00064   RELOC_NUMBER (R_MEP_ADDR24A4, 19)       /* ---- ---- 7654 32-- nmlk jihg fedc ba98 U */
00065 
00066   RELOC_NUMBER (R_MEP_GNU_VTINHERIT, 20) /* ---- ---- ---- ----                     U no-overflow */
00067   RELOC_NUMBER (R_MEP_GNU_VTENTRY, 21)   /* ---- ---- ---- ----                     U no-overflow */
00068 
00069 END_RELOC_NUMBERS(R_MEP_max)
00070 
00071 #define       EF_MEP_CPU_MASK             0xff000000    /* specific cpu bits */
00072 #define EF_MEP_CPU_MEP          0x00000000       /* generic MEP */
00073 #define EF_MEP_CPU_C2       0x01000000    /* MEP c2 */
00074 #define EF_MEP_CPU_C3       0x02000000    /* MEP c3 */
00075 #define EF_MEP_CPU_C4       0x04000000    /* MEP c4 */
00076 #define EF_MEP_CPU_H1       0x10000000    /* MEP h1 */
00077 
00078 #define EF_MEP_LIBRARY             0x00000100    /* Built as a library */
00079 
00080 #define EF_MEP_INDEX_MASK       0x000000ff      /* Configuration index */
00081 
00082 #define EF_MEP_ALL_FLAGS    0xff0001ff
00083 
00084 #endif /* _ELF_MEP_H */