138889Sjdp/* V850 ELF support for BFD. 2218822Sdim Copyright 1997, 1998, 2000, 2002, 2003, 2004, 2007 3218822Sdim Free Software Foundation, Inc. 438889Sjdp Created by Michael Meissner, Cygnus Support <meissner@cygnus.com> 538889Sjdp 6130561Sobrien This file is part of BFD, the Binary File Descriptor library. 738889Sjdp 8130561Sobrien This program is free software; you can redistribute it and/or modify 9130561Sobrien it under the terms of the GNU General Public License as published by 10130561Sobrien the Free Software Foundation; either version 2 of the License, or 11130561Sobrien (at your option) any later version. 1238889Sjdp 13130561Sobrien This program is distributed in the hope that it will be useful, 14130561Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 15130561Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16130561Sobrien GNU General Public License for more details. 1738889Sjdp 18130561Sobrien You should have received a copy of the GNU General Public License 19130561Sobrien along with this program; if not, write to the Free Software 20218822Sdim Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 2138889Sjdp 2238889Sjdp/* This file holds definitions specific to the MIPS ELF ABI. Note 2338889Sjdp that most of this is not actually implemented by BFD. */ 2438889Sjdp 2538889Sjdp#ifndef _ELF_V850_H 2638889Sjdp#define _ELF_V850_H 2738889Sjdp 2838889Sjdp/* Processor specific flags for the ELF header e_flags field. */ 2938889Sjdp 3038889Sjdp/* Four bit V850 architecture field. */ 3138889Sjdp#define EF_V850_ARCH 0xf0000000 3238889Sjdp 3338889Sjdp/* v850 code. */ 3438889Sjdp#define E_V850_ARCH 0x00000000 3538889Sjdp 3660484Sobrien/* v850e code. */ 3760484Sobrien#define E_V850E_ARCH 0x10000000 3838889Sjdp 39130561Sobrien/* v850e1 code. */ 40130561Sobrien#define E_V850E1_ARCH 0x20000000 4138889Sjdp 4260484Sobrien 43130561Sobrien/* Flags for the st_other field. */ 44218822Sdim#define V850_OTHER_SDA 0x10 /* Symbol had SDA relocations. */ 45218822Sdim#define V850_OTHER_ZDA 0x20 /* Symbol had ZDA relocations. */ 46218822Sdim#define V850_OTHER_TDA 0x40 /* Symbol had TDA relocations. */ 47130561Sobrien#define V850_OTHER_ERROR 0x80 /* Symbol had an error reported. */ 4838889Sjdp 49130561Sobrien/* V850 relocations. */ 5060484Sobrien#include "elf/reloc-macros.h" 5138889Sjdp 5260484SobrienSTART_RELOC_NUMBERS (v850_reloc_type) 5360484Sobrien RELOC_NUMBER (R_V850_NONE, 0) 5460484Sobrien RELOC_NUMBER (R_V850_9_PCREL, 1) 5560484Sobrien RELOC_NUMBER (R_V850_22_PCREL, 2) 5660484Sobrien RELOC_NUMBER (R_V850_HI16_S, 3) 5760484Sobrien RELOC_NUMBER (R_V850_HI16, 4) 5860484Sobrien RELOC_NUMBER (R_V850_LO16, 5) 59130561Sobrien RELOC_NUMBER (R_V850_ABS32, 6) 6060484Sobrien RELOC_NUMBER (R_V850_16, 7) 6160484Sobrien RELOC_NUMBER (R_V850_8, 8) 6260484Sobrien RELOC_NUMBER( R_V850_SDA_16_16_OFFSET, 9) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */ 6360484Sobrien RELOC_NUMBER( R_V850_SDA_15_16_OFFSET, 10) /* For ld.w, ld.h, ld.hu, st.w, st.h */ 6460484Sobrien RELOC_NUMBER( R_V850_ZDA_16_16_OFFSET, 11) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */ 6560484Sobrien RELOC_NUMBER( R_V850_ZDA_15_16_OFFSET, 12) /* For ld.w, ld.h, ld.hu, st.w, st.h */ 6660484Sobrien RELOC_NUMBER( R_V850_TDA_6_8_OFFSET, 13) /* For sst.w, sld.w */ 6760484Sobrien RELOC_NUMBER( R_V850_TDA_7_8_OFFSET, 14) /* For sst.h, sld.h */ 6860484Sobrien RELOC_NUMBER( R_V850_TDA_7_7_OFFSET, 15) /* For sst.b, sld.b */ 6960484Sobrien RELOC_NUMBER( R_V850_TDA_16_16_OFFSET, 16) /* For set1, clr1, not1, tst1, movea, movhi */ 7060484Sobrien RELOC_NUMBER( R_V850_TDA_4_5_OFFSET, 17) /* For sld.hu */ 7160484Sobrien RELOC_NUMBER( R_V850_TDA_4_4_OFFSET, 18) /* For sld.bu */ 7260484Sobrien RELOC_NUMBER( R_V850_SDA_16_16_SPLIT_OFFSET, 19) /* For ld.bu */ 7360484Sobrien RELOC_NUMBER( R_V850_ZDA_16_16_SPLIT_OFFSET, 20) /* For ld.bu */ 7460484Sobrien RELOC_NUMBER( R_V850_CALLT_6_7_OFFSET, 21) /* For callt */ 7560484Sobrien RELOC_NUMBER( R_V850_CALLT_16_16_OFFSET, 22) /* For callt */ 7660484Sobrien RELOC_NUMBER (R_V850_GNU_VTINHERIT, 23) 7760484Sobrien RELOC_NUMBER (R_V850_GNU_VTENTRY, 24) 78130561Sobrien RELOC_NUMBER (R_V850_LONGCALL, 25) 79130561Sobrien RELOC_NUMBER (R_V850_LONGJUMP, 26) 80130561Sobrien RELOC_NUMBER (R_V850_ALIGN, 27) 81130561Sobrien RELOC_NUMBER (R_V850_REL32, 28) 82218822Sdim RELOC_NUMBER (R_V850_LO16_SPLIT_OFFSET, 29) /* For ld.bu */ 8377298SobrienEND_RELOC_NUMBERS (R_V850_max) 8460484Sobrien 8538889Sjdp 8638889Sjdp/* Processor specific section indices. These sections do not actually 8738889Sjdp exist. Symbols with a st_shndx field corresponding to one of these 8838889Sjdp values have a special meaning. */ 8938889Sjdp 9038889Sjdp/* Small data area common symbol. */ 9138889Sjdp#define SHN_V850_SCOMMON 0xff00 9238889Sjdp 9338889Sjdp/* Tiny data area common symbol. */ 9438889Sjdp#define SHN_V850_TCOMMON 0xff01 9538889Sjdp 9638889Sjdp/* Zero data area common symbol. */ 9738889Sjdp#define SHN_V850_ZCOMMON 0xff02 9838889Sjdp 9938889Sjdp 10038889Sjdp/* Processor specific section types. */ 10138889Sjdp 10238889Sjdp/* Section contains the .scommon data. */ 10338889Sjdp#define SHT_V850_SCOMMON 0x70000000 10438889Sjdp 10538889Sjdp/* Section contains the .scommon data. */ 10638889Sjdp#define SHT_V850_TCOMMON 0x70000001 10738889Sjdp 10838889Sjdp/* Section contains the .scommon data. */ 10938889Sjdp#define SHT_V850_ZCOMMON 0x70000002 11038889Sjdp 111130561Sobrien/* Processor specific section flags. */ 11238889Sjdp 113130561Sobrien/* This section must be in the small data area (pointed to by GP). */ 114130561Sobrien#define SHF_V850_GPREL 0x10000000 115130561Sobrien 116130561Sobrien/* This section must be in the tiny data area (pointed to by EP). */ 117130561Sobrien#define SHF_V850_EPREL 0x20000000 118130561Sobrien 119130561Sobrien/* This section must be in the zero data area (pointed to by R0). */ 120130561Sobrien#define SHF_V850_R0REL 0x40000000 121130561Sobrien 12238889Sjdp#endif /* _ELF_V850_H */ 123