175fd0b74Schristos /* XGATE ELF support for BFD. 2*e992f068Schristos Copyright (C) 2010-2022 Free Software Foundation, Inc. 375fd0b74Schristos 475fd0b74Schristos This file is part of BFD, the Binary File Descriptor library. 575fd0b74Schristos 675fd0b74Schristos This program is free software; you can redistribute it and/or modify 775fd0b74Schristos it under the terms of the GNU General Public License as published by 875fd0b74Schristos the Free Software Foundation; either version 2 of the License, or 975fd0b74Schristos (at your option) any later version. 1075fd0b74Schristos 1175fd0b74Schristos This program is distributed in the hope that it will be useful, 1275fd0b74Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 1375fd0b74Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1475fd0b74Schristos GNU General Public License for more details. 1575fd0b74Schristos 1675fd0b74Schristos You should have received a copy of the GNU General Public License 1775fd0b74Schristos along with this program; if not, write to the Free Software Foundation, 1875fd0b74Schristos Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 1975fd0b74Schristos 2075fd0b74Schristos #ifndef _ELF_XGATE_H 2175fd0b74Schristos #define _ELF_XGATE_H 2275fd0b74Schristos 2375fd0b74Schristos #include "elf/reloc-macros.h" 2475fd0b74Schristos 2575fd0b74Schristos /* Relocation types. */ 2675fd0b74Schristos START_RELOC_NUMBERS (elf_xgate_reloc_type) 2775fd0b74Schristos RELOC_NUMBER (R_XGATE_NONE, 0) 2875fd0b74Schristos RELOC_NUMBER (R_XGATE_8, 1) 2975fd0b74Schristos RELOC_NUMBER (R_XGATE_PCREL_8, 2) 3075fd0b74Schristos RELOC_NUMBER (R_XGATE_16, 3) 3175fd0b74Schristos RELOC_NUMBER (R_XGATE_32, 4) 3275fd0b74Schristos RELOC_NUMBER (R_XGATE_PCREL_16, 5) 3375fd0b74Schristos /* These are GNU extensions to enable C++ vtable garbage collection. */ 3475fd0b74Schristos RELOC_NUMBER (R_XGATE_GNU_VTINHERIT, 6) 3575fd0b74Schristos RELOC_NUMBER (R_XGATE_GNU_VTENTRY, 7) 3675fd0b74Schristos 3775fd0b74Schristos RELOC_NUMBER (R_XGATE_24, 8) 3875fd0b74Schristos RELOC_NUMBER (R_XGATE_LO16, 9) 3975fd0b74Schristos RELOC_NUMBER (R_XGATE_GPAGE, 10) 4075fd0b74Schristos RELOC_NUMBER (R_XGATE_PCREL_9, 11) 4175fd0b74Schristos RELOC_NUMBER (R_XGATE_PCREL_10, 12) 4275fd0b74Schristos RELOC_NUMBER (R_XGATE_IMM8_LO, 13) 4375fd0b74Schristos RELOC_NUMBER (R_XGATE_IMM8_HI, 14) 4475fd0b74Schristos RELOC_NUMBER (R_XGATE_IMM3, 15) 4575fd0b74Schristos RELOC_NUMBER (R_XGATE_IMM4, 16) 4675fd0b74Schristos RELOC_NUMBER (R_XGATE_IMM5, 17) 4775fd0b74Schristos 4875fd0b74Schristos /* GNU extension for linker relaxation. 4975fd0b74Schristos Mark beginning of a jump instruction (any form). */ 5075fd0b74Schristos RELOC_NUMBER (R_XGATE_RL_JUMP, 18) 5175fd0b74Schristos 5275fd0b74Schristos /* Mark beginning of Gcc relaxation group instruction. */ 5375fd0b74Schristos RELOC_NUMBER (R_XGATE_RL_GROUP, 19) 5475fd0b74Schristos END_RELOC_NUMBERS (R_XGATE_max) 5575fd0b74Schristos 5675fd0b74Schristos /* Processor specific flags for the ELF header e_flags field. */ 5775fd0b74Schristos 5875fd0b74Schristos /* ABI identification. */ 5975fd0b74Schristos #define EF_XGATE_ABI 0x00000000F 6075fd0b74Schristos 6175fd0b74Schristos /* Integers are 32-bit long. */ 6275fd0b74Schristos #define E_XGATE_I32 0x000000001 6375fd0b74Schristos 6475fd0b74Schristos /* Doubles are 64-bit long. */ 6575fd0b74Schristos #define E_XGATE_F64 0x000000002 6675fd0b74Schristos 6775fd0b74Schristos #define EF_XGATE_MACH_MASK 0xF0 6875fd0b74Schristos 6975fd0b74Schristos #define EF_XGATE_MACH 0x80 /* XGATE microcontroller. */ 7075fd0b74Schristos 7175fd0b74Schristos #define E_M68HCS12X_GLOBAL 0x100 7275fd0b74Schristos 7375fd0b74Schristos /* Identify interrupt handlers. This is used by the debugger to 7475fd0b74Schristos correctly compute the stack frame. */ 7575fd0b74Schristos #define STO_XGATE_INTERRUPT 0x40 7675fd0b74Schristos 7775fd0b74Schristos #endif 78