arc-plt.def 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* Arc V2 Related PLT entries.
  2. Copyright (C) 2016-2022 Free Software Foundation, Inc.
  3. Contributed by Cupertino Miranda (cmiranda@synopsys.com).
  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
  15. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  16. MA 02110-1301, USA. */
  17. PLT_TYPE_START (ELF_ARCV2_PIC)
  18. PLT_ENTRY (0x2730, 0x7f8b, 0x0000, 0x0000) /* ld %r11, [pcl,0] : 0 to be replaced by _DYNAMIC@GOTPC+4 */
  19. PLT_ENTRY (0x2730, 0x7f8a, 0x0000, 0x0000) /* ld %r10, [pcl,0] : 0 to be replaced by _DYNAMIC@GOTPC+8 */
  20. PLT_ENTRY (0x2020, 0x0280) /* j [%r10] */
  21. PLT_ENTRY (0x0,0x0,0x0,0x0,0x0,0x0) /* padding */
  22. PLT_ELEM (0x2730, 0x7f8c, 0x0000, 0x0000) /* ld %r12, [%pc,func@got] */
  23. PLT_ELEM (0x2021, 0x0300) /* j.d [%r12] */
  24. PLT_ELEM (0x240a, 0x1fc0) /* mov %r12, %pcl */
  25. ENTRY_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 4)
  26. ENTRY_RELOC (12, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 8)
  27. ENTRY_RELOC (20, 32, 0xFFFFFFFF, SGOT, 0)
  28. ELEM_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 0)
  29. PLT_TYPE_END (ELF_ARCV2_PIC)
  30. PLT_TYPE_START (ELF_ARCV2_ABS)
  31. PLT_ENTRY (0x1600,0x700b,0x0000,0x0000) /* ld %r11, [0] */
  32. PLT_ENTRY (0x1600,0x700a,0x0000,0x0000) /* ld %r10, [0] */
  33. PLT_ENTRY (0x2020,0x0280) /* j [%r10] */
  34. PLT_ENTRY (0x0,0x0,0x0,0x0,0x0,0x0) /* padding */
  35. PLT_ELEM (0x2730, 0x7f8c, 0x0000, 0x0000) /* ld %r12, [%pcl,func@gotpc] */
  36. PLT_ELEM (0x2021,0x0300) /* j.d [%r12] */
  37. PLT_ELEM (0x240a,0x1fc0) /* mov %r12, %pcl */
  38. ENTRY_RELOC (4, 32, 0xFFFFFFFF, SGOT | MIDDLE_ENDIAN, 4)
  39. ENTRY_RELOC (12, 32, 0xFFFFFFFF, SGOT | MIDDLE_ENDIAN, 8)
  40. ENTRY_RELOC (20, 32, 0xFFFFFFFF, SGOT, 0)
  41. ELEM_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 0)
  42. PLT_TYPE_END (ELF_ARCV2_ABS)
  43. /* Non Arc V2 Related PLT entries. */
  44. PLT_TYPE_START (ELF_ARC_PIC)
  45. PLT_ENTRY (0x2730,0x7f8b,0x0000,0x0000) /* ld %r11, [pcl,0] : 0 to be replaced by _DYNAMIC@GOTPC+4 */
  46. PLT_ENTRY (0x2730,0x7f8a,0x0000,0x0000) /* ld %r10, [pcl,0] : 0 to be replaced by -DYNAMIC@GOTPC+8 */
  47. PLT_ENTRY (0x2020,0x0280) /* j [%r10] */
  48. PLT_ENTRY (0x0,0x0) /* padding */
  49. PLT_ELEM (0x2730,0x7f8c,0x0000,0x0000) /* ld %r12, [%pc,func@got] */
  50. PLT_ELEM (0x7c20) /* j_s.d [%r12] */
  51. PLT_ELEM (0x74ef) /* mov_s %r12, %pcl */
  52. ENTRY_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 4)
  53. ENTRY_RELOC (12, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 8)
  54. ENTRY_RELOC (20, 32, 0xFFFFFFFF, SGOT, 0)
  55. ELEM_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 0)
  56. PLT_TYPE_END (ELF_ARC_PIC)
  57. PLT_TYPE_START (ELF_ARC_ABS)
  58. PLT_ENTRY (0x1600,0x700b,0x0000,0x0000) /* ld %r11, [0] */
  59. PLT_ENTRY (0x1600,0x700a,0x0000,0x0000) /* ld %r10, [0] */
  60. PLT_ENTRY (0x2020,0x0280) /* j [%r10] */
  61. PLT_ENTRY (0x0,0x0) /* padding */
  62. PLT_ELEM (0x2730,0x7f8c,0x0000,0x0000) /* ld %r12, [%pc,func@gotpc] */
  63. PLT_ELEM (0x7c20,0x74ef) /* mov_s %r12, %pcl */
  64. ENTRY_RELOC (4, 32, 0xFFFFFFFF, SGOT | MIDDLE_ENDIAN, 4)
  65. ENTRY_RELOC (12, 32, 0xFFFFFFFF, SGOT | MIDDLE_ENDIAN, 8)
  66. ENTRY_RELOC (20, 32, 0xFFFFFFFF, SGOT, 0)
  67. ELEM_RELOC (4, 32, 0xFFFFFFFF, SGOT | RELATIVE_INSN_32 | MIDDLE_ENDIAN, 0)
  68. PLT_TYPE_END (ELF_ARC_ABS)