xref: /dflybsd-src/contrib/binutils-2.34/include/elf/z80.h (revision b52ef7118d1621abed722c5bbbd542210290ecef)
1*fae548d3Szrj /* Z80 ELF support for BFD.
2*fae548d3Szrj    Copyright (C) 1999-2019 Free Software Foundation, Inc.
3*fae548d3Szrj    Contributed by Sergey Belyashov <sergey.belyashov@gmail.com>
4*fae548d3Szrj 
5*fae548d3Szrj    This file is part of BFD, the Binary File Descriptor library.
6*fae548d3Szrj 
7*fae548d3Szrj    This program is free software; you can redistribute it and/or modify
8*fae548d3Szrj    it under the terms of the GNU General Public License as published by
9*fae548d3Szrj    the Free Software Foundation; either version 3 of the License, or
10*fae548d3Szrj    (at your option) any later version.
11*fae548d3Szrj 
12*fae548d3Szrj    This program is distributed in the hope that it will be useful,
13*fae548d3Szrj    but WITHOUT ANY WARRANTY; without even the implied warranty of
14*fae548d3Szrj    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*fae548d3Szrj    GNU General Public License for more details.
16*fae548d3Szrj 
17*fae548d3Szrj    You should have received a copy of the GNU General Public License
18*fae548d3Szrj    along with this program; if not, write to the Free Software Foundation,
19*fae548d3Szrj    Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
20*fae548d3Szrj 
21*fae548d3Szrj #ifndef _ELF_Z80_H
22*fae548d3Szrj #define _ELF_Z80_H
23*fae548d3Szrj 
24*fae548d3Szrj #include "elf/reloc-macros.h"
25*fae548d3Szrj 
26*fae548d3Szrj /* Processor specific flags for the ELF header e_flags field.  */
27*fae548d3Szrj #define EF_Z80_MACH_Z80      0x01
28*fae548d3Szrj #define EF_Z80_MACH_Z180     0x02
29*fae548d3Szrj #define EF_Z80_MACH_R800     0x03
30*fae548d3Szrj #define EF_Z80_MACH_EZ80_Z80 0x04
31*fae548d3Szrj #define EF_Z80_MACH_EZ80_ADL 0x84
32*fae548d3Szrj #define EF_Z80_MACH_GBZ80    0x05
33*fae548d3Szrj #define EF_Z80_MACH_MSK      0xff
34*fae548d3Szrj 
35*fae548d3Szrj /* Relocations.  */
36*fae548d3Szrj START_RELOC_NUMBERS (elf_z80_reloc_type)
37*fae548d3Szrj      RELOC_NUMBER (R_Z80_NONE,		0)
38*fae548d3Szrj      RELOC_NUMBER (R_Z80_8, 		1)
39*fae548d3Szrj      RELOC_NUMBER (R_Z80_8_DIS,		2)
40*fae548d3Szrj      RELOC_NUMBER (R_Z80_8_PCREL,	3)
41*fae548d3Szrj      RELOC_NUMBER (R_Z80_16, 		4)
42*fae548d3Szrj      RELOC_NUMBER (R_Z80_24, 		5)
43*fae548d3Szrj      RELOC_NUMBER (R_Z80_32, 		6)
44*fae548d3Szrj      RELOC_NUMBER (R_Z80_BYTE0,		7)
45*fae548d3Szrj      RELOC_NUMBER (R_Z80_BYTE1,		8)
46*fae548d3Szrj      RELOC_NUMBER (R_Z80_BYTE2,		9)
47*fae548d3Szrj      RELOC_NUMBER (R_Z80_BYTE3,		10)
48*fae548d3Szrj      RELOC_NUMBER (R_Z80_WORD0,		11)
49*fae548d3Szrj      RELOC_NUMBER (R_Z80_WORD1,		12)
50*fae548d3Szrj END_RELOC_NUMBERS (R_Z80_max)
51*fae548d3Szrj 
52*fae548d3Szrj #endif /* _ELF_Z80_H */
53