h8.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* H8300/h8500 ELF support for BFD.
  2. Copyright (C) 2001-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 3 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_H8_H
  16. #define _ELF_H8_H
  17. #include "elf/reloc-macros.h"
  18. /* Relocations. */
  19. /* Relocations 59..64 are GNU extensions. */
  20. START_RELOC_NUMBERS (elf_h8_reloc_type)
  21. RELOC_NUMBER (R_H8_NONE, 0)
  22. RELOC_NUMBER (R_H8_DIR32, 1)
  23. RELOC_NUMBER (R_H8_DIR32_28, 2)
  24. RELOC_NUMBER (R_H8_DIR32_24, 3)
  25. RELOC_NUMBER (R_H8_DIR32_16, 4)
  26. RELOC_NUMBER (R_H8_DIR32U, 6)
  27. RELOC_NUMBER (R_H8_DIR32U_28, 7)
  28. RELOC_NUMBER (R_H8_DIR32U_24, 8)
  29. RELOC_NUMBER (R_H8_DIR32U_20, 9)
  30. RELOC_NUMBER (R_H8_DIR32U_16, 10)
  31. RELOC_NUMBER (R_H8_DIR24, 11)
  32. RELOC_NUMBER (R_H8_DIR24_20, 12)
  33. RELOC_NUMBER (R_H8_DIR24_16, 13)
  34. RELOC_NUMBER (R_H8_DIR24U, 14)
  35. RELOC_NUMBER (R_H8_DIR24U_20, 15)
  36. RELOC_NUMBER (R_H8_DIR24U_16, 16)
  37. RELOC_NUMBER (R_H8_DIR16, 17)
  38. RELOC_NUMBER (R_H8_DIR16U, 18)
  39. RELOC_NUMBER (R_H8_DIR16S_32, 19)
  40. RELOC_NUMBER (R_H8_DIR16S_28, 20)
  41. RELOC_NUMBER (R_H8_DIR16S_24, 21)
  42. RELOC_NUMBER (R_H8_DIR16S_20, 22)
  43. RELOC_NUMBER (R_H8_DIR16S, 23)
  44. RELOC_NUMBER (R_H8_DIR8, 24)
  45. RELOC_NUMBER (R_H8_DIR8U, 25)
  46. RELOC_NUMBER (R_H8_DIR8Z_32, 26)
  47. RELOC_NUMBER (R_H8_DIR8Z_28, 27)
  48. RELOC_NUMBER (R_H8_DIR8Z_24, 28)
  49. RELOC_NUMBER (R_H8_DIR8Z_20, 29)
  50. RELOC_NUMBER (R_H8_DIR8Z_16, 30)
  51. RELOC_NUMBER (R_H8_PCREL16, 31)
  52. RELOC_NUMBER (R_H8_PCREL8, 32)
  53. RELOC_NUMBER (R_H8_BPOS, 33)
  54. FAKE_RELOC (R_H8_FIRST_INVALID_DIR_RELOC, 34)
  55. FAKE_RELOC (R_H8_LAST_INVALID_DIR_RELOC, 58)
  56. RELOC_NUMBER (R_H8_DIR16A8, 59)
  57. RELOC_NUMBER (R_H8_DIR16R8, 60)
  58. RELOC_NUMBER (R_H8_DIR24A8, 61)
  59. RELOC_NUMBER (R_H8_DIR24R8, 62)
  60. RELOC_NUMBER (R_H8_DIR32A16, 63)
  61. RELOC_NUMBER (R_H8_DISP32A16, 64)
  62. RELOC_NUMBER (R_H8_ABS32, 65)
  63. RELOC_NUMBER (R_H8_ABS32A16, 127)
  64. RELOC_NUMBER (R_H8_SYM, 128)
  65. RELOC_NUMBER (R_H8_OPneg, 129)
  66. RELOC_NUMBER (R_H8_OPadd, 130)
  67. RELOC_NUMBER (R_H8_OPsub, 131)
  68. RELOC_NUMBER (R_H8_OPmul, 132)
  69. RELOC_NUMBER (R_H8_OPdiv, 133)
  70. RELOC_NUMBER (R_H8_OPshla, 134)
  71. RELOC_NUMBER (R_H8_OPshra, 135)
  72. RELOC_NUMBER (R_H8_OPsctsize, 136)
  73. RELOC_NUMBER (R_H8_OPhword, 137)
  74. RELOC_NUMBER (R_H8_OPlword, 138)
  75. RELOC_NUMBER (R_H8_OPhigh, 139)
  76. RELOC_NUMBER (R_H8_OPlow, 140)
  77. RELOC_NUMBER (R_H8_OPscttop, 141)
  78. END_RELOC_NUMBERS (R_H8_max)
  79. /* Machine variant if we know it. This field was invented at Cygnus,
  80. but it is hoped that other vendors will adopt it. If some standard
  81. is developed, this code should be changed to follow it. */
  82. #define EF_H8_MACH 0x00FF0000
  83. #define E_H8_MACH_H8300 0x00800000
  84. #define E_H8_MACH_H8300H 0x00810000
  85. #define E_H8_MACH_H8300S 0x00820000
  86. #define E_H8_MACH_H8300HN 0x00830000
  87. #define E_H8_MACH_H8300SN 0x00840000
  88. #define E_H8_MACH_H8300SX 0x00850000
  89. #define E_H8_MACH_H8300SXN 0x00860000
  90. #endif