xref: /dflybsd-src/contrib/binutils-2.34/include/elf/iq2000.h (revision b52ef7118d1621abed722c5bbbd542210290ecef)
1*fae548d3Szrj /* IQ2000 ELF support for BFD.
2*fae548d3Szrj    Copyright (C) 2002-2020 Free Software Foundation, Inc.
3*fae548d3Szrj 
4*fae548d3Szrj    This file is part of BFD, the Binary File Descriptor library.
5*fae548d3Szrj 
6*fae548d3Szrj    This program is free software; you can redistribute it and/or modify
7*fae548d3Szrj    it under the terms of the GNU General Public License as published by
8*fae548d3Szrj    the Free Software Foundation; either version 3 of the License, or
9*fae548d3Szrj    (at your option) any later version.
10*fae548d3Szrj 
11*fae548d3Szrj    This program is distributed in the hope that it will be useful,
12*fae548d3Szrj    but WITHOUT ANY WARRANTY; without even the implied warranty of
13*fae548d3Szrj    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*fae548d3Szrj    GNU General Public License for more details.
15*fae548d3Szrj 
16*fae548d3Szrj    You should have received a copy of the GNU General Public License
17*fae548d3Szrj    along with this program; if not, write to the Free Software Foundation,
18*fae548d3Szrj    Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
19*fae548d3Szrj 
20*fae548d3Szrj #ifndef _ELF_IQ2000_H
21*fae548d3Szrj #define _ELF_IQ2000_H
22*fae548d3Szrj 
23*fae548d3Szrj #include "elf/reloc-macros.h"
24*fae548d3Szrj 
25*fae548d3Szrj /* Relocations.  */
26*fae548d3Szrj START_RELOC_NUMBERS (elf_iq2000_reloc_type)
27*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_NONE, 0)
28*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_16, 1)
29*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_32, 2)
30*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_26, 3)
31*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_PC16, 4)
32*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_HI16, 5)
33*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_LO16, 6)
34*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_OFFSET_16, 7)
35*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_OFFSET_21, 8)
36*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_UHI16, 9)
37*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_32_DEBUG, 10)
38*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_GNU_VTINHERIT, 200)
39*fae548d3Szrj   RELOC_NUMBER (R_IQ2000_GNU_VTENTRY, 201)
40*fae548d3Szrj END_RELOC_NUMBERS(R_IQ2000_max)
41*fae548d3Szrj 
42*fae548d3Szrj #define EF_IQ2000_CPU_IQ2000	0x00000001      /* default */
43*fae548d3Szrj #define EF_IQ2000_CPU_IQ10      0x00000002      /* IQ10 */
44*fae548d3Szrj #define EF_IQ2000_CPU_MASK	0x00000003	/* specific cpu bits */
45*fae548d3Szrj #define EF_IQ2000_ALL_FLAGS	(EF_IQ2000_CPU_MASK)
46*fae548d3Szrj 
47*fae548d3Szrj /* Define the data & instruction memory discriminator.  In a linked
48*fae548d3Szrj    executable, an symbol should be deemed to point to an instruction
49*fae548d3Szrj    if ((address & IQ2000_INSN_MASK) == IQ2000_INSN_VALUE), and similarly
50*fae548d3Szrj    for the data space.  */
51*fae548d3Szrj 
52*fae548d3Szrj #define IQ2000_DATA_MASK   0x80000000
53*fae548d3Szrj #define IQ2000_DATA_VALUE  0x00000000
54*fae548d3Szrj #define IQ2000_INSN_MASK   0x80000000
55*fae548d3Szrj #define IQ2000_INSN_VALUE  0x80000000
56*fae548d3Szrj 
57*fae548d3Szrj 
58*fae548d3Szrj #endif /* _ELF_IQ2000_H */
59