xref: /openbsd-src/gnu/usr.bin/binutils-2.17/include/coff/z80.h (revision 3d8817e467ea46cf4772788d6804dd293abfb01a)
1*3d8817e4Smiod /* coff information for Zilog Z80
2*3d8817e4Smiod    Copyright 2005 Free Software Foundation, Inc.
3*3d8817e4Smiod    Contributed by Arnold Metselaar <arnold_m@operamail.com>
4*3d8817e4Smiod 
5*3d8817e4Smiod    This program is free software; you can redistribute it and/or modify
6*3d8817e4Smiod    it under the terms of the GNU General Public License as published by
7*3d8817e4Smiod    the Free Software Foundation; either version 2 of the License, or
8*3d8817e4Smiod    (at your option) any later version.
9*3d8817e4Smiod 
10*3d8817e4Smiod    This program is distributed in the hope that it will be useful,
11*3d8817e4Smiod    but WITHOUT ANY WARRANTY; without even the implied warranty of
12*3d8817e4Smiod    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*3d8817e4Smiod    GNU General Public License for more details.
14*3d8817e4Smiod 
15*3d8817e4Smiod    You should have received a copy of the GNU General Public License
16*3d8817e4Smiod    along with this program; if not, write to the Free Software
17*3d8817e4Smiod    Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
18*3d8817e4Smiod 
19*3d8817e4Smiod #define L_LNNO_SIZE 4
20*3d8817e4Smiod #include "coff/external.h"
21*3d8817e4Smiod 
22*3d8817e4Smiod /* z80 backend does not use dots in section names.  */
23*3d8817e4Smiod #undef  _TEXT
24*3d8817e4Smiod #define _TEXT "text"
25*3d8817e4Smiod #undef  _DATA
26*3d8817e4Smiod #define _DATA "data"
27*3d8817e4Smiod #undef  _BSS
28*3d8817e4Smiod #define _BSS "bss"
29*3d8817e4Smiod 
30*3d8817e4Smiod /* Type of cpu is stored in flags.  */
31*3d8817e4Smiod #define F_MACHMASK 0xF000
32*3d8817e4Smiod 
33*3d8817e4Smiod #define	Z80MAGIC   0x805A
34*3d8817e4Smiod 
35*3d8817e4Smiod #define Z80BADMAG(x) (((x).f_magic != Z80MAGIC))
36*3d8817e4Smiod 
37*3d8817e4Smiod /* Relocation directives.  */
38*3d8817e4Smiod 
39*3d8817e4Smiod /* This format actually has more bits than we need.  */
40*3d8817e4Smiod 
41*3d8817e4Smiod struct external_reloc
42*3d8817e4Smiod {
43*3d8817e4Smiod   char r_vaddr[4];
44*3d8817e4Smiod   char r_symndx[4];
45*3d8817e4Smiod   char r_offset[4];
46*3d8817e4Smiod   char r_type[2];
47*3d8817e4Smiod   char r_stuff[2];
48*3d8817e4Smiod };
49*3d8817e4Smiod 
50*3d8817e4Smiod #define RELOC struct external_reloc
51*3d8817e4Smiod #define RELSZ 16
52