|
| 1 | +//===- relocations.dl ---------------------------------------*- datalog -*-===// |
| 2 | +// |
| 3 | +// Copyright (C) 2019-2022 GrammaTech, Inc. |
| 4 | +// |
| 5 | +// This code is licensed under the GNU Affero General Public License |
| 6 | +// as published by the Free Software Foundation, either version 3 of |
| 7 | +// the License, or (at your option) any later version. See the |
| 8 | +// LICENSE.txt file in the project root for license terms or visit |
| 9 | +// https://www.gnu.org/licenses/agpl.txt. |
| 10 | +// |
| 11 | +// This program is distributed in the hope that it will be useful, |
| 12 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | +// GNU Affero General Public License for more details. |
| 15 | +// |
| 16 | +// This project is sponsored by the Office of Naval Research, One Liberty |
| 17 | +// Center, 875 N. Randolph Street, Arlington, VA 22203 under contract # |
| 18 | +// N68335-17-C-0700. The content of the information does not necessarily |
| 19 | +// reflect the position or policy of the Government and no official |
| 20 | +// endorsement should be inferred. |
| 21 | +// |
| 22 | +//===----------------------------------------------------------------------===// |
| 23 | + |
| 24 | +/** |
| 25 | +Table maps ARM32 ELF relocation types to a size in bits. |
| 26 | +*/ |
| 27 | + |
| 28 | +elf_relocation_size("ARM", "NONE", 0). |
| 29 | +elf_relocation_size("ARM", "PC24", 24). |
| 30 | +elf_relocation_size("ARM", "ABS32", 32). |
| 31 | +elf_relocation_size("ARM", "REL32", 32). |
| 32 | +elf_relocation_size("ARM", "LDR_PC_G0", 32). |
| 33 | +elf_relocation_size("ARM", "ABS16", 16). |
| 34 | +elf_relocation_size("ARM", "ABS12", 12). |
| 35 | +elf_relocation_size("ARM", "THM_ABS5", 5). |
| 36 | +elf_relocation_size("ARM", "ABS8", 8). |
| 37 | +elf_relocation_size("ARM", "SBREL32", 32). |
| 38 | +elf_relocation_size("ARM", "THM_CALL", 25). |
| 39 | +elf_relocation_size("ARM", "THM_PC8", 8). |
| 40 | +elf_relocation_size("ARM", "BREL_ADJ", 32). |
| 41 | +elf_relocation_size("ARM", "TLS_DESC", 0). |
| 42 | +elf_relocation_size("ARM", "THM_SWI8", 0). |
| 43 | +elf_relocation_size("ARM", "XPC25", 25). |
| 44 | +elf_relocation_size("ARM", "THM_XPC22", 22). |
| 45 | +elf_relocation_size("ARM", "TLS_DTPMOD32", 32). |
| 46 | +elf_relocation_size("ARM", "TLS_DTPOFF32", 32). |
| 47 | +elf_relocation_size("ARM", "TLS_TPOFF32", 32). |
| 48 | +elf_relocation_size("ARM", "COPY", 32). |
| 49 | +elf_relocation_size("ARM", "GLOB_DAT", 32). |
| 50 | +elf_relocation_size("ARM", "JUMP_SLOT", 32). |
| 51 | +elf_relocation_size("ARM", "RELATIVE", 32). |
| 52 | +elf_relocation_size("ARM", "GOTOFF32", 32). |
| 53 | +elf_relocation_size("ARM", "BASE_PREL", 32). |
| 54 | +elf_relocation_size("ARM", "GOT_BREL", 32). |
| 55 | +elf_relocation_size("ARM", "PLT32", 24). |
| 56 | +elf_relocation_size("ARM", "CALL", 24). |
| 57 | +elf_relocation_size("ARM", "JUMP24", 24). |
| 58 | +elf_relocation_size("ARM", "THM_JUMP24", 24). |
| 59 | +elf_relocation_size("ARM", "BASE_ABS", 21). |
| 60 | +elf_relocation_size("ARM", "ALU_PCREL_7_0", 12). |
| 61 | +elf_relocation_size("ARM", "ALU_PCREL_15_8", 12). |
| 62 | +elf_relocation_size("ARM", "ALU_PCREL_23_15", 12). |
| 63 | +elf_relocation_size("ARM", "LDR_SBREL_11_0_NC", 12). |
| 64 | +elf_relocation_size("ARM", "ALU_SBREL_19_12_NC", 8). |
| 65 | +elf_relocation_size("ARM", "ALU_SBREL_27_20_CK", 8). |
| 66 | +elf_relocation_size("ARM", "TARGET1", 32). |
| 67 | +elf_relocation_size("ARM", "SBREL31", 32). |
| 68 | +elf_relocation_size("ARM", "V4BX", 32). |
| 69 | +elf_relocation_size("ARM", "TARGET2", 32). |
| 70 | +elf_relocation_size("ARM", "PREL31", 31). |
| 71 | +elf_relocation_size("ARM", "MOVW_ABS_NC", 16). |
| 72 | +elf_relocation_size("ARM", "MOVT_ABS", 16). |
| 73 | +elf_relocation_size("ARM", "MOVW_PREL_NC", 16). |
| 74 | +elf_relocation_size("ARM", "MOVT_PREL", 16). |
| 75 | +elf_relocation_size("ARM", "THM_MOVW_ABS_NC", 16). |
| 76 | +elf_relocation_size("ARM", "THM_MOVT_ABS", 16). |
| 77 | +elf_relocation_size("ARM", "THM_MOVW_PREL_NC", 16). |
| 78 | +elf_relocation_size("ARM", "THM_MOVT_PREL", 16). |
| 79 | +elf_relocation_size("ARM", "THM_JUMP19", 19). |
| 80 | +elf_relocation_size("ARM", "THM_JUMP6", 6). |
| 81 | +elf_relocation_size("ARM", "THM_ALU_PREL_11_0", 13). |
| 82 | +elf_relocation_size("ARM", "THM_PC12", 13). |
| 83 | +elf_relocation_size("ARM", "ABS32_NOI", 32). |
| 84 | +elf_relocation_size("ARM", "REL32_NOI", 32). |
| 85 | +elf_relocation_size("ARM", "ALU_PC_G0_NC", 32). |
| 86 | +elf_relocation_size("ARM", "ALU_PC_G0", 32). |
| 87 | +elf_relocation_size("ARM", "ALU_PC_G1_NC", 32). |
| 88 | +elf_relocation_size("ARM", "ALU_PC_G1", 32). |
| 89 | +elf_relocation_size("ARM", "ALU_PC_G2", 32). |
| 90 | +elf_relocation_size("ARM", "LDR_PC_G1", 32). |
| 91 | +elf_relocation_size("ARM", "LDR_PC_G2", 32). |
| 92 | +elf_relocation_size("ARM", "LDRS_PC_G0", 32). |
| 93 | +elf_relocation_size("ARM", "LDRS_PC_G1", 32). |
| 94 | +elf_relocation_size("ARM", "LDRS_PC_G2", 32). |
| 95 | +elf_relocation_size("ARM", "LDC_PC_G0", 32). |
| 96 | +elf_relocation_size("ARM", "LDC_PC_G1", 32). |
| 97 | +elf_relocation_size("ARM", "LDC_PC_G2", 32). |
| 98 | +elf_relocation_size("ARM", "ALU_SB_G0_NC", 32). |
| 99 | +elf_relocation_size("ARM", "ALU_SB_G0", 32). |
| 100 | +elf_relocation_size("ARM", "ALU_SB_G1_NC", 32). |
| 101 | +elf_relocation_size("ARM", "ALU_SB_G1", 32). |
| 102 | +elf_relocation_size("ARM", "ALU_SB_G2", 32). |
| 103 | +elf_relocation_size("ARM", "LDR_SB_G0", 32). |
| 104 | +elf_relocation_size("ARM", "LDR_SB_G1", 32). |
| 105 | +elf_relocation_size("ARM", "LDR_SB_G2", 32). |
| 106 | +elf_relocation_size("ARM", "LDRS_SB_G0", 32). |
| 107 | +elf_relocation_size("ARM", "LDRS_SB_G1", 32). |
| 108 | +elf_relocation_size("ARM", "LDRS_SB_G2", 32). |
| 109 | +elf_relocation_size("ARM", "LDC_SB_G0", 32). |
| 110 | +elf_relocation_size("ARM", "LDC_SB_G1", 32). |
| 111 | +elf_relocation_size("ARM", "LDC_SB_G2", 32). |
| 112 | +elf_relocation_size("ARM", "MOVW_BREL_NC", 16). |
| 113 | +elf_relocation_size("ARM", "MOVT_BREL", 16). |
| 114 | +elf_relocation_size("ARM", "MOVW_BREL", 16). |
| 115 | +elf_relocation_size("ARM", "THM_MOVW_BREL_NC", 16). |
| 116 | +elf_relocation_size("ARM", "THM_MOVT_BREL", 16). |
| 117 | +elf_relocation_size("ARM", "THM_MOVW_BREL", 16). |
| 118 | +elf_relocation_size("ARM", "TLS_GOTDESC", 0). |
| 119 | +elf_relocation_size("ARM", "TLS_CALL", 0). |
| 120 | +elf_relocation_size("ARM", "TLS_DESCSEQ", 0). |
| 121 | +elf_relocation_size("ARM", "THM_TLS_CALL", 0). |
| 122 | +elf_relocation_size("ARM", "PLT32_ABS", 32). |
| 123 | +elf_relocation_size("ARM", "GOT_ABS", 32). |
| 124 | +elf_relocation_size("ARM", "GOT_PREL", 32). |
| 125 | +elf_relocation_size("ARM", "GOT_BREL12", 12). |
| 126 | +elf_relocation_size("ARM", "GOTOFF12", 12). |
| 127 | +elf_relocation_size("ARM", "GOTRELAX", 12). |
| 128 | +elf_relocation_size("ARM", "GNU_VTENTRY", 0). |
| 129 | +elf_relocation_size("ARM", "GNU_VTINHERIT", 0). |
| 130 | +elf_relocation_size("ARM", "THM_JUMP11", 11). |
| 131 | +elf_relocation_size("ARM", "THM_JUMP8", 8). |
| 132 | +elf_relocation_size("ARM", "TLS_GD32", 32). |
| 133 | +elf_relocation_size("ARM", "TLS_LDM32", 32). |
| 134 | +elf_relocation_size("ARM", "TLS_LDO32", 32). |
| 135 | +elf_relocation_size("ARM", "TLS_IE32", 32). |
| 136 | +elf_relocation_size("ARM", "TLS_LE32", 32). |
| 137 | +elf_relocation_size("ARM", "TLS_LDO12", 12). |
| 138 | +elf_relocation_size("ARM", "TLS_LE12", 12). |
| 139 | +elf_relocation_size("ARM", "TLS_IE12GP", 12). |
| 140 | +elf_relocation_size("ARM", "PRIVATE_0", 0). |
| 141 | +elf_relocation_size("ARM", "PRIVATE_1", 0). |
| 142 | +elf_relocation_size("ARM", "PRIVATE_2", 0). |
| 143 | +elf_relocation_size("ARM", "PRIVATE_3", 0). |
| 144 | +elf_relocation_size("ARM", "PRIVATE_4", 0). |
| 145 | +elf_relocation_size("ARM", "PRIVATE_5", 0). |
| 146 | +elf_relocation_size("ARM", "PRIVATE_6", 0). |
| 147 | +elf_relocation_size("ARM", "PRIVATE_7", 0). |
| 148 | +elf_relocation_size("ARM", "PRIVATE_8", 0). |
| 149 | +elf_relocation_size("ARM", "PRIVATE_9", 0). |
| 150 | +elf_relocation_size("ARM", "PRIVATE_10", 0). |
| 151 | +elf_relocation_size("ARM", "PRIVATE_11", 0). |
| 152 | +elf_relocation_size("ARM", "PRIVATE_12", 0). |
| 153 | +elf_relocation_size("ARM", "PRIVATE_13", 0). |
| 154 | +elf_relocation_size("ARM", "PRIVATE_14", 0). |
| 155 | +elf_relocation_size("ARM", "PRIVATE_15", 0). |
| 156 | +elf_relocation_size("ARM", "ME_TOO", 0). |
| 157 | +elf_relocation_size("ARM", "THM_TLS_DESCSEQ16", 0). |
| 158 | +elf_relocation_size("ARM", "THM_TLS_DESCSEQ32", 0). |
| 159 | +elf_relocation_size("ARM", "IRELATIVE", 0). |
| 160 | +elf_relocation_size("ARM", "RXPC25", 25). |
| 161 | +elf_relocation_size("ARM", "RSBREL32", 32). |
| 162 | +elf_relocation_size("ARM", "THM_RPC22", 22). |
| 163 | +elf_relocation_size("ARM", "RREL32", 32). |
| 164 | +elf_relocation_size("ARM", "RPC24", 24). |
| 165 | +elf_relocation_size("ARM", "RBASE", 0). |
0 commit comments