Back to index

cell-binutils  2.17cvs20070401
frv.h
Go to the documentation of this file.
00001 /* FRV ELF support for BFD.
00002    Copyright (C) 2002, 2003, 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 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00019 
00020 #ifndef _ELF_FRV_H
00021 #define _ELF_FRV_H
00022 
00023 #include "elf/reloc-macros.h"
00024 
00025 /* Relocations.  */
00026 START_RELOC_NUMBERS (elf_frv_reloc_type)
00027   RELOC_NUMBER (R_FRV_NONE, 0)
00028   RELOC_NUMBER (R_FRV_32, 1)
00029   RELOC_NUMBER (R_FRV_LABEL16, 2)
00030   RELOC_NUMBER (R_FRV_LABEL24, 3)
00031   RELOC_NUMBER (R_FRV_LO16, 4)
00032   RELOC_NUMBER (R_FRV_HI16, 5)
00033   RELOC_NUMBER (R_FRV_GPREL12, 6)
00034   RELOC_NUMBER (R_FRV_GPRELU12, 7)
00035   RELOC_NUMBER (R_FRV_GPREL32, 8)
00036   RELOC_NUMBER (R_FRV_GPRELHI, 9)
00037   RELOC_NUMBER (R_FRV_GPRELLO, 10)
00038   RELOC_NUMBER (R_FRV_GOT12, 11)
00039   RELOC_NUMBER (R_FRV_GOTHI, 12)
00040   RELOC_NUMBER (R_FRV_GOTLO, 13)
00041   RELOC_NUMBER (R_FRV_FUNCDESC, 14)
00042   RELOC_NUMBER (R_FRV_FUNCDESC_GOT12, 15)
00043   RELOC_NUMBER (R_FRV_FUNCDESC_GOTHI, 16)
00044   RELOC_NUMBER (R_FRV_FUNCDESC_GOTLO, 17)
00045   RELOC_NUMBER (R_FRV_FUNCDESC_VALUE, 18)
00046   RELOC_NUMBER (R_FRV_FUNCDESC_GOTOFF12, 19)
00047   RELOC_NUMBER (R_FRV_FUNCDESC_GOTOFFHI, 20)
00048   RELOC_NUMBER (R_FRV_FUNCDESC_GOTOFFLO, 21)
00049   RELOC_NUMBER (R_FRV_GOTOFF12, 22)
00050   RELOC_NUMBER (R_FRV_GOTOFFHI, 23)
00051   RELOC_NUMBER (R_FRV_GOTOFFLO, 24)
00052   RELOC_NUMBER (R_FRV_GETTLSOFF, 25)
00053   RELOC_NUMBER (R_FRV_TLSDESC_VALUE, 26)
00054   RELOC_NUMBER (R_FRV_GOTTLSDESC12, 27)
00055   RELOC_NUMBER (R_FRV_GOTTLSDESCHI, 28)
00056   RELOC_NUMBER (R_FRV_GOTTLSDESCLO, 29)
00057   RELOC_NUMBER (R_FRV_TLSMOFF12, 30)
00058   RELOC_NUMBER (R_FRV_TLSMOFFHI, 31)
00059   RELOC_NUMBER (R_FRV_TLSMOFFLO, 32)
00060   RELOC_NUMBER (R_FRV_GOTTLSOFF12, 33)
00061   RELOC_NUMBER (R_FRV_GOTTLSOFFHI, 34)
00062   RELOC_NUMBER (R_FRV_GOTTLSOFFLO, 35)
00063   RELOC_NUMBER (R_FRV_TLSOFF, 36)
00064   RELOC_NUMBER (R_FRV_TLSDESC_RELAX, 37)
00065   RELOC_NUMBER (R_FRV_GETTLSOFF_RELAX, 38)
00066   RELOC_NUMBER (R_FRV_TLSOFF_RELAX, 39)
00067   RELOC_NUMBER (R_FRV_TLSMOFF, 40)
00068   RELOC_NUMBER (R_FRV_GNU_VTINHERIT, 200)
00069   RELOC_NUMBER (R_FRV_GNU_VTENTRY, 201)
00070 END_RELOC_NUMBERS(R_FRV_max)
00071 
00072 /* Processor specific flags for the ELF header e_flags field.  */
00073                                           /* gpr support */
00074 #define EF_FRV_GPR_MASK            0x00000003    /* mask for # of gprs */
00075 #define EF_FRV_GPR_32              0x00000001    /* -mgpr-32 */
00076 #define EF_FRV_GPR_64              0x00000002    /* -mgpr-64 */
00077 
00078                                           /* fpr support */
00079 #define EF_FRV_FPR_MASK            0x0000000c    /* mask for # of fprs */
00080 #define EF_FRV_FPR_32              0x00000004    /* -mfpr-32 */
00081 #define EF_FRV_FPR_64              0x00000008    /* -mfpr-64 */
00082 #define EF_FRV_FPR_NONE            0x0000000c    /* -msoft-float */
00083 
00084                                           /* double word support */
00085 #define EF_FRV_DWORD_MASK   0x00000030    /* mask for dword support */
00086 #define EF_FRV_DWORD_YES    0x00000010    /* use double word insns */
00087 #define EF_FRV_DWORD_NO            0x00000020    /* don't use double word insn*/
00088 
00089 #define EF_FRV_DOUBLE              0x00000040    /* -mdouble */
00090 #define EF_FRV_MEDIA        0x00000080    /* -mmedia */
00091 
00092 #define EF_FRV_PIC          0x00000100    /* -fpic */
00093 #define EF_FRV_NON_PIC_RELOCS      0x00000200    /* used non pic safe relocs */
00094 
00095 #define EF_FRV_MULADD              0x00000400    /* -mmuladd */
00096 #define EF_FRV_BIGPIC              0x00000800    /* -fPIC */
00097 #define       EF_FRV_LIBPIC        0x00001000    /* -mlibrary-pic */
00098 #define EF_FRV_G0           0x00002000    /* -G 0, no small data ptr */
00099 #define EF_FRV_NOPACK              0x00004000    /* -mnopack */
00100 #define EF_FRV_FDPIC        0x00008000      /* -mfdpic */
00101 
00102 #define       EF_FRV_CPU_MASK             0xff000000    /* specific cpu bits */
00103 #define EF_FRV_CPU_GENERIC  0x00000000    /* generic FRV */
00104 #define EF_FRV_CPU_FR500    0x01000000    /* FRV500 */
00105 #define EF_FRV_CPU_FR300    0x02000000    /* FRV300 */
00106 #define EF_FRV_CPU_SIMPLE   0x03000000    /* SIMPLE */
00107 #define EF_FRV_CPU_TOMCAT   0x04000000    /* Tomcat, FR500 prototype */
00108 #define EF_FRV_CPU_FR400    0x05000000    /* FRV400 */
00109 #define EF_FRV_CPU_FR550    0x06000000    /* FRV550 */
00110 #define EF_FRV_CPU_FR405    0x07000000
00111 #define EF_FRV_CPU_FR450    0x08000000
00112 
00113                                           /* Mask of PIC related bits */
00114 #define       EF_FRV_PIC_FLAGS     (EF_FRV_PIC | EF_FRV_LIBPIC | EF_FRV_BIGPIC \
00115                              | EF_FRV_FDPIC)
00116 
00117                                           /* Mask of all flags */
00118 #define EF_FRV_ALL_FLAGS    (EF_FRV_GPR_MASK | \
00119                              EF_FRV_FPR_MASK | \
00120                              EF_FRV_DWORD_MASK | \
00121                              EF_FRV_DOUBLE | \
00122                              EF_FRV_MEDIA | \
00123                              EF_FRV_PIC_FLAGS | \
00124                              EF_FRV_NON_PIC_RELOCS | \
00125                              EF_FRV_MULADD | \
00126                              EF_FRV_G0 | \
00127                              EF_FRV_NOPACK | \
00128                              EF_FRV_CPU_MASK)
00129 
00130 #endif /* _ELF_FRV_H */