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