1 1.1 christos /* IP2xxx ELF support for BFD. 2 1.10 christos Copyright (C) 2000-2025 Free Software Foundation, Inc. 3 1.1 christos 4 1.1 christos This file is part of BFD, the Binary File Descriptor library. 5 1.1 christos 6 1.1 christos This program is free software; you can redistribute it and/or modify 7 1.1 christos it under the terms of the GNU General Public License as published by 8 1.1 christos the Free Software Foundation; either version 3 of the License, or 9 1.1 christos (at your option) any later version. 10 1.1 christos 11 1.1 christos This program is distributed in the hope that it will be useful, 12 1.1 christos but WITHOUT ANY WARRANTY; without even the implied warranty of 13 1.1 christos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 1.1 christos GNU General Public License for more details. 15 1.1 christos 16 1.1 christos You should have received a copy of the GNU General Public License 17 1.1 christos along with this program; if not, write to the Free Software Foundation, 18 1.1 christos Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 19 1.1 christos 20 1.1 christos #ifndef _ELF_IP2K_H 21 1.1 christos #define _ELF_IP2K_H 22 1.1 christos 23 1.1 christos #include "elf/reloc-macros.h" 24 1.1 christos 25 1.1 christos /* Relocations. */ 26 1.1 christos START_RELOC_NUMBERS (elf_ip2k_reloc_type) 27 1.1 christos RELOC_NUMBER (R_IP2K_NONE, 0) 28 1.1 christos RELOC_NUMBER (R_IP2K_16, 1) 29 1.1 christos RELOC_NUMBER (R_IP2K_32, 2) 30 1.1 christos RELOC_NUMBER (R_IP2K_FR9, 3) 31 1.1 christos RELOC_NUMBER (R_IP2K_BANK, 4) 32 1.1 christos RELOC_NUMBER (R_IP2K_ADDR16CJP, 5) 33 1.1 christos RELOC_NUMBER (R_IP2K_PAGE3, 6) 34 1.1 christos RELOC_NUMBER (R_IP2K_LO8DATA, 7) 35 1.1 christos RELOC_NUMBER (R_IP2K_HI8DATA, 8) 36 1.1 christos RELOC_NUMBER (R_IP2K_LO8INSN, 9) 37 1.1 christos RELOC_NUMBER (R_IP2K_HI8INSN, 10) 38 1.1 christos RELOC_NUMBER (R_IP2K_PC_SKIP, 11) 39 1.1 christos RELOC_NUMBER (R_IP2K_TEXT, 12) 40 1.1 christos RELOC_NUMBER (R_IP2K_FR_OFFSET, 13) 41 1.1 christos RELOC_NUMBER (R_IP2K_EX8DATA, 14) 42 1.1 christos END_RELOC_NUMBERS(R_IP2K_max) 43 1.1 christos 44 1.1 christos 45 1.1 christos /* Define the data & instruction memory discriminator. In a linked 46 1.1 christos executable, an symbol should be deemed to point to an instruction 47 1.1 christos if ((address & IP2K_INSN_MASK) == IP2K_INSN_VALUE), and similarly 48 1.1 christos for the data space. See also `ld/emulparams/elf32ip2k.sh'. */ 49 1.1 christos /* ??? Consider extending the _MASK values to include all the 50 1.1 christos intermediate bits that must be zero due to the limited physical 51 1.1 christos memory size on the IP2K. */ 52 1.1 christos 53 1.1 christos #define IP2K_DATA_MASK 0xff000000 54 1.1 christos #define IP2K_DATA_VALUE 0x01000000 55 1.1 christos #define IP2K_INSN_MASK 0xff000000 56 1.1 christos #define IP2K_INSN_VALUE 0x02000000 57 1.1 christos 58 1.1 christos /* The location of the memory mapped hardware stack. */ 59 1.1 christos #define IP2K_STACK_VALUE 0x0f000000 60 1.1 christos #define IP2K_STACK_SIZE 0x20 61 1.1 christos 62 1.1 christos #endif /* _ELF_IP2K_H */ 63