175fd0b74Schristos /* Adapteva EPIPHANY ELF support for BFD. 2*e992f068Schristos Copyright (C) 2009-2022 Free Software Foundation, Inc. 375fd0b74Schristos Contributed by Embecosm on behalf of Adapteva, Inc. 475fd0b74Schristos 575fd0b74Schristos This file is part of BFD, the Binary File Descriptor library. 675fd0b74Schristos 775fd0b74Schristos This program is free software; you can redistribute it and/or modify 875fd0b74Schristos it under the terms of the GNU General Public License as published by 975fd0b74Schristos the Free Software Foundation; either version 3 of the License, or 1075fd0b74Schristos (at your option) any later version. 1175fd0b74Schristos 1275fd0b74Schristos This program is distributed in the hope that it will be useful, 1375fd0b74Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 1475fd0b74Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1575fd0b74Schristos GNU General Public License for more details. 1675fd0b74Schristos 1775fd0b74Schristos You should have received a copy of the GNU General Public License 1875fd0b74Schristos along with this program; if not, write to the Free Software Foundation, 1975fd0b74Schristos Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 2075fd0b74Schristos 2175fd0b74Schristos #ifndef _ELF_EPIPHANY_H 2275fd0b74Schristos #define _ELF_EPIPHANY_H 2375fd0b74Schristos 2475fd0b74Schristos #include "elf/reloc-macros.h" 2575fd0b74Schristos 2675fd0b74Schristos /* Relocations. */ 2775fd0b74Schristos START_RELOC_NUMBERS (elf_epiphany_reloc_type) 2875fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_NONE, 0) 2975fd0b74Schristos 3075fd0b74Schristos /* Absolute address relocations. */ 3175fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_8, 1) 3275fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_16, 2) 3375fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_32, 3) 3475fd0b74Schristos 3575fd0b74Schristos /* PC-relative relocations. */ 3675fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_8_PCREL, 4) 3775fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_16_PCREL,5) 3875fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_32_PCREL,6) 3975fd0b74Schristos 4075fd0b74Schristos /* special forms for 8/24 bit branch displacements. */ 4175fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_SIMM8, 7) 4275fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_SIMM24, 8) 4375fd0b74Schristos 4475fd0b74Schristos /* HIGH and LOW relocations taking part of a 32 bit address and 4575fd0b74Schristos depositing it into the IMM16 field of a destination. */ 4675fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_HIGH, 9) 4775fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_LOW,10) 4875fd0b74Schristos 4975fd0b74Schristos /* 11 bit signed immediate value. */ 5075fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_SIMM11, 11) 5175fd0b74Schristos /* 11 bit magnitude addressing displacement. */ 5275fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_IMM11, 12) 5375fd0b74Schristos 5475fd0b74Schristos /* 8 bit immediate for MOV.S R,IMM8. */ 5575fd0b74Schristos RELOC_NUMBER (R_EPIPHANY_IMM8, 13) 5675fd0b74Schristos 5775fd0b74Schristos END_RELOC_NUMBERS(R_EPIPHANY_max) 5875fd0b74Schristos 5975fd0b74Schristos #endif /* _ELF_EPIPHANY_H */ 60