v850.h revision 38889
1/* V850 ELF support for BFD.
2   Copyright (C) 1997 Free Software Foundation, Inc.
3   Created by Michael Meissner, Cygnus Support <meissner@cygnus.com>
4
5This file is part of BFD, the Binary File Descriptor library.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software
19Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
20
21/* This file holds definitions specific to the MIPS ELF ABI.  Note
22   that most of this is not actually implemented by BFD.  */
23
24#ifndef _ELF_V850_H
25#define _ELF_V850_H
26
27/* Processor specific flags for the ELF header e_flags field.  */
28
29/* Four bit V850 architecture field.  */
30#define EF_V850_ARCH		0xf0000000
31
32/* v850 code.  */
33#define E_V850_ARCH		0x00000000
34
35
36
37/* Flags for the st_other field */
38#define V850_OTHER_SDA		0x01	/* symbol had SDA relocations */
39#define V850_OTHER_ZDA		0x02	/* symbol had ZDA relocations */
40#define V850_OTHER_TDA		0x04	/* symbol had TDA relocations */
41#define V850_OTHER_TDA_BYTE	0x08	/* symbol had TDA byte relocations */
42#define V850_OTHER_ERROR	0x80	/* symbol had an error reported */
43
44/* V850 relocations */
45enum v850_reloc_type
46{
47  R_V850_NONE = 0,
48  R_V850_9_PCREL,
49  R_V850_22_PCREL,
50  R_V850_HI16_S,
51  R_V850_HI16,
52  R_V850_LO16,
53  R_V850_32,
54  R_V850_16,
55  R_V850_8,
56  R_V850_SDA_16_16_OFFSET,		/* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
57  R_V850_SDA_15_16_OFFSET,		/* For ld.w, ld.h, ld.hu, st.w, st.h */
58  R_V850_ZDA_16_16_OFFSET,		/* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
59  R_V850_ZDA_15_16_OFFSET,		/* For ld.w, ld.h, ld.hu, st.w, st.h */
60  R_V850_TDA_6_8_OFFSET,		/* For sst.w, sld.w */
61  R_V850_TDA_7_8_OFFSET,		/* For sst.h, sld.h */
62  R_V850_TDA_7_7_OFFSET,		/* For sst.b, sld.b */
63  R_V850_TDA_16_16_OFFSET,		/* For set1, clr1, not1, tst1, movea, movhi */
64  R_V850_max
65};
66
67
68/* Processor specific section indices.  These sections do not actually
69   exist.  Symbols with a st_shndx field corresponding to one of these
70   values have a special meaning.  */
71
72/* Small data area common symbol.  */
73#define SHN_V850_SCOMMON	0xff00
74
75/* Tiny data area common symbol.  */
76#define SHN_V850_TCOMMON	0xff01
77
78/* Zero data area common symbol.  */
79#define SHN_V850_ZCOMMON	0xff02
80
81
82/* Processor specific section types.  */
83
84/* Section contains the .scommon data.  */
85#define SHT_V850_SCOMMON	0x70000000
86
87/* Section contains the .scommon data.  */
88#define SHT_V850_TCOMMON	0x70000001
89
90/* Section contains the .scommon data.  */
91#define SHT_V850_ZCOMMON	0x70000002
92
93
94#endif /* _ELF_V850_H */
95