arm-reloc.def 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. // arm-reloc.def -- ARM relocation definitions.
  2. // Copyright (C) 2010-2015 Free Software Foundation, Inc.
  3. // Written by Doug Kwan <dougkwan@google.com>.
  4. // This file is part of gold.
  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. // The information here is based on the official ARM document "ELF for ARM
  18. // Architecture" (Document number ARM IHI 0044C). The first five columns of
  19. // the table below are derived from Table 4-8 in the ARM ELF document. Each
  20. // relocation from Table 4-8 corresponds to one relocation definition in the
  21. // table below. A relocation definition has the following information:
  22. //
  23. // Name: This is the name of the relocation without the "R_ARM_" prefix.
  24. //
  25. // Type: Relocation type. There are four.
  26. // - STATIC for static relocations processed by a static linker.
  27. // - DYNAMIC for dynamic relocations processed by a dynamic linker.
  28. // - PRIVATE for R_ARM_PRIVATE_<n> private relocation type.
  29. // - OBSOLETE for old relocation types no longer used.
  30. // We do not use DEPRECATED as a distinct type since we still have to
  31. // handle deprecated relocations so we one of the types above.
  32. //
  33. // Deprecated: Whether this is a deprecated relocation type. The linker
  34. // is expected to handle these though they should not be generated by fully
  35. // conforming tool-chains.
  36. //
  37. // Operation: An expression specifying how the linker should perform a
  38. // relocation. If there is no operation or the operation cannot be
  39. // specified, it is "NONE".
  40. //
  41. // Implemented: Whether this is implemented by the gold.
  42. //
  43. // Group_index: For a group relocation type, it is one of 0, 1 or 2. For
  44. // a non-group relocation type, it is -1.
  45. //
  46. // Overflow: Whether gold should check for overflow. This is "No" by default
  47. // for relocation types DYNAMIC, PRIVATE and OBSOLETE.
  48. //
  49. // Overflow-----------------------------------------------------------------+
  50. // Group index----------------------------------------------------------+ |
  51. // Implemented-------------------------------------------------------+ | |
  52. // Operation-------------------------------+ | | |
  53. // Class----------------------------+ | | | |
  54. // Deprecated--------------------+ | | | | |
  55. // Type----------------+ | | | | | |
  56. // Name | | | | | | |
  57. // | | | | | | | |
  58. RD(NONE , STATIC , N, MISC , NONE , Y, -1, N)
  59. RD(PC24 , STATIC , Y, ARM , ((S + A) | T) - P , Y, -1, Y)
  60. RD(ABS32 , STATIC , N, DATA , (S + A) | T , Y, -1, N)
  61. RD(REL32 , STATIC , N, DATA , ((S + A) | T) - P , Y, -1, N)
  62. RD(LDR_PC_G0 , STATIC , N, ARM , S + A - P , Y, 0, Y)
  63. RD(ABS16 , STATIC , N, DATA , S + A , Y, -1, Y)
  64. RD(ABS12 , STATIC , N, ARM , S + A , Y, -1, Y)
  65. RD(THM_ABS5 , STATIC , N, THM16, S + A , Y, -1, Y)
  66. RD(ABS8 , STATIC , N, DATA , S + A , Y, -1, Y)
  67. RD(SBREL32 , STATIC , N, DATA , ((S + A) | T) - B(S) , N, -1, N)
  68. RD(THM_CALL , STATIC , N, THM32, ((S + A) | T) - P , Y, -1, Y)
  69. RD(THM_PC8 , STATIC , N, THM16, S + A - Pa , Y, -1, Y)
  70. RD(BREL_ADJ , DYNAMIC , N, DATA , DELTA_B(S) + A , Y, -1, N)
  71. RD(TLS_DESC , DYNAMIC , N, DATA , NONE , Y, -1, N)
  72. RD(THM_SWI8 , OBSOLETE, N, NONE , NONE , N, -1, N)
  73. RD(XPC25 , OBSOLETE, N, NONE , NONE , N, -1, N)
  74. RD(THM_XPC22 , OBSOLETE, N, NONE , NONE , N, -1, N)
  75. RD(TLS_DTPMOD32 , DYNAMIC , N, DATA , Module(S) , Y, -1, N)
  76. RD(TLS_DTPOFF32 , DYNAMIC , N, DATA , S + A - TLS , Y, -1, N)
  77. RD(TLS_TPOFF32 , DYNAMIC , N, DATA , S + A - tp , Y, -1, N)
  78. RD(COPY , DYNAMIC , N, MISC , NONE , Y, -1, N)
  79. RD(GLOB_DAT , DYNAMIC , N, DATA , (S + A) | T , Y, -1, N)
  80. RD(JUMP_SLOT , DYNAMIC , N, DATA , (S + A) | T , Y, -1, N)
  81. RD(RELATIVE , DYNAMIC , N, DATA , B(S) + A , Y, -1, N)
  82. RD(GOTOFF32 , STATIC , N, DATA , ((S + A) | T) - GOT_ORG, Y, -1, N)
  83. RD(BASE_PREL , STATIC , N, DATA , B(S) + A - P , Y, -1, N)
  84. RD(GOT_BREL , STATIC , N, DATA , GOT(S) + A - GOT_ORG , Y, -1, N)
  85. RD(PLT32 , STATIC , Y, ARM , ((S + A) | T) - P , Y, -1, Y)
  86. RD(CALL , STATIC , N, ARM , ((S + A) | T) - P , Y, -1, Y)
  87. RD(JUMP24 , STATIC , N, ARM , ((S + A) | T) - P , Y, -1, Y)
  88. RD(THM_JUMP24 , STATIC , N, THM32, ((S + A) | T) - P , Y, -1, Y)
  89. RD(BASE_ABS , STATIC , N, DATA , B(S) + A , Y, -1, N)
  90. RD(ALU_PCREL_7_0 , OBSOLETE, N, NONE , NONE , N, -1, N)
  91. RD(ALU_PCREL_15_8 , OBSOLETE, N, NONE , NONE , N, -1, N)
  92. RD(ALU_PCREL_23_15 , OBSOLETE, N, NONE , NONE , N, -1, N)
  93. RD(LDR_SBREL_11_0_NC , STATIC , Y, ARM , S + A - B(S) , N, -1, N)
  94. RD(ALU_SBREL_19_12_NC, STATIC , Y, ARM , S + A - B(S) , N, -1, N)
  95. RD(ALU_SBREL_27_20_CK, STATIC , Y, ARM , S + A - B(S) , N, -1, Y)
  96. RD(TARGET1 , STATIC , N, MISC , NONE , Y, -1, N)
  97. RD(SBREL31 , STATIC , Y, DATA , ((S + A) | T) - B(S) , N, -1, N)
  98. RD(V4BX , STATIC , N, MISC , NONE , Y, -1, N)
  99. RD(TARGET2 , STATIC , N, MISC , NONE , Y, -1, N)
  100. RD(PREL31 , STATIC , N, DATA , ((S + A) | T) - P , Y, -1, Y)
  101. RD(MOVW_ABS_NC , STATIC , N, ARM , (S + A) | T , Y, -1, N)
  102. RD(MOVT_ABS , STATIC , N, ARM , S + A , Y, -1, Y)
  103. RD(MOVW_PREL_NC , STATIC , N, ARM , ((S + A) | T) - P , Y, -1, N)
  104. RD(MOVT_PREL , STATIC , N, ARM , (S + A) - P , Y, -1, Y)
  105. RD(THM_MOVW_ABS_NC , STATIC , N, THM32, (S + A) | T , Y, -1, N)
  106. RD(THM_MOVT_ABS , STATIC , N, THM32, S + A , Y, -1, N)
  107. RD(THM_MOVW_PREL_NC , STATIC , N, THM32, ((S + A) | T) - P , Y, -1, N)
  108. RD(THM_MOVT_PREL , STATIC , N, THM32, S + A - P , Y, -1, N)
  109. RD(THM_JUMP19 , STATIC , N, THM32, ((S + A) | T) - P , Y, -1, Y)
  110. RD(THM_JUMP6 , STATIC , N, THM16, S + A - P , Y, -1, Y)
  111. RD(THM_ALU_PREL_11_0 , STATIC , N, THM32, ((S + A) | T) - Pa , Y, -1, Y)
  112. RD(THM_PC12 , STATIC , N, THM32, S + A - Pa , Y, -1, Y)
  113. RD(ABS32_NOI , STATIC , N, DATA , S + A , Y, -1, N)
  114. RD(REL32_NOI , STATIC , N, DATA , S + A - P , N, -1, N)
  115. RD(ALU_PC_G0_NC , STATIC , N, ARM , ((S + A) | T) - P , Y, 0, N)
  116. RD(ALU_PC_G0 , STATIC , N, ARM , ((S + A) | T) - P , Y, 0, Y)
  117. RD(ALU_PC_G1_NC , STATIC , N, ARM , ((S + A) | T) - P , Y, 1, N)
  118. RD(ALU_PC_G1 , STATIC , N, ARM , ((S + A) | T) - P , Y, 1, Y)
  119. RD(ALU_PC_G2 , STATIC , N, ARM , ((S + A) | T) - P , Y, 2, Y)
  120. RD(LDR_PC_G1 , STATIC , N, ARM , S + A - P , Y, 1, Y)
  121. RD(LDR_PC_G2 , STATIC , N, ARM , S + A - P , Y, 2, Y)
  122. RD(LDRS_PC_G0 , STATIC , N, ARM , S + A - P , Y, 0, Y)
  123. RD(LDRS_PC_G1 , STATIC , N, ARM , S + A - P , Y, 1, Y)
  124. RD(LDRS_PC_G2 , STATIC , N, ARM , S + A - P , Y, 2, Y)
  125. RD(LDC_PC_G0 , STATIC , N, ARM , S + A - P , Y, 0, Y)
  126. RD(LDC_PC_G1 , STATIC , N, ARM , S + A - P , Y, 1, Y)
  127. RD(LDC_PC_G2 , STATIC , N, ARM , S + A - P , Y, 2, Y)
  128. RD(ALU_SB_G0_NC , STATIC , N, ARM , ((S + A) | T) - B(S) , Y, 0, N)
  129. RD(ALU_SB_G0 , STATIC , N, ARM , ((S + A) | T) - B(S) , Y, 0, Y)
  130. RD(ALU_SB_G1_NC , STATIC , N, ARM , ((S + A) | T) - B(S) , Y, 1, N)
  131. RD(ALU_SB_G1 , STATIC , N, ARM , ((S + A) | T) - B(S) , Y, 1, Y)
  132. RD(ALU_SB_G2 , STATIC , N, ARM , ((S + A) | T) - B(S) , Y, 2, Y)
  133. RD(LDR_SB_G0 , STATIC , N, ARM , S + A - B(S) , Y, 0, Y)
  134. RD(LDR_SB_G1 , STATIC , N, ARM , S + A - B(S) , Y, 1, Y)
  135. RD(LDR_SB_G2 , STATIC , N, ARM , S + A - B(S) , Y, 2, Y)
  136. RD(LDRS_SB_G0 , STATIC , N, ARM , S + A - B(S) , Y, 0, Y)
  137. RD(LDRS_SB_G1 , STATIC , N, ARM , S + A - B(S) , Y, 1, Y)
  138. RD(LDRS_SB_G2 , STATIC , N, ARM , S + A - B(S) , Y, 2, Y)
  139. RD(LDC_SB_G0 , STATIC , N, ARM , S + A - B(S) , Y, 0, Y)
  140. RD(LDC_SB_G1 , STATIC , N, ARM , S + A - B(S) , Y, 1, Y)
  141. RD(LDC_SB_G2 , STATIC , N, ARM , S + A - B(S) , Y, 2, Y)
  142. RD(MOVW_BREL_NC , STATIC , N, ARM , ((S + A) | T) - B(S) , Y, -1, N)
  143. RD(MOVT_BREL , STATIC , N, ARM , S + A - B(S) , Y, -1, Y)
  144. RD(MOVW_BREL , STATIC , N, ARM , ((S + A) | T) - B(S) , Y, -1, Y)
  145. RD(THM_MOVW_BREL_NC , STATIC , N, THM32, ((S + A) | T) - B(S) , Y, -1, N)
  146. RD(THM_MOVT_BREL , STATIC , N, THM32, S + A - B(S) , Y, -1, N)
  147. RD(THM_MOVW_BREL , STATIC , N, THM32, ((S + A) | T) - B(S) , Y, -1, Y)
  148. RD(TLS_GOTDESC , STATIC , N, DATA , NONE , Y, -1, N)
  149. RD(TLS_CALL , STATIC , N, ARM , NONE , N, -1, Y)
  150. RD(TLS_DESCSEQ , STATIC , N, ARM , NONE , N, -1, Y)
  151. RD(THM_TLS_CALL , STATIC , N, THM32, NONE , N, -1, Y)
  152. RD(PLT32_ABS , STATIC , N, DATA , PLT(S) + A , N, -1, N)
  153. RD(GOT_ABS , STATIC , N, DATA , GOT(S) + A , N, -1, N)
  154. RD(GOT_PREL , STATIC , N, DATA , GOT(S) + A - P , Y, -1, N)
  155. RD(GOT_BREL12 , STATIC , N, ARM , GOT(S) + A - GOT_ORG , N, -1, Y)
  156. RD(GOTOFF12 , STATIC , N, ARM , S + A - GOT_ORG , N, -1, Y)
  157. RD(GOTRELAX , STATIC , N, MISC , NONE , N, -1, N)
  158. RD(GNU_VTENTRY , STATIC , Y, DATA , NONE , Y, -1, N)
  159. RD(GNU_VTINHERIT , STATIC , Y, DATA , NONE , Y, -1, N)
  160. RD(THM_JUMP11 , STATIC , N, THM16, S + A - P , Y, -1, Y)
  161. RD(THM_JUMP8 , STATIC , N, THM16, S + A - P , Y, -1, Y)
  162. RD(TLS_GD32 , STATIC , N, DATA , GOT(S) + A - P , Y, -1, N)
  163. RD(TLS_LDM32 , STATIC , N, DATA , GOT(S) + A - P , Y, -1, N)
  164. RD(TLS_LDO32 , STATIC , N, DATA , S + A - TLS , Y, -1, N)
  165. RD(TLS_IE32 , STATIC , N, DATA , GOT(S) + A - P , Y, -1, N)
  166. RD(TLS_LE32 , STATIC , N, DATA , S + A - tp , Y, -1, N)
  167. RD(TLS_LDO12 , STATIC , N, ARM , S + A - TLS , N, -1, Y)
  168. RD(TLS_LE12 , STATIC , N, ARM , S + A - tp , N, -1, Y)
  169. RD(TLS_IE12GP , STATIC , N, ARM , GOT(S) + A - GOT_ORG , N, -1, Y)
  170. RD(PRIVATE_0 , PRIVATE , N, NONE , NONE , N, -1, N)
  171. RD(PRIVATE_1 , PRIVATE , N, NONE , NONE , N, -1, N)
  172. RD(PRIVATE_2 , PRIVATE , N, NONE , NONE , N, -1, N)
  173. RD(PRIVATE_3 , PRIVATE , N, NONE , NONE , N, -1, N)
  174. RD(PRIVATE_4 , PRIVATE , N, NONE , NONE , N, -1, N)
  175. RD(PRIVATE_5 , PRIVATE , N, NONE , NONE , N, -1, N)
  176. RD(PRIVATE_6 , PRIVATE , N, NONE , NONE , N, -1, N)
  177. RD(PRIVATE_7 , PRIVATE , N, NONE , NONE , N, -1, N)
  178. RD(PRIVATE_8 , PRIVATE , N, NONE , NONE , N, -1, N)
  179. RD(PRIVATE_9 , PRIVATE , N, NONE , NONE , N, -1, N)
  180. RD(PRIVATE_10 , PRIVATE , N, NONE , NONE , N, -1, N)
  181. RD(PRIVATE_11 , PRIVATE , N, NONE , NONE , N, -1, N)
  182. RD(PRIVATE_12 , PRIVATE , N, NONE , NONE , N, -1, N)
  183. RD(PRIVATE_13 , PRIVATE , N, NONE , NONE , N, -1, N)
  184. RD(PRIVATE_14 , PRIVATE , N, NONE , NONE , N, -1, N)
  185. RD(PRIVATE_15 , PRIVATE , N, NONE , NONE , N, -1, N)
  186. RD(ME_TOO , OBSOLETE, N, NONE , NONE , N, -1, N)
  187. RD(THM_TLS_DESCSEQ16 , STATIC , N, THM16, NONE , N, -1, Y)
  188. RD(THM_TLS_DESCSEQ32 , STATIC , N, THM32, NONE , N, -1, Y)