metag.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* Meta ELF support for BFD.
  2. Copyright (C) 2013-2022 Free Software Foundation, Inc.
  3. Contributed by Imagination Technologies Ltd.
  4. This file is part of BFD, the Binary File Descriptor library.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software Foundation,
  15. Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
  16. #ifndef _ELF_METAG_H
  17. #define _ELF_METAG_H
  18. #include "elf/reloc-macros.h"
  19. /* Relocation types. */
  20. START_RELOC_NUMBERS (elf_metag_reloc_type)
  21. RELOC_NUMBER (R_METAG_HIADDR16, 0)
  22. RELOC_NUMBER (R_METAG_LOADDR16, 1)
  23. RELOC_NUMBER (R_METAG_ADDR32, 2)
  24. RELOC_NUMBER (R_METAG_NONE, 3)
  25. RELOC_NUMBER (R_METAG_RELBRANCH, 4)
  26. RELOC_NUMBER (R_METAG_GETSETOFF, 5)
  27. /* Backward compatability */
  28. RELOC_NUMBER (R_METAG_REG32OP1, 6)
  29. RELOC_NUMBER (R_METAG_REG32OP2, 7)
  30. RELOC_NUMBER (R_METAG_REG32OP3, 8)
  31. RELOC_NUMBER (R_METAG_REG16OP1, 9)
  32. RELOC_NUMBER (R_METAG_REG16OP2, 10)
  33. RELOC_NUMBER (R_METAG_REG16OP3, 11)
  34. RELOC_NUMBER (R_METAG_REG32OP4, 12)
  35. RELOC_NUMBER (R_METAG_HIOG, 13)
  36. RELOC_NUMBER (R_METAG_LOOG, 14)
  37. RELOC_NUMBER (R_METAG_REL8, 15)
  38. RELOC_NUMBER (R_METAG_REL16, 16)
  39. /* GNU */
  40. RELOC_NUMBER (R_METAG_GNU_VTINHERIT,30)
  41. RELOC_NUMBER (R_METAG_GNU_VTENTRY, 31)
  42. /* PIC relocations */
  43. RELOC_NUMBER (R_METAG_HI16_GOTOFF, 32)
  44. RELOC_NUMBER (R_METAG_LO16_GOTOFF, 33)
  45. RELOC_NUMBER (R_METAG_GETSET_GOTOFF,34)
  46. RELOC_NUMBER (R_METAG_GETSET_GOT, 35)
  47. RELOC_NUMBER (R_METAG_HI16_GOTPC, 36)
  48. RELOC_NUMBER (R_METAG_LO16_GOTPC, 37)
  49. RELOC_NUMBER (R_METAG_HI16_PLT, 38)
  50. RELOC_NUMBER (R_METAG_LO16_PLT, 39)
  51. RELOC_NUMBER (R_METAG_RELBRANCH_PLT,40)
  52. RELOC_NUMBER (R_METAG_GOTOFF, 41)
  53. RELOC_NUMBER (R_METAG_PLT, 42)
  54. RELOC_NUMBER (R_METAG_COPY, 43)
  55. RELOC_NUMBER (R_METAG_JMP_SLOT, 44)
  56. RELOC_NUMBER (R_METAG_RELATIVE, 45)
  57. RELOC_NUMBER (R_METAG_GLOB_DAT, 46)
  58. /* TLS relocations */
  59. RELOC_NUMBER (R_METAG_TLS_GD, 47)
  60. RELOC_NUMBER (R_METAG_TLS_LDM, 48)
  61. RELOC_NUMBER (R_METAG_TLS_LDO_HI16, 49)
  62. RELOC_NUMBER (R_METAG_TLS_LDO_LO16, 50)
  63. RELOC_NUMBER (R_METAG_TLS_LDO, 51)
  64. RELOC_NUMBER (R_METAG_TLS_IE, 52)
  65. RELOC_NUMBER (R_METAG_TLS_IENONPIC, 53)
  66. RELOC_NUMBER (R_METAG_TLS_IENONPIC_HI16,54)
  67. RELOC_NUMBER (R_METAG_TLS_IENONPIC_LO16,55)
  68. RELOC_NUMBER (R_METAG_TLS_TPOFF, 56)
  69. RELOC_NUMBER (R_METAG_TLS_DTPMOD, 57)
  70. RELOC_NUMBER (R_METAG_TLS_DTPOFF, 58)
  71. RELOC_NUMBER (R_METAG_TLS_LE, 59)
  72. RELOC_NUMBER (R_METAG_TLS_LE_HI16, 60)
  73. RELOC_NUMBER (R_METAG_TLS_LE_LO16, 61)
  74. END_RELOC_NUMBERS (R_METAG_MAX)
  75. #endif /* _ELF_METAG_H */