18dffb485Schristos /* Z80 ELF support for BFD. 2*02f41505Schristos Copyright (C) 1999-2024 Free Software Foundation, Inc. 38dffb485Schristos Contributed by Sergey Belyashov <sergey.belyashov@gmail.com> 48dffb485Schristos 58dffb485Schristos This file is part of BFD, the Binary File Descriptor library. 68dffb485Schristos 78dffb485Schristos This program is free software; you can redistribute it and/or modify 88dffb485Schristos it under the terms of the GNU General Public License as published by 98dffb485Schristos the Free Software Foundation; either version 3 of the License, or 108dffb485Schristos (at your option) any later version. 118dffb485Schristos 128dffb485Schristos This program is distributed in the hope that it will be useful, 138dffb485Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 148dffb485Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 158dffb485Schristos GNU General Public License for more details. 168dffb485Schristos 178dffb485Schristos You should have received a copy of the GNU General Public License 188dffb485Schristos along with this program; if not, write to the Free Software Foundation, 198dffb485Schristos Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 208dffb485Schristos 218dffb485Schristos #ifndef _ELF_Z80_H 228dffb485Schristos #define _ELF_Z80_H 238dffb485Schristos 248dffb485Schristos #include "elf/reloc-macros.h" 258dffb485Schristos 268dffb485Schristos /* Processor specific flags for the ELF header e_flags field. */ 278dffb485Schristos #define EF_Z80_MACH_Z80 0x01 288dffb485Schristos #define EF_Z80_MACH_Z180 0x02 298dffb485Schristos #define EF_Z80_MACH_R800 0x03 308dffb485Schristos #define EF_Z80_MACH_EZ80_Z80 0x04 318dffb485Schristos #define EF_Z80_MACH_EZ80_ADL 0x84 328dffb485Schristos #define EF_Z80_MACH_GBZ80 0x05 338dffb485Schristos #define EF_Z80_MACH_Z80N 0x06 348dffb485Schristos #define EF_Z80_MACH_MSK 0xff 358dffb485Schristos 368dffb485Schristos /* Relocations. */ 378dffb485Schristos START_RELOC_NUMBERS (elf_z80_reloc_type) 388dffb485Schristos RELOC_NUMBER (R_Z80_NONE, 0) 398dffb485Schristos RELOC_NUMBER (R_Z80_8, 1) 408dffb485Schristos RELOC_NUMBER (R_Z80_8_DIS, 2) 418dffb485Schristos RELOC_NUMBER (R_Z80_8_PCREL, 3) 428dffb485Schristos RELOC_NUMBER (R_Z80_16, 4) 438dffb485Schristos RELOC_NUMBER (R_Z80_24, 5) 448dffb485Schristos RELOC_NUMBER (R_Z80_32, 6) 458dffb485Schristos RELOC_NUMBER (R_Z80_BYTE0, 7) 468dffb485Schristos RELOC_NUMBER (R_Z80_BYTE1, 8) 478dffb485Schristos RELOC_NUMBER (R_Z80_BYTE2, 9) 488dffb485Schristos RELOC_NUMBER (R_Z80_BYTE3, 10) 498dffb485Schristos RELOC_NUMBER (R_Z80_WORD0, 11) 508dffb485Schristos RELOC_NUMBER (R_Z80_WORD1, 12) 518dffb485Schristos RELOC_NUMBER (R_Z80_16_BE, 13) 528dffb485Schristos END_RELOC_NUMBERS (R_Z80_max) 538dffb485Schristos 548dffb485Schristos #endif /* _ELF_Z80_H */ 55