frv.h revision 104834
1104834Sobrien/* FRV ELF support for BFD. 2104834Sobrien Copyright (C) 2002 Free Software Foundation, Inc. 3104834Sobrien 4104834SobrienThis file is part of BFD, the Binary File Descriptor library. 5104834Sobrien 6104834SobrienThis program is free software; you can redistribute it and/or modify 7104834Sobrienit under the terms of the GNU General Public License as published by 8104834Sobrienthe Free Software Foundation; either version 2 of the License, or 9104834Sobrien(at your option) any later version. 10104834Sobrien 11104834SobrienThis program is distributed in the hope that it will be useful, 12104834Sobrienbut WITHOUT ANY WARRANTY; without even the implied warranty of 13104834SobrienMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14104834SobrienGNU General Public License for more details. 15104834Sobrien 16104834SobrienYou should have received a copy of the GNU General Public License 17104834Sobrienalong with this program; if not, write to the Free Software Foundation, Inc., 18104834Sobrien59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 19104834Sobrien 20104834Sobrien#ifndef _ELF_FRV_H 21104834Sobrien#define _ELF_FRV_H 22104834Sobrien 23104834Sobrien#include "elf/reloc-macros.h" 24104834Sobrien 25104834Sobrien/* Relocations. */ 26104834SobrienSTART_RELOC_NUMBERS (elf_frv_reloc_type) 27104834Sobrien RELOC_NUMBER (R_FRV_NONE, 0) 28104834Sobrien RELOC_NUMBER (R_FRV_32, 1) 29104834Sobrien RELOC_NUMBER (R_FRV_LABEL16, 2) 30104834Sobrien RELOC_NUMBER (R_FRV_LABEL24, 3) 31104834Sobrien RELOC_NUMBER (R_FRV_LO16, 4) 32104834Sobrien RELOC_NUMBER (R_FRV_HI16, 5) 33104834Sobrien RELOC_NUMBER (R_FRV_GPREL12, 6) 34104834Sobrien RELOC_NUMBER (R_FRV_GPRELU12, 7) 35104834Sobrien RELOC_NUMBER (R_FRV_GPREL32, 8) 36104834Sobrien RELOC_NUMBER (R_FRV_GPRELHI, 9) 37104834Sobrien RELOC_NUMBER (R_FRV_GPRELLO, 10) 38104834Sobrien RELOC_NUMBER (R_FRV_GNU_VTINHERIT, 200) 39104834Sobrien RELOC_NUMBER (R_FRV_GNU_VTENTRY, 201) 40104834SobrienEND_RELOC_NUMBERS(R_FRV_max) 41104834Sobrien 42104834Sobrien/* Processor specific flags for the ELF header e_flags field. */ 43104834Sobrien /* gpr support */ 44104834Sobrien#define EF_FRV_GPR_MASK 0x00000003 /* mask for # of gprs */ 45104834Sobrien#define EF_FRV_GPR_32 0x00000001 /* -mgpr-32 */ 46104834Sobrien#define EF_FRV_GPR_64 0x00000002 /* -mgpr-64 */ 47104834Sobrien 48104834Sobrien /* fpr support */ 49104834Sobrien#define EF_FRV_FPR_MASK 0x0000000c /* mask for # of fprs */ 50104834Sobrien#define EF_FRV_FPR_32 0x00000004 /* -mfpr-32 */ 51104834Sobrien#define EF_FRV_FPR_64 0x00000008 /* -mfpr-64 */ 52104834Sobrien#define EF_FRV_FPR_NONE 0x0000000c /* -msoft-float */ 53104834Sobrien 54104834Sobrien /* double word support */ 55104834Sobrien#define EF_FRV_DWORD_MASK 0x00000030 /* mask for dword support */ 56104834Sobrien#define EF_FRV_DWORD_YES 0x00000010 /* use double word insns */ 57104834Sobrien#define EF_FRV_DWORD_NO 0x00000020 /* don't use double word insn*/ 58104834Sobrien 59104834Sobrien#define EF_FRV_DOUBLE 0x00000040 /* -mdouble */ 60104834Sobrien#define EF_FRV_MEDIA 0x00000080 /* -mmedia */ 61104834Sobrien 62104834Sobrien#define EF_FRV_PIC 0x00000100 /* -fpic */ 63104834Sobrien#define EF_FRV_NON_PIC_RELOCS 0x00000200 /* used non pic safe relocs */ 64104834Sobrien 65104834Sobrien#define EF_FRV_MULADD 0x00000400 /* -mmuladd */ 66104834Sobrien#define EF_FRV_BIGPIC 0x00000800 /* -fPIC */ 67104834Sobrien#define EF_FRV_LIBPIC 0x00001000 /* -mlibrary-pic */ 68104834Sobrien#define EF_FRV_G0 0x00002000 /* -G 0, no small data ptr */ 69104834Sobrien#define EF_FRV_NOPACK 0x00004000 /* -mnopack */ 70104834Sobrien 71104834Sobrien#define EF_FRV_CPU_MASK 0xff000000 /* specific cpu bits */ 72104834Sobrien#define EF_FRV_CPU_GENERIC 0x00000000 /* generic FRV */ 73104834Sobrien#define EF_FRV_CPU_FR500 0x01000000 /* FRV500 */ 74104834Sobrien#define EF_FRV_CPU_FR300 0x02000000 /* FRV300 */ 75104834Sobrien#define EF_FRV_CPU_SIMPLE 0x03000000 /* SIMPLE */ 76104834Sobrien#define EF_FRV_CPU_TOMCAT 0x04000000 /* Tomcat, FR500 prototype */ 77104834Sobrien#define EF_FRV_CPU_FR400 0x05000000 /* FRV400 */ 78104834Sobrien 79104834Sobrien /* Mask of PIC related bits */ 80104834Sobrien#define EF_FRV_PIC_FLAGS (EF_FRV_PIC | EF_FRV_LIBPIC | EF_FRV_BIGPIC) 81104834Sobrien 82104834Sobrien /* Mask of all flags */ 83104834Sobrien#define EF_FRV_ALL_FLAGS (EF_FRV_GPR_MASK | \ 84104834Sobrien EF_FRV_FPR_MASK | \ 85104834Sobrien EF_FRV_DWORD_MASK | \ 86104834Sobrien EF_FRV_DOUBLE | \ 87104834Sobrien EF_FRV_MEDIA | \ 88104834Sobrien EF_FRV_PIC_FLAGS | \ 89104834Sobrien EF_FRV_NON_PIC_RELOCS | \ 90104834Sobrien EF_FRV_MULADD | \ 91104834Sobrien EF_FRV_G0 | \ 92104834Sobrien EF_FRV_NOPACK | \ 93104834Sobrien EF_FRV_CPU_MASK) 94104834Sobrien 95104834Sobrien#endif /* _ELF_FRV_H */ 96