xgate.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* XGATE ELF support for BFD.
  2. Copyright (C) 2010-2022 Free Software Foundation, Inc.
  3. This file is part of BFD, the Binary File Descriptor library.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software Foundation,
  14. Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
  15. #ifndef _ELF_XGATE_H
  16. #define _ELF_XGATE_H
  17. #include "elf/reloc-macros.h"
  18. /* Relocation types. */
  19. START_RELOC_NUMBERS (elf_xgate_reloc_type)
  20. RELOC_NUMBER (R_XGATE_NONE, 0)
  21. RELOC_NUMBER (R_XGATE_8, 1)
  22. RELOC_NUMBER (R_XGATE_PCREL_8, 2)
  23. RELOC_NUMBER (R_XGATE_16, 3)
  24. RELOC_NUMBER (R_XGATE_32, 4)
  25. RELOC_NUMBER (R_XGATE_PCREL_16, 5)
  26. /* These are GNU extensions to enable C++ vtable garbage collection. */
  27. RELOC_NUMBER (R_XGATE_GNU_VTINHERIT, 6)
  28. RELOC_NUMBER (R_XGATE_GNU_VTENTRY, 7)
  29. RELOC_NUMBER (R_XGATE_24, 8)
  30. RELOC_NUMBER (R_XGATE_LO16, 9)
  31. RELOC_NUMBER (R_XGATE_GPAGE, 10)
  32. RELOC_NUMBER (R_XGATE_PCREL_9, 11)
  33. RELOC_NUMBER (R_XGATE_PCREL_10, 12)
  34. RELOC_NUMBER (R_XGATE_IMM8_LO, 13)
  35. RELOC_NUMBER (R_XGATE_IMM8_HI, 14)
  36. RELOC_NUMBER (R_XGATE_IMM3, 15)
  37. RELOC_NUMBER (R_XGATE_IMM4, 16)
  38. RELOC_NUMBER (R_XGATE_IMM5, 17)
  39. /* GNU extension for linker relaxation.
  40. Mark beginning of a jump instruction (any form). */
  41. RELOC_NUMBER (R_XGATE_RL_JUMP, 18)
  42. /* Mark beginning of Gcc relaxation group instruction. */
  43. RELOC_NUMBER (R_XGATE_RL_GROUP, 19)
  44. END_RELOC_NUMBERS (R_XGATE_max)
  45. /* Processor specific flags for the ELF header e_flags field. */
  46. /* ABI identification. */
  47. #define EF_XGATE_ABI 0x00000000F
  48. /* Integers are 32-bit long. */
  49. #define E_XGATE_I32 0x000000001
  50. /* Doubles are 64-bit long. */
  51. #define E_XGATE_F64 0x000000002
  52. #define EF_XGATE_MACH_MASK 0xF0
  53. #define EF_XGATE_MACH 0x80 /* XGATE microcontroller. */
  54. #define E_M68HCS12X_GLOBAL 0x100
  55. /* Identify interrupt handlers. This is used by the debugger to
  56. correctly compute the stack frame. */
  57. #define STO_XGATE_INTERRUPT 0x40
  58. #endif