mep.h revision 214571
1214571Sdim/* Toshiba MeP ELF support for BFD. 2214571Sdim Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. 3214571Sdim 4214571Sdim This file is part of BFD, the Binary File Descriptor library. 5214571Sdim 6214571Sdim This program is free software; you can redistribute it and/or modify 7214571Sdim it under the terms of the GNU General Public License as published by 8214571Sdim the Free Software Foundation; either version 2 of the License, or 9214571Sdim (at your option) any later version. 10214571Sdim 11214571Sdim This program is distributed in the hope that it will be useful, 12214571Sdim but WITHOUT ANY WARRANTY; without even the implied warranty of 13214571Sdim MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14214571Sdim GNU General Public License for more details. 15214571Sdim 16214571Sdim You should have received a copy of the GNU General Public License 17214571Sdim along with this program; if not, write to the Free Software Foundation, Inc., 18214571Sdim 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 19214571Sdim 20214571Sdim#ifndef _ELF_MEP_H 21214571Sdim#define _ELF_MEP_H 22214571Sdim 23214571Sdim/* Bits in the sh_flags field of Elf32_Shdr: */ 24214571Sdim 25214571Sdim#define SHF_MEP_VLIW 0x10000000 /* contains vliw code */ 26214571Sdim 27214571Sdim/* This bit is reserved by BFD for processor specific stuff. Name 28214571Sdim it properly so that we can easily stay consistent elsewhere. */ 29214571Sdim#define SEC_MEP_VLIW SEC_TIC54X_BLOCK 30214571Sdim 31214571Sdim#include "elf/reloc-macros.h" 32214571Sdim 33214571Sdim/* Note: The comments in this file are used by bfd/mep-relocs.pl to 34214571Sdim build parts of bfd/elf32-mep.c. */ 35214571Sdim 36214571Sdim/* Relocations. */ 37214571SdimSTART_RELOC_NUMBERS (elf_mep_reloc_type) 38214571Sdim 39214571Sdim /* These two must appear first so that they are not processed by bfd/mep-relocs.pl. */ 40214571Sdim RELOC_NUMBER (R_MEP_NONE, 0) 41214571Sdim RELOC_NUMBER (R_RELC, 1) 42214571Sdim 43214571Sdim RELOC_NUMBER (R_MEP_8, 2) /* 7654 3210 U */ 44214571Sdim RELOC_NUMBER (R_MEP_16, 3) /* fedc ba98 7654 3210 U */ 45214571Sdim RELOC_NUMBER (R_MEP_32, 4) /* vuts rqpo nmlk jihg fedc ba98 7654 3210 U */ 46214571Sdim 47214571Sdim RELOC_NUMBER (R_MEP_PCREL8A2, 5) /* ---- ---- 7654 321- S PC-REL */ 48214571Sdim RELOC_NUMBER (R_MEP_PCREL12A2, 6) /* ---- ba98 7654 321- S PC-REL */ 49214571Sdim RELOC_NUMBER (R_MEP_PCREL17A2, 7) /* ---- ---- ---- ---- gfed cba9 8765 4321 S PC-REL */ 50214571Sdim RELOC_NUMBER (R_MEP_PCREL24A2, 8) /* ---- -765 4321 ---- nmlk jihg fedc ba98 S PC-REL */ 51214571Sdim RELOC_NUMBER (R_MEP_PCABS24A2, 9) /* ---- -765 4321 ---- nmlk jihg fedc ba98 U */ 52214571Sdim 53214571Sdim RELOC_NUMBER (R_MEP_LOW16, 10) /* ---- ---- ---- ---- fedc ba98 7654 3210 U no-overflow */ 54214571Sdim RELOC_NUMBER (R_MEP_HI16U, 11) /* ---- ---- ---- ---- vuts rqpo nmlk jihg U no-overflow */ 55214571Sdim RELOC_NUMBER (R_MEP_HI16S, 12) /* ---- ---- ---- ---- vuts rqpo nmlk jihg S no-overflow */ 56214571Sdim RELOC_NUMBER (R_MEP_GPREL, 13) /* ---- ---- ---- ---- fedc ba98 7654 3210 S GP-REL*/ 57214571Sdim RELOC_NUMBER (R_MEP_TPREL, 14) /* ---- ---- ---- ---- fedc ba98 7654 3210 S TP-REL*/ 58214571Sdim 59214571Sdim RELOC_NUMBER (R_MEP_TPREL7, 15) /* ---- ---- -654 3210 U TP-REL */ 60214571Sdim RELOC_NUMBER (R_MEP_TPREL7A2, 16) /* ---- ---- -654 321- U TP-REL */ 61214571Sdim RELOC_NUMBER (R_MEP_TPREL7A4, 17) /* ---- ---- -654 32-- U TP-REL */ 62214571Sdim 63214571Sdim RELOC_NUMBER (R_MEP_UIMM24, 18) /* ---- ---- 7654 3210 nmlk jihg fedc ba98 U */ 64214571Sdim RELOC_NUMBER (R_MEP_ADDR24A4, 19) /* ---- ---- 7654 32-- nmlk jihg fedc ba98 U */ 65214571Sdim 66214571Sdim RELOC_NUMBER (R_MEP_GNU_VTINHERIT, 20) /* ---- ---- ---- ---- U no-overflow */ 67214571Sdim RELOC_NUMBER (R_MEP_GNU_VTENTRY, 21) /* ---- ---- ---- ---- U no-overflow */ 68214571Sdim 69214571SdimEND_RELOC_NUMBERS(R_MEP_max) 70214571Sdim 71214571Sdim#define EF_MEP_CPU_MASK 0xff000000 /* specific cpu bits */ 72214571Sdim#define EF_MEP_CPU_MEP 0x00000000 /* generic MEP */ 73214571Sdim#define EF_MEP_CPU_C2 0x01000000 /* MEP c2 */ 74214571Sdim#define EF_MEP_CPU_C3 0x02000000 /* MEP c3 */ 75214571Sdim#define EF_MEP_CPU_C4 0x04000000 /* MEP c4 */ 76214571Sdim#define EF_MEP_CPU_H1 0x10000000 /* MEP h1 */ 77214571Sdim 78214571Sdim#define EF_MEP_LIBRARY 0x00000100 /* Built as a library */ 79214571Sdim 80214571Sdim#define EF_MEP_INDEX_MASK 0x000000ff /* Configuration index */ 81214571Sdim 82214571Sdim#define EF_MEP_ALL_FLAGS 0xff0001ff 83214571Sdim 84214571Sdim#endif /* _ELF_MEP_H */ 85