github.com/primecitizens/pcz/std@v0.2.1/encoding/binfmt/elf/relocation.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 // 4 // Copyright 2009 The Go Authors. All rights reserved. 5 // Use of this source code is governed by a BSD-style 6 // license that can be found in the LICENSE file. 7 8 package elf 9 10 /* 11 * Relocation types. 12 */ 13 14 // Relocation types for x86-64. 15 type R_X86_64 int 16 17 const ( 18 R_X86_64_NONE R_X86_64 = 0 /* No relocation. */ 19 R_X86_64_64 R_X86_64 = 1 /* Add 64 bit symbol value. */ 20 R_X86_64_PC32 R_X86_64 = 2 /* PC-relative 32 bit signed sym value. */ 21 R_X86_64_GOT32 R_X86_64 = 3 /* PC-relative 32 bit GOT offset. */ 22 R_X86_64_PLT32 R_X86_64 = 4 /* PC-relative 32 bit PLT offset. */ 23 R_X86_64_COPY R_X86_64 = 5 /* Copy data from shared object. */ 24 R_X86_64_GLOB_DAT R_X86_64 = 6 /* Set GOT entry to data address. */ 25 R_X86_64_JMP_SLOT R_X86_64 = 7 /* Set GOT entry to code address. */ 26 R_X86_64_RELATIVE R_X86_64 = 8 /* Add load address of shared object. */ 27 R_X86_64_GOTPCREL R_X86_64 = 9 /* Add 32 bit signed pcrel offset to GOT. */ 28 R_X86_64_32 R_X86_64 = 10 /* Add 32 bit zero extended symbol value */ 29 R_X86_64_32S R_X86_64 = 11 /* Add 32 bit sign extended symbol value */ 30 R_X86_64_16 R_X86_64 = 12 /* Add 16 bit zero extended symbol value */ 31 R_X86_64_PC16 R_X86_64 = 13 /* Add 16 bit signed extended pc relative symbol value */ 32 R_X86_64_8 R_X86_64 = 14 /* Add 8 bit zero extended symbol value */ 33 R_X86_64_PC8 R_X86_64 = 15 /* Add 8 bit signed extended pc relative symbol value */ 34 R_X86_64_DTPMOD64 R_X86_64 = 16 /* ID of module containing symbol */ 35 R_X86_64_DTPOFF64 R_X86_64 = 17 /* Offset in TLS block */ 36 R_X86_64_TPOFF64 R_X86_64 = 18 /* Offset in static TLS block */ 37 R_X86_64_TLSGD R_X86_64 = 19 /* PC relative offset to GD GOT entry */ 38 R_X86_64_TLSLD R_X86_64 = 20 /* PC relative offset to LD GOT entry */ 39 R_X86_64_DTPOFF32 R_X86_64 = 21 /* Offset in TLS block */ 40 R_X86_64_GOTTPOFF R_X86_64 = 22 /* PC relative offset to IE GOT entry */ 41 R_X86_64_TPOFF32 R_X86_64 = 23 /* Offset in static TLS block */ 42 R_X86_64_PC64 R_X86_64 = 24 /* PC relative 64-bit sign extended symbol value. */ 43 R_X86_64_GOTOFF64 R_X86_64 = 25 44 R_X86_64_GOTPC32 R_X86_64 = 26 45 R_X86_64_GOT64 R_X86_64 = 27 46 R_X86_64_GOTPCREL64 R_X86_64 = 28 47 R_X86_64_GOTPC64 R_X86_64 = 29 48 R_X86_64_GOTPLT64 R_X86_64 = 30 49 R_X86_64_PLTOFF64 R_X86_64 = 31 50 R_X86_64_SIZE32 R_X86_64 = 32 51 R_X86_64_SIZE64 R_X86_64 = 33 52 R_X86_64_GOTPC32_TLSDESC R_X86_64 = 34 53 R_X86_64_TLSDESC_CALL R_X86_64 = 35 54 R_X86_64_TLSDESC R_X86_64 = 36 55 R_X86_64_IRELATIVE R_X86_64 = 37 56 R_X86_64_RELATIVE64 R_X86_64 = 38 57 R_X86_64_PC32_BND R_X86_64 = 39 58 R_X86_64_PLT32_BND R_X86_64 = 40 59 R_X86_64_GOTPCRELX R_X86_64 = 41 60 R_X86_64_REX_GOTPCRELX R_X86_64 = 42 61 ) 62 63 // Relocation types for AArch64 (aka arm64) 64 type R_AARCH64 int 65 66 const ( 67 R_AARCH64_NONE R_AARCH64 = 0 68 R_AARCH64_P32_ABS32 R_AARCH64 = 1 69 R_AARCH64_P32_ABS16 R_AARCH64 = 2 70 R_AARCH64_P32_PREL32 R_AARCH64 = 3 71 R_AARCH64_P32_PREL16 R_AARCH64 = 4 72 R_AARCH64_P32_MOVW_UABS_G0 R_AARCH64 = 5 73 R_AARCH64_P32_MOVW_UABS_G0_NC R_AARCH64 = 6 74 R_AARCH64_P32_MOVW_UABS_G1 R_AARCH64 = 7 75 R_AARCH64_P32_MOVW_SABS_G0 R_AARCH64 = 8 76 R_AARCH64_P32_LD_PREL_LO19 R_AARCH64 = 9 77 R_AARCH64_P32_ADR_PREL_LO21 R_AARCH64 = 10 78 R_AARCH64_P32_ADR_PREL_PG_HI21 R_AARCH64 = 11 79 R_AARCH64_P32_ADD_ABS_LO12_NC R_AARCH64 = 12 80 R_AARCH64_P32_LDST8_ABS_LO12_NC R_AARCH64 = 13 81 R_AARCH64_P32_LDST16_ABS_LO12_NC R_AARCH64 = 14 82 R_AARCH64_P32_LDST32_ABS_LO12_NC R_AARCH64 = 15 83 R_AARCH64_P32_LDST64_ABS_LO12_NC R_AARCH64 = 16 84 R_AARCH64_P32_LDST128_ABS_LO12_NC R_AARCH64 = 17 85 R_AARCH64_P32_TSTBR14 R_AARCH64 = 18 86 R_AARCH64_P32_CONDBR19 R_AARCH64 = 19 87 R_AARCH64_P32_JUMP26 R_AARCH64 = 20 88 R_AARCH64_P32_CALL26 R_AARCH64 = 21 89 R_AARCH64_P32_GOT_LD_PREL19 R_AARCH64 = 25 90 R_AARCH64_P32_ADR_GOT_PAGE R_AARCH64 = 26 91 R_AARCH64_P32_LD32_GOT_LO12_NC R_AARCH64 = 27 92 R_AARCH64_P32_TLSGD_ADR_PAGE21 R_AARCH64 = 81 93 R_AARCH64_P32_TLSGD_ADD_LO12_NC R_AARCH64 = 82 94 R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21 R_AARCH64 = 103 95 R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC R_AARCH64 = 104 96 R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19 R_AARCH64 = 105 97 R_AARCH64_P32_TLSLE_MOVW_TPREL_G1 R_AARCH64 = 106 98 R_AARCH64_P32_TLSLE_MOVW_TPREL_G0 R_AARCH64 = 107 99 R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC R_AARCH64 = 108 100 R_AARCH64_P32_TLSLE_ADD_TPREL_HI12 R_AARCH64 = 109 101 R_AARCH64_P32_TLSLE_ADD_TPREL_LO12 R_AARCH64 = 110 102 R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC R_AARCH64 = 111 103 R_AARCH64_P32_TLSDESC_LD_PREL19 R_AARCH64 = 122 104 R_AARCH64_P32_TLSDESC_ADR_PREL21 R_AARCH64 = 123 105 R_AARCH64_P32_TLSDESC_ADR_PAGE21 R_AARCH64 = 124 106 R_AARCH64_P32_TLSDESC_LD32_LO12_NC R_AARCH64 = 125 107 R_AARCH64_P32_TLSDESC_ADD_LO12_NC R_AARCH64 = 126 108 R_AARCH64_P32_TLSDESC_CALL R_AARCH64 = 127 109 R_AARCH64_P32_COPY R_AARCH64 = 180 110 R_AARCH64_P32_GLOB_DAT R_AARCH64 = 181 111 R_AARCH64_P32_JUMP_SLOT R_AARCH64 = 182 112 R_AARCH64_P32_RELATIVE R_AARCH64 = 183 113 R_AARCH64_P32_TLS_DTPMOD R_AARCH64 = 184 114 R_AARCH64_P32_TLS_DTPREL R_AARCH64 = 185 115 R_AARCH64_P32_TLS_TPREL R_AARCH64 = 186 116 R_AARCH64_P32_TLSDESC R_AARCH64 = 187 117 R_AARCH64_P32_IRELATIVE R_AARCH64 = 188 118 R_AARCH64_NULL R_AARCH64 = 256 119 R_AARCH64_ABS64 R_AARCH64 = 257 120 R_AARCH64_ABS32 R_AARCH64 = 258 121 R_AARCH64_ABS16 R_AARCH64 = 259 122 R_AARCH64_PREL64 R_AARCH64 = 260 123 R_AARCH64_PREL32 R_AARCH64 = 261 124 R_AARCH64_PREL16 R_AARCH64 = 262 125 R_AARCH64_MOVW_UABS_G0 R_AARCH64 = 263 126 R_AARCH64_MOVW_UABS_G0_NC R_AARCH64 = 264 127 R_AARCH64_MOVW_UABS_G1 R_AARCH64 = 265 128 R_AARCH64_MOVW_UABS_G1_NC R_AARCH64 = 266 129 R_AARCH64_MOVW_UABS_G2 R_AARCH64 = 267 130 R_AARCH64_MOVW_UABS_G2_NC R_AARCH64 = 268 131 R_AARCH64_MOVW_UABS_G3 R_AARCH64 = 269 132 R_AARCH64_MOVW_SABS_G0 R_AARCH64 = 270 133 R_AARCH64_MOVW_SABS_G1 R_AARCH64 = 271 134 R_AARCH64_MOVW_SABS_G2 R_AARCH64 = 272 135 R_AARCH64_LD_PREL_LO19 R_AARCH64 = 273 136 R_AARCH64_ADR_PREL_LO21 R_AARCH64 = 274 137 R_AARCH64_ADR_PREL_PG_HI21 R_AARCH64 = 275 138 R_AARCH64_ADR_PREL_PG_HI21_NC R_AARCH64 = 276 139 R_AARCH64_ADD_ABS_LO12_NC R_AARCH64 = 277 140 R_AARCH64_LDST8_ABS_LO12_NC R_AARCH64 = 278 141 R_AARCH64_TSTBR14 R_AARCH64 = 279 142 R_AARCH64_CONDBR19 R_AARCH64 = 280 143 R_AARCH64_JUMP26 R_AARCH64 = 282 144 R_AARCH64_CALL26 R_AARCH64 = 283 145 R_AARCH64_LDST16_ABS_LO12_NC R_AARCH64 = 284 146 R_AARCH64_LDST32_ABS_LO12_NC R_AARCH64 = 285 147 R_AARCH64_LDST64_ABS_LO12_NC R_AARCH64 = 286 148 R_AARCH64_LDST128_ABS_LO12_NC R_AARCH64 = 299 149 R_AARCH64_GOT_LD_PREL19 R_AARCH64 = 309 150 R_AARCH64_LD64_GOTOFF_LO15 R_AARCH64 = 310 151 R_AARCH64_ADR_GOT_PAGE R_AARCH64 = 311 152 R_AARCH64_LD64_GOT_LO12_NC R_AARCH64 = 312 153 R_AARCH64_LD64_GOTPAGE_LO15 R_AARCH64 = 313 154 R_AARCH64_TLSGD_ADR_PREL21 R_AARCH64 = 512 155 R_AARCH64_TLSGD_ADR_PAGE21 R_AARCH64 = 513 156 R_AARCH64_TLSGD_ADD_LO12_NC R_AARCH64 = 514 157 R_AARCH64_TLSGD_MOVW_G1 R_AARCH64 = 515 158 R_AARCH64_TLSGD_MOVW_G0_NC R_AARCH64 = 516 159 R_AARCH64_TLSLD_ADR_PREL21 R_AARCH64 = 517 160 R_AARCH64_TLSLD_ADR_PAGE21 R_AARCH64 = 518 161 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 R_AARCH64 = 539 162 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC R_AARCH64 = 540 163 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 R_AARCH64 = 541 164 R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC R_AARCH64 = 542 165 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 R_AARCH64 = 543 166 R_AARCH64_TLSLE_MOVW_TPREL_G2 R_AARCH64 = 544 167 R_AARCH64_TLSLE_MOVW_TPREL_G1 R_AARCH64 = 545 168 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC R_AARCH64 = 546 169 R_AARCH64_TLSLE_MOVW_TPREL_G0 R_AARCH64 = 547 170 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC R_AARCH64 = 548 171 R_AARCH64_TLSLE_ADD_TPREL_HI12 R_AARCH64 = 549 172 R_AARCH64_TLSLE_ADD_TPREL_LO12 R_AARCH64 = 550 173 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC R_AARCH64 = 551 174 R_AARCH64_TLSDESC_LD_PREL19 R_AARCH64 = 560 175 R_AARCH64_TLSDESC_ADR_PREL21 R_AARCH64 = 561 176 R_AARCH64_TLSDESC_ADR_PAGE21 R_AARCH64 = 562 177 R_AARCH64_TLSDESC_LD64_LO12_NC R_AARCH64 = 563 178 R_AARCH64_TLSDESC_ADD_LO12_NC R_AARCH64 = 564 179 R_AARCH64_TLSDESC_OFF_G1 R_AARCH64 = 565 180 R_AARCH64_TLSDESC_OFF_G0_NC R_AARCH64 = 566 181 R_AARCH64_TLSDESC_LDR R_AARCH64 = 567 182 R_AARCH64_TLSDESC_ADD R_AARCH64 = 568 183 R_AARCH64_TLSDESC_CALL R_AARCH64 = 569 184 R_AARCH64_TLSLE_LDST128_TPREL_LO12 R_AARCH64 = 570 185 R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC R_AARCH64 = 571 186 R_AARCH64_TLSLD_LDST128_DTPREL_LO12 R_AARCH64 = 572 187 R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC R_AARCH64 = 573 188 R_AARCH64_COPY R_AARCH64 = 1024 189 R_AARCH64_GLOB_DAT R_AARCH64 = 1025 190 R_AARCH64_JUMP_SLOT R_AARCH64 = 1026 191 R_AARCH64_RELATIVE R_AARCH64 = 1027 192 R_AARCH64_TLS_DTPMOD64 R_AARCH64 = 1028 193 R_AARCH64_TLS_DTPREL64 R_AARCH64 = 1029 194 R_AARCH64_TLS_TPREL64 R_AARCH64 = 1030 195 R_AARCH64_TLSDESC R_AARCH64 = 1031 196 R_AARCH64_IRELATIVE R_AARCH64 = 1032 197 ) 198 199 // Relocation types for Alpha. 200 type R_ALPHA int 201 202 const ( 203 R_ALPHA_NONE R_ALPHA = 0 /* No reloc */ 204 R_ALPHA_REFLONG R_ALPHA = 1 /* Direct 32 bit */ 205 R_ALPHA_REFQUAD R_ALPHA = 2 /* Direct 64 bit */ 206 R_ALPHA_GPREL32 R_ALPHA = 3 /* GP relative 32 bit */ 207 R_ALPHA_LITERAL R_ALPHA = 4 /* GP relative 16 bit w/optimization */ 208 R_ALPHA_LITUSE R_ALPHA = 5 /* Optimization hint for LITERAL */ 209 R_ALPHA_GPDISP R_ALPHA = 6 /* Add displacement to GP */ 210 R_ALPHA_BRADDR R_ALPHA = 7 /* PC+4 relative 23 bit shifted */ 211 R_ALPHA_HINT R_ALPHA = 8 /* PC+4 relative 16 bit shifted */ 212 R_ALPHA_SREL16 R_ALPHA = 9 /* PC relative 16 bit */ 213 R_ALPHA_SREL32 R_ALPHA = 10 /* PC relative 32 bit */ 214 R_ALPHA_SREL64 R_ALPHA = 11 /* PC relative 64 bit */ 215 R_ALPHA_OP_PUSH R_ALPHA = 12 /* OP stack push */ 216 R_ALPHA_OP_STORE R_ALPHA = 13 /* OP stack pop and store */ 217 R_ALPHA_OP_PSUB R_ALPHA = 14 /* OP stack subtract */ 218 R_ALPHA_OP_PRSHIFT R_ALPHA = 15 /* OP stack right shift */ 219 R_ALPHA_GPVALUE R_ALPHA = 16 220 R_ALPHA_GPRELHIGH R_ALPHA = 17 221 R_ALPHA_GPRELLOW R_ALPHA = 18 222 R_ALPHA_IMMED_GP_16 R_ALPHA = 19 223 R_ALPHA_IMMED_GP_HI32 R_ALPHA = 20 224 R_ALPHA_IMMED_SCN_HI32 R_ALPHA = 21 225 R_ALPHA_IMMED_BR_HI32 R_ALPHA = 22 226 R_ALPHA_IMMED_LO32 R_ALPHA = 23 227 R_ALPHA_COPY R_ALPHA = 24 /* Copy symbol at runtime */ 228 R_ALPHA_GLOB_DAT R_ALPHA = 25 /* Create GOT entry */ 229 R_ALPHA_JMP_SLOT R_ALPHA = 26 /* Create PLT entry */ 230 R_ALPHA_RELATIVE R_ALPHA = 27 /* Adjust by program base */ 231 ) 232 233 // Relocation types for ARM. 234 type R_ARM int 235 236 const ( 237 R_ARM_NONE R_ARM = 0 /* No relocation. */ 238 R_ARM_PC24 R_ARM = 1 239 R_ARM_ABS32 R_ARM = 2 240 R_ARM_REL32 R_ARM = 3 241 R_ARM_PC13 R_ARM = 4 242 R_ARM_ABS16 R_ARM = 5 243 R_ARM_ABS12 R_ARM = 6 244 R_ARM_THM_ABS5 R_ARM = 7 245 R_ARM_ABS8 R_ARM = 8 246 R_ARM_SBREL32 R_ARM = 9 247 R_ARM_THM_PC22 R_ARM = 10 248 R_ARM_THM_PC8 R_ARM = 11 249 R_ARM_AMP_VCALL9 R_ARM = 12 250 R_ARM_SWI24 R_ARM = 13 251 R_ARM_THM_SWI8 R_ARM = 14 252 R_ARM_XPC25 R_ARM = 15 253 R_ARM_THM_XPC22 R_ARM = 16 254 R_ARM_TLS_DTPMOD32 R_ARM = 17 255 R_ARM_TLS_DTPOFF32 R_ARM = 18 256 R_ARM_TLS_TPOFF32 R_ARM = 19 257 R_ARM_COPY R_ARM = 20 /* Copy data from shared object. */ 258 R_ARM_GLOB_DAT R_ARM = 21 /* Set GOT entry to data address. */ 259 R_ARM_JUMP_SLOT R_ARM = 22 /* Set GOT entry to code address. */ 260 R_ARM_RELATIVE R_ARM = 23 /* Add load address of shared object. */ 261 R_ARM_GOTOFF R_ARM = 24 /* Add GOT-relative symbol address. */ 262 R_ARM_GOTPC R_ARM = 25 /* Add PC-relative GOT table address. */ 263 R_ARM_GOT32 R_ARM = 26 /* Add PC-relative GOT offset. */ 264 R_ARM_PLT32 R_ARM = 27 /* Add PC-relative PLT offset. */ 265 R_ARM_CALL R_ARM = 28 266 R_ARM_JUMP24 R_ARM = 29 267 R_ARM_THM_JUMP24 R_ARM = 30 268 R_ARM_BASE_ABS R_ARM = 31 269 R_ARM_ALU_PCREL_7_0 R_ARM = 32 270 R_ARM_ALU_PCREL_15_8 R_ARM = 33 271 R_ARM_ALU_PCREL_23_15 R_ARM = 34 272 R_ARM_LDR_SBREL_11_10_NC R_ARM = 35 273 R_ARM_ALU_SBREL_19_12_NC R_ARM = 36 274 R_ARM_ALU_SBREL_27_20_CK R_ARM = 37 275 R_ARM_TARGET1 R_ARM = 38 276 R_ARM_SBREL31 R_ARM = 39 277 R_ARM_V4BX R_ARM = 40 278 R_ARM_TARGET2 R_ARM = 41 279 R_ARM_PREL31 R_ARM = 42 280 R_ARM_MOVW_ABS_NC R_ARM = 43 281 R_ARM_MOVT_ABS R_ARM = 44 282 R_ARM_MOVW_PREL_NC R_ARM = 45 283 R_ARM_MOVT_PREL R_ARM = 46 284 R_ARM_THM_MOVW_ABS_NC R_ARM = 47 285 R_ARM_THM_MOVT_ABS R_ARM = 48 286 R_ARM_THM_MOVW_PREL_NC R_ARM = 49 287 R_ARM_THM_MOVT_PREL R_ARM = 50 288 R_ARM_THM_JUMP19 R_ARM = 51 289 R_ARM_THM_JUMP6 R_ARM = 52 290 R_ARM_THM_ALU_PREL_11_0 R_ARM = 53 291 R_ARM_THM_PC12 R_ARM = 54 292 R_ARM_ABS32_NOI R_ARM = 55 293 R_ARM_REL32_NOI R_ARM = 56 294 R_ARM_ALU_PC_G0_NC R_ARM = 57 295 R_ARM_ALU_PC_G0 R_ARM = 58 296 R_ARM_ALU_PC_G1_NC R_ARM = 59 297 R_ARM_ALU_PC_G1 R_ARM = 60 298 R_ARM_ALU_PC_G2 R_ARM = 61 299 R_ARM_LDR_PC_G1 R_ARM = 62 300 R_ARM_LDR_PC_G2 R_ARM = 63 301 R_ARM_LDRS_PC_G0 R_ARM = 64 302 R_ARM_LDRS_PC_G1 R_ARM = 65 303 R_ARM_LDRS_PC_G2 R_ARM = 66 304 R_ARM_LDC_PC_G0 R_ARM = 67 305 R_ARM_LDC_PC_G1 R_ARM = 68 306 R_ARM_LDC_PC_G2 R_ARM = 69 307 R_ARM_ALU_SB_G0_NC R_ARM = 70 308 R_ARM_ALU_SB_G0 R_ARM = 71 309 R_ARM_ALU_SB_G1_NC R_ARM = 72 310 R_ARM_ALU_SB_G1 R_ARM = 73 311 R_ARM_ALU_SB_G2 R_ARM = 74 312 R_ARM_LDR_SB_G0 R_ARM = 75 313 R_ARM_LDR_SB_G1 R_ARM = 76 314 R_ARM_LDR_SB_G2 R_ARM = 77 315 R_ARM_LDRS_SB_G0 R_ARM = 78 316 R_ARM_LDRS_SB_G1 R_ARM = 79 317 R_ARM_LDRS_SB_G2 R_ARM = 80 318 R_ARM_LDC_SB_G0 R_ARM = 81 319 R_ARM_LDC_SB_G1 R_ARM = 82 320 R_ARM_LDC_SB_G2 R_ARM = 83 321 R_ARM_MOVW_BREL_NC R_ARM = 84 322 R_ARM_MOVT_BREL R_ARM = 85 323 R_ARM_MOVW_BREL R_ARM = 86 324 R_ARM_THM_MOVW_BREL_NC R_ARM = 87 325 R_ARM_THM_MOVT_BREL R_ARM = 88 326 R_ARM_THM_MOVW_BREL R_ARM = 89 327 R_ARM_TLS_GOTDESC R_ARM = 90 328 R_ARM_TLS_CALL R_ARM = 91 329 R_ARM_TLS_DESCSEQ R_ARM = 92 330 R_ARM_THM_TLS_CALL R_ARM = 93 331 R_ARM_PLT32_ABS R_ARM = 94 332 R_ARM_GOT_ABS R_ARM = 95 333 R_ARM_GOT_PREL R_ARM = 96 334 R_ARM_GOT_BREL12 R_ARM = 97 335 R_ARM_GOTOFF12 R_ARM = 98 336 R_ARM_GOTRELAX R_ARM = 99 337 R_ARM_GNU_VTENTRY R_ARM = 100 338 R_ARM_GNU_VTINHERIT R_ARM = 101 339 R_ARM_THM_JUMP11 R_ARM = 102 340 R_ARM_THM_JUMP8 R_ARM = 103 341 R_ARM_TLS_GD32 R_ARM = 104 342 R_ARM_TLS_LDM32 R_ARM = 105 343 R_ARM_TLS_LDO32 R_ARM = 106 344 R_ARM_TLS_IE32 R_ARM = 107 345 R_ARM_TLS_LE32 R_ARM = 108 346 R_ARM_TLS_LDO12 R_ARM = 109 347 R_ARM_TLS_LE12 R_ARM = 110 348 R_ARM_TLS_IE12GP R_ARM = 111 349 R_ARM_PRIVATE_0 R_ARM = 112 350 R_ARM_PRIVATE_1 R_ARM = 113 351 R_ARM_PRIVATE_2 R_ARM = 114 352 R_ARM_PRIVATE_3 R_ARM = 115 353 R_ARM_PRIVATE_4 R_ARM = 116 354 R_ARM_PRIVATE_5 R_ARM = 117 355 R_ARM_PRIVATE_6 R_ARM = 118 356 R_ARM_PRIVATE_7 R_ARM = 119 357 R_ARM_PRIVATE_8 R_ARM = 120 358 R_ARM_PRIVATE_9 R_ARM = 121 359 R_ARM_PRIVATE_10 R_ARM = 122 360 R_ARM_PRIVATE_11 R_ARM = 123 361 R_ARM_PRIVATE_12 R_ARM = 124 362 R_ARM_PRIVATE_13 R_ARM = 125 363 R_ARM_PRIVATE_14 R_ARM = 126 364 R_ARM_PRIVATE_15 R_ARM = 127 365 R_ARM_ME_TOO R_ARM = 128 366 R_ARM_THM_TLS_DESCSEQ16 R_ARM = 129 367 R_ARM_THM_TLS_DESCSEQ32 R_ARM = 130 368 R_ARM_THM_GOT_BREL12 R_ARM = 131 369 R_ARM_THM_ALU_ABS_G0_NC R_ARM = 132 370 R_ARM_THM_ALU_ABS_G1_NC R_ARM = 133 371 R_ARM_THM_ALU_ABS_G2_NC R_ARM = 134 372 R_ARM_THM_ALU_ABS_G3 R_ARM = 135 373 R_ARM_IRELATIVE R_ARM = 160 374 R_ARM_RXPC25 R_ARM = 249 375 R_ARM_RSBREL32 R_ARM = 250 376 R_ARM_THM_RPC22 R_ARM = 251 377 R_ARM_RREL32 R_ARM = 252 378 R_ARM_RABS32 R_ARM = 253 379 R_ARM_RPC24 R_ARM = 254 380 R_ARM_RBASE R_ARM = 255 381 ) 382 383 // Relocation types for 386. 384 type R_386 int 385 386 const ( 387 R_386_NONE R_386 = 0 /* No relocation. */ 388 R_386_32 R_386 = 1 /* Add symbol value. */ 389 R_386_PC32 R_386 = 2 /* Add PC-relative symbol value. */ 390 R_386_GOT32 R_386 = 3 /* Add PC-relative GOT offset. */ 391 R_386_PLT32 R_386 = 4 /* Add PC-relative PLT offset. */ 392 R_386_COPY R_386 = 5 /* Copy data from shared object. */ 393 R_386_GLOB_DAT R_386 = 6 /* Set GOT entry to data address. */ 394 R_386_JMP_SLOT R_386 = 7 /* Set GOT entry to code address. */ 395 R_386_RELATIVE R_386 = 8 /* Add load address of shared object. */ 396 R_386_GOTOFF R_386 = 9 /* Add GOT-relative symbol address. */ 397 R_386_GOTPC R_386 = 10 /* Add PC-relative GOT table address. */ 398 R_386_32PLT R_386 = 11 399 R_386_TLS_TPOFF R_386 = 14 /* Negative offset in static TLS block */ 400 R_386_TLS_IE R_386 = 15 /* Absolute address of GOT for -ve static TLS */ 401 R_386_TLS_GOTIE R_386 = 16 /* GOT entry for negative static TLS block */ 402 R_386_TLS_LE R_386 = 17 /* Negative offset relative to static TLS */ 403 R_386_TLS_GD R_386 = 18 /* 32 bit offset to GOT (index,off) pair */ 404 R_386_TLS_LDM R_386 = 19 /* 32 bit offset to GOT (index,zero) pair */ 405 R_386_16 R_386 = 20 406 R_386_PC16 R_386 = 21 407 R_386_8 R_386 = 22 408 R_386_PC8 R_386 = 23 409 R_386_TLS_GD_32 R_386 = 24 /* 32 bit offset to GOT (index,off) pair */ 410 R_386_TLS_GD_PUSH R_386 = 25 /* pushl instruction for Sun ABI GD sequence */ 411 R_386_TLS_GD_CALL R_386 = 26 /* call instruction for Sun ABI GD sequence */ 412 R_386_TLS_GD_POP R_386 = 27 /* popl instruction for Sun ABI GD sequence */ 413 R_386_TLS_LDM_32 R_386 = 28 /* 32 bit offset to GOT (index,zero) pair */ 414 R_386_TLS_LDM_PUSH R_386 = 29 /* pushl instruction for Sun ABI LD sequence */ 415 R_386_TLS_LDM_CALL R_386 = 30 /* call instruction for Sun ABI LD sequence */ 416 R_386_TLS_LDM_POP R_386 = 31 /* popl instruction for Sun ABI LD sequence */ 417 R_386_TLS_LDO_32 R_386 = 32 /* 32 bit offset from start of TLS block */ 418 R_386_TLS_IE_32 R_386 = 33 /* 32 bit offset to GOT static TLS offset entry */ 419 R_386_TLS_LE_32 R_386 = 34 /* 32 bit offset within static TLS block */ 420 R_386_TLS_DTPMOD32 R_386 = 35 /* GOT entry containing TLS index */ 421 R_386_TLS_DTPOFF32 R_386 = 36 /* GOT entry containing TLS offset */ 422 R_386_TLS_TPOFF32 R_386 = 37 /* GOT entry of -ve static TLS offset */ 423 R_386_SIZE32 R_386 = 38 424 R_386_TLS_GOTDESC R_386 = 39 425 R_386_TLS_DESC_CALL R_386 = 40 426 R_386_TLS_DESC R_386 = 41 427 R_386_IRELATIVE R_386 = 42 428 R_386_GOT32X R_386 = 43 429 ) 430 431 // Relocation types for MIPS. 432 type R_MIPS int 433 434 const ( 435 R_MIPS_NONE R_MIPS = 0 436 R_MIPS_16 R_MIPS = 1 437 R_MIPS_32 R_MIPS = 2 438 R_MIPS_REL32 R_MIPS = 3 439 R_MIPS_26 R_MIPS = 4 440 R_MIPS_HI16 R_MIPS = 5 /* high 16 bits of symbol value */ 441 R_MIPS_LO16 R_MIPS = 6 /* low 16 bits of symbol value */ 442 R_MIPS_GPREL16 R_MIPS = 7 /* GP-relative reference */ 443 R_MIPS_LITERAL R_MIPS = 8 /* Reference to literal section */ 444 R_MIPS_GOT16 R_MIPS = 9 /* Reference to global offset table */ 445 R_MIPS_PC16 R_MIPS = 10 /* 16 bit PC relative reference */ 446 R_MIPS_CALL16 R_MIPS = 11 /* 16 bit call through glbl offset tbl */ 447 R_MIPS_GPREL32 R_MIPS = 12 448 R_MIPS_SHIFT5 R_MIPS = 16 449 R_MIPS_SHIFT6 R_MIPS = 17 450 R_MIPS_64 R_MIPS = 18 451 R_MIPS_GOT_DISP R_MIPS = 19 452 R_MIPS_GOT_PAGE R_MIPS = 20 453 R_MIPS_GOT_OFST R_MIPS = 21 454 R_MIPS_GOT_HI16 R_MIPS = 22 455 R_MIPS_GOT_LO16 R_MIPS = 23 456 R_MIPS_SUB R_MIPS = 24 457 R_MIPS_INSERT_A R_MIPS = 25 458 R_MIPS_INSERT_B R_MIPS = 26 459 R_MIPS_DELETE R_MIPS = 27 460 R_MIPS_HIGHER R_MIPS = 28 461 R_MIPS_HIGHEST R_MIPS = 29 462 R_MIPS_CALL_HI16 R_MIPS = 30 463 R_MIPS_CALL_LO16 R_MIPS = 31 464 R_MIPS_SCN_DISP R_MIPS = 32 465 R_MIPS_REL16 R_MIPS = 33 466 R_MIPS_ADD_IMMEDIATE R_MIPS = 34 467 R_MIPS_PJUMP R_MIPS = 35 468 R_MIPS_RELGOT R_MIPS = 36 469 R_MIPS_JALR R_MIPS = 37 470 471 R_MIPS_TLS_DTPMOD32 R_MIPS = 38 /* Module number 32 bit */ 472 R_MIPS_TLS_DTPREL32 R_MIPS = 39 /* Module-relative offset 32 bit */ 473 R_MIPS_TLS_DTPMOD64 R_MIPS = 40 /* Module number 64 bit */ 474 R_MIPS_TLS_DTPREL64 R_MIPS = 41 /* Module-relative offset 64 bit */ 475 R_MIPS_TLS_GD R_MIPS = 42 /* 16 bit GOT offset for GD */ 476 R_MIPS_TLS_LDM R_MIPS = 43 /* 16 bit GOT offset for LDM */ 477 R_MIPS_TLS_DTPREL_HI16 R_MIPS = 44 /* Module-relative offset, high 16 bits */ 478 R_MIPS_TLS_DTPREL_LO16 R_MIPS = 45 /* Module-relative offset, low 16 bits */ 479 R_MIPS_TLS_GOTTPREL R_MIPS = 46 /* 16 bit GOT offset for IE */ 480 R_MIPS_TLS_TPREL32 R_MIPS = 47 /* TP-relative offset, 32 bit */ 481 R_MIPS_TLS_TPREL64 R_MIPS = 48 /* TP-relative offset, 64 bit */ 482 R_MIPS_TLS_TPREL_HI16 R_MIPS = 49 /* TP-relative offset, high 16 bits */ 483 R_MIPS_TLS_TPREL_LO16 R_MIPS = 50 /* TP-relative offset, low 16 bits */ 484 ) 485 486 // Relocation types for PowerPC. 487 // 488 // Values that are shared by both R_PPC and R_PPC64 are prefixed with 489 // R_POWERPC_ in the ELF standard. For the R_PPC type, the relevant 490 // shared relocations have been renamed with the prefix R_PPC_. 491 // The original name follows the value in a comment. 492 type R_PPC int 493 494 const ( 495 R_PPC_NONE R_PPC = 0 // R_POWERPC_NONE 496 R_PPC_ADDR32 R_PPC = 1 // R_POWERPC_ADDR32 497 R_PPC_ADDR24 R_PPC = 2 // R_POWERPC_ADDR24 498 R_PPC_ADDR16 R_PPC = 3 // R_POWERPC_ADDR16 499 R_PPC_ADDR16_LO R_PPC = 4 // R_POWERPC_ADDR16_LO 500 R_PPC_ADDR16_HI R_PPC = 5 // R_POWERPC_ADDR16_HI 501 R_PPC_ADDR16_HA R_PPC = 6 // R_POWERPC_ADDR16_HA 502 R_PPC_ADDR14 R_PPC = 7 // R_POWERPC_ADDR14 503 R_PPC_ADDR14_BRTAKEN R_PPC = 8 // R_POWERPC_ADDR14_BRTAKEN 504 R_PPC_ADDR14_BRNTAKEN R_PPC = 9 // R_POWERPC_ADDR14_BRNTAKEN 505 R_PPC_REL24 R_PPC = 10 // R_POWERPC_REL24 506 R_PPC_REL14 R_PPC = 11 // R_POWERPC_REL14 507 R_PPC_REL14_BRTAKEN R_PPC = 12 // R_POWERPC_REL14_BRTAKEN 508 R_PPC_REL14_BRNTAKEN R_PPC = 13 // R_POWERPC_REL14_BRNTAKEN 509 R_PPC_GOT16 R_PPC = 14 // R_POWERPC_GOT16 510 R_PPC_GOT16_LO R_PPC = 15 // R_POWERPC_GOT16_LO 511 R_PPC_GOT16_HI R_PPC = 16 // R_POWERPC_GOT16_HI 512 R_PPC_GOT16_HA R_PPC = 17 // R_POWERPC_GOT16_HA 513 R_PPC_PLTREL24 R_PPC = 18 514 R_PPC_COPY R_PPC = 19 // R_POWERPC_COPY 515 R_PPC_GLOB_DAT R_PPC = 20 // R_POWERPC_GLOB_DAT 516 R_PPC_JMP_SLOT R_PPC = 21 // R_POWERPC_JMP_SLOT 517 R_PPC_RELATIVE R_PPC = 22 // R_POWERPC_RELATIVE 518 R_PPC_LOCAL24PC R_PPC = 23 519 R_PPC_UADDR32 R_PPC = 24 // R_POWERPC_UADDR32 520 R_PPC_UADDR16 R_PPC = 25 // R_POWERPC_UADDR16 521 R_PPC_REL32 R_PPC = 26 // R_POWERPC_REL32 522 R_PPC_PLT32 R_PPC = 27 // R_POWERPC_PLT32 523 R_PPC_PLTREL32 R_PPC = 28 // R_POWERPC_PLTREL32 524 R_PPC_PLT16_LO R_PPC = 29 // R_POWERPC_PLT16_LO 525 R_PPC_PLT16_HI R_PPC = 30 // R_POWERPC_PLT16_HI 526 R_PPC_PLT16_HA R_PPC = 31 // R_POWERPC_PLT16_HA 527 R_PPC_SDAREL16 R_PPC = 32 528 R_PPC_SECTOFF R_PPC = 33 // R_POWERPC_SECTOFF 529 R_PPC_SECTOFF_LO R_PPC = 34 // R_POWERPC_SECTOFF_LO 530 R_PPC_SECTOFF_HI R_PPC = 35 // R_POWERPC_SECTOFF_HI 531 R_PPC_SECTOFF_HA R_PPC = 36 // R_POWERPC_SECTOFF_HA 532 R_PPC_TLS R_PPC = 67 // R_POWERPC_TLS 533 R_PPC_DTPMOD32 R_PPC = 68 // R_POWERPC_DTPMOD32 534 R_PPC_TPREL16 R_PPC = 69 // R_POWERPC_TPREL16 535 R_PPC_TPREL16_LO R_PPC = 70 // R_POWERPC_TPREL16_LO 536 R_PPC_TPREL16_HI R_PPC = 71 // R_POWERPC_TPREL16_HI 537 R_PPC_TPREL16_HA R_PPC = 72 // R_POWERPC_TPREL16_HA 538 R_PPC_TPREL32 R_PPC = 73 // R_POWERPC_TPREL32 539 R_PPC_DTPREL16 R_PPC = 74 // R_POWERPC_DTPREL16 540 R_PPC_DTPREL16_LO R_PPC = 75 // R_POWERPC_DTPREL16_LO 541 R_PPC_DTPREL16_HI R_PPC = 76 // R_POWERPC_DTPREL16_HI 542 R_PPC_DTPREL16_HA R_PPC = 77 // R_POWERPC_DTPREL16_HA 543 R_PPC_DTPREL32 R_PPC = 78 // R_POWERPC_DTPREL32 544 R_PPC_GOT_TLSGD16 R_PPC = 79 // R_POWERPC_GOT_TLSGD16 545 R_PPC_GOT_TLSGD16_LO R_PPC = 80 // R_POWERPC_GOT_TLSGD16_LO 546 R_PPC_GOT_TLSGD16_HI R_PPC = 81 // R_POWERPC_GOT_TLSGD16_HI 547 R_PPC_GOT_TLSGD16_HA R_PPC = 82 // R_POWERPC_GOT_TLSGD16_HA 548 R_PPC_GOT_TLSLD16 R_PPC = 83 // R_POWERPC_GOT_TLSLD16 549 R_PPC_GOT_TLSLD16_LO R_PPC = 84 // R_POWERPC_GOT_TLSLD16_LO 550 R_PPC_GOT_TLSLD16_HI R_PPC = 85 // R_POWERPC_GOT_TLSLD16_HI 551 R_PPC_GOT_TLSLD16_HA R_PPC = 86 // R_POWERPC_GOT_TLSLD16_HA 552 R_PPC_GOT_TPREL16 R_PPC = 87 // R_POWERPC_GOT_TPREL16 553 R_PPC_GOT_TPREL16_LO R_PPC = 88 // R_POWERPC_GOT_TPREL16_LO 554 R_PPC_GOT_TPREL16_HI R_PPC = 89 // R_POWERPC_GOT_TPREL16_HI 555 R_PPC_GOT_TPREL16_HA R_PPC = 90 // R_POWERPC_GOT_TPREL16_HA 556 R_PPC_EMB_NADDR32 R_PPC = 101 557 R_PPC_EMB_NADDR16 R_PPC = 102 558 R_PPC_EMB_NADDR16_LO R_PPC = 103 559 R_PPC_EMB_NADDR16_HI R_PPC = 104 560 R_PPC_EMB_NADDR16_HA R_PPC = 105 561 R_PPC_EMB_SDAI16 R_PPC = 106 562 R_PPC_EMB_SDA2I16 R_PPC = 107 563 R_PPC_EMB_SDA2REL R_PPC = 108 564 R_PPC_EMB_SDA21 R_PPC = 109 565 R_PPC_EMB_MRKREF R_PPC = 110 566 R_PPC_EMB_RELSEC16 R_PPC = 111 567 R_PPC_EMB_RELST_LO R_PPC = 112 568 R_PPC_EMB_RELST_HI R_PPC = 113 569 R_PPC_EMB_RELST_HA R_PPC = 114 570 R_PPC_EMB_BIT_FLD R_PPC = 115 571 R_PPC_EMB_RELSDA R_PPC = 116 572 ) 573 574 // Relocation types for 64-bit PowerPC or Power Architecture processors. 575 // 576 // Values that are shared by both R_PPC and R_PPC64 are prefixed with 577 // R_POWERPC_ in the ELF standard. For the R_PPC64 type, the relevant 578 // shared relocations have been renamed with the prefix R_PPC64_. 579 // The original name follows the value in a comment. 580 type R_PPC64 int 581 582 const ( 583 R_PPC64_NONE R_PPC64 = 0 // R_POWERPC_NONE 584 R_PPC64_ADDR32 R_PPC64 = 1 // R_POWERPC_ADDR32 585 R_PPC64_ADDR24 R_PPC64 = 2 // R_POWERPC_ADDR24 586 R_PPC64_ADDR16 R_PPC64 = 3 // R_POWERPC_ADDR16 587 R_PPC64_ADDR16_LO R_PPC64 = 4 // R_POWERPC_ADDR16_LO 588 R_PPC64_ADDR16_HI R_PPC64 = 5 // R_POWERPC_ADDR16_HI 589 R_PPC64_ADDR16_HA R_PPC64 = 6 // R_POWERPC_ADDR16_HA 590 R_PPC64_ADDR14 R_PPC64 = 7 // R_POWERPC_ADDR14 591 R_PPC64_ADDR14_BRTAKEN R_PPC64 = 8 // R_POWERPC_ADDR14_BRTAKEN 592 R_PPC64_ADDR14_BRNTAKEN R_PPC64 = 9 // R_POWERPC_ADDR14_BRNTAKEN 593 R_PPC64_REL24 R_PPC64 = 10 // R_POWERPC_REL24 594 R_PPC64_REL14 R_PPC64 = 11 // R_POWERPC_REL14 595 R_PPC64_REL14_BRTAKEN R_PPC64 = 12 // R_POWERPC_REL14_BRTAKEN 596 R_PPC64_REL14_BRNTAKEN R_PPC64 = 13 // R_POWERPC_REL14_BRNTAKEN 597 R_PPC64_GOT16 R_PPC64 = 14 // R_POWERPC_GOT16 598 R_PPC64_GOT16_LO R_PPC64 = 15 // R_POWERPC_GOT16_LO 599 R_PPC64_GOT16_HI R_PPC64 = 16 // R_POWERPC_GOT16_HI 600 R_PPC64_GOT16_HA R_PPC64 = 17 // R_POWERPC_GOT16_HA 601 R_PPC64_COPY R_PPC64 = 19 // R_POWERPC_COPY 602 R_PPC64_GLOB_DAT R_PPC64 = 20 // R_POWERPC_GLOB_DAT 603 R_PPC64_JMP_SLOT R_PPC64 = 21 // R_POWERPC_JMP_SLOT 604 R_PPC64_RELATIVE R_PPC64 = 22 // R_POWERPC_RELATIVE 605 R_PPC64_UADDR32 R_PPC64 = 24 // R_POWERPC_UADDR32 606 R_PPC64_UADDR16 R_PPC64 = 25 // R_POWERPC_UADDR16 607 R_PPC64_REL32 R_PPC64 = 26 // R_POWERPC_REL32 608 R_PPC64_PLT32 R_PPC64 = 27 // R_POWERPC_PLT32 609 R_PPC64_PLTREL32 R_PPC64 = 28 // R_POWERPC_PLTREL32 610 R_PPC64_PLT16_LO R_PPC64 = 29 // R_POWERPC_PLT16_LO 611 R_PPC64_PLT16_HI R_PPC64 = 30 // R_POWERPC_PLT16_HI 612 R_PPC64_PLT16_HA R_PPC64 = 31 // R_POWERPC_PLT16_HA 613 R_PPC64_SECTOFF R_PPC64 = 33 // R_POWERPC_SECTOFF 614 R_PPC64_SECTOFF_LO R_PPC64 = 34 // R_POWERPC_SECTOFF_LO 615 R_PPC64_SECTOFF_HI R_PPC64 = 35 // R_POWERPC_SECTOFF_HI 616 R_PPC64_SECTOFF_HA R_PPC64 = 36 // R_POWERPC_SECTOFF_HA 617 R_PPC64_REL30 R_PPC64 = 37 // R_POWERPC_ADDR30 618 R_PPC64_ADDR64 R_PPC64 = 38 619 R_PPC64_ADDR16_HIGHER R_PPC64 = 39 620 R_PPC64_ADDR16_HIGHERA R_PPC64 = 40 621 R_PPC64_ADDR16_HIGHEST R_PPC64 = 41 622 R_PPC64_ADDR16_HIGHESTA R_PPC64 = 42 623 R_PPC64_UADDR64 R_PPC64 = 43 624 R_PPC64_REL64 R_PPC64 = 44 625 R_PPC64_PLT64 R_PPC64 = 45 626 R_PPC64_PLTREL64 R_PPC64 = 46 627 R_PPC64_TOC16 R_PPC64 = 47 628 R_PPC64_TOC16_LO R_PPC64 = 48 629 R_PPC64_TOC16_HI R_PPC64 = 49 630 R_PPC64_TOC16_HA R_PPC64 = 50 631 R_PPC64_TOC R_PPC64 = 51 632 R_PPC64_PLTGOT16 R_PPC64 = 52 633 R_PPC64_PLTGOT16_LO R_PPC64 = 53 634 R_PPC64_PLTGOT16_HI R_PPC64 = 54 635 R_PPC64_PLTGOT16_HA R_PPC64 = 55 636 R_PPC64_ADDR16_DS R_PPC64 = 56 637 R_PPC64_ADDR16_LO_DS R_PPC64 = 57 638 R_PPC64_GOT16_DS R_PPC64 = 58 639 R_PPC64_GOT16_LO_DS R_PPC64 = 59 640 R_PPC64_PLT16_LO_DS R_PPC64 = 60 641 R_PPC64_SECTOFF_DS R_PPC64 = 61 642 R_PPC64_SECTOFF_LO_DS R_PPC64 = 62 643 R_PPC64_TOC16_DS R_PPC64 = 63 644 R_PPC64_TOC16_LO_DS R_PPC64 = 64 645 R_PPC64_PLTGOT16_DS R_PPC64 = 65 646 R_PPC64_PLTGOT_LO_DS R_PPC64 = 66 647 R_PPC64_TLS R_PPC64 = 67 // R_POWERPC_TLS 648 R_PPC64_DTPMOD64 R_PPC64 = 68 // R_POWERPC_DTPMOD64 649 R_PPC64_TPREL16 R_PPC64 = 69 // R_POWERPC_TPREL16 650 R_PPC64_TPREL16_LO R_PPC64 = 70 // R_POWERPC_TPREL16_LO 651 R_PPC64_TPREL16_HI R_PPC64 = 71 // R_POWERPC_TPREL16_HI 652 R_PPC64_TPREL16_HA R_PPC64 = 72 // R_POWERPC_TPREL16_HA 653 R_PPC64_TPREL64 R_PPC64 = 73 // R_POWERPC_TPREL64 654 R_PPC64_DTPREL16 R_PPC64 = 74 // R_POWERPC_DTPREL16 655 R_PPC64_DTPREL16_LO R_PPC64 = 75 // R_POWERPC_DTPREL16_LO 656 R_PPC64_DTPREL16_HI R_PPC64 = 76 // R_POWERPC_DTPREL16_HI 657 R_PPC64_DTPREL16_HA R_PPC64 = 77 // R_POWERPC_DTPREL16_HA 658 R_PPC64_DTPREL64 R_PPC64 = 78 // R_POWERPC_DTPREL64 659 R_PPC64_GOT_TLSGD16 R_PPC64 = 79 // R_POWERPC_GOT_TLSGD16 660 R_PPC64_GOT_TLSGD16_LO R_PPC64 = 80 // R_POWERPC_GOT_TLSGD16_LO 661 R_PPC64_GOT_TLSGD16_HI R_PPC64 = 81 // R_POWERPC_GOT_TLSGD16_HI 662 R_PPC64_GOT_TLSGD16_HA R_PPC64 = 82 // R_POWERPC_GOT_TLSGD16_HA 663 R_PPC64_GOT_TLSLD16 R_PPC64 = 83 // R_POWERPC_GOT_TLSLD16 664 R_PPC64_GOT_TLSLD16_LO R_PPC64 = 84 // R_POWERPC_GOT_TLSLD16_LO 665 R_PPC64_GOT_TLSLD16_HI R_PPC64 = 85 // R_POWERPC_GOT_TLSLD16_HI 666 R_PPC64_GOT_TLSLD16_HA R_PPC64 = 86 // R_POWERPC_GOT_TLSLD16_HA 667 R_PPC64_GOT_TPREL16_DS R_PPC64 = 87 // R_POWERPC_GOT_TPREL16_DS 668 R_PPC64_GOT_TPREL16_LO_DS R_PPC64 = 88 // R_POWERPC_GOT_TPREL16_LO_DS 669 R_PPC64_GOT_TPREL16_HI R_PPC64 = 89 // R_POWERPC_GOT_TPREL16_HI 670 R_PPC64_GOT_TPREL16_HA R_PPC64 = 90 // R_POWERPC_GOT_TPREL16_HA 671 R_PPC64_GOT_DTPREL16_DS R_PPC64 = 91 // R_POWERPC_GOT_DTPREL16_DS 672 R_PPC64_GOT_DTPREL16_LO_DS R_PPC64 = 92 // R_POWERPC_GOT_DTPREL16_LO_DS 673 R_PPC64_GOT_DTPREL16_HI R_PPC64 = 93 // R_POWERPC_GOT_DTPREL16_HI 674 R_PPC64_GOT_DTPREL16_HA R_PPC64 = 94 // R_POWERPC_GOT_DTPREL16_HA 675 R_PPC64_TPREL16_DS R_PPC64 = 95 676 R_PPC64_TPREL16_LO_DS R_PPC64 = 96 677 R_PPC64_TPREL16_HIGHER R_PPC64 = 97 678 R_PPC64_TPREL16_HIGHERA R_PPC64 = 98 679 R_PPC64_TPREL16_HIGHEST R_PPC64 = 99 680 R_PPC64_TPREL16_HIGHESTA R_PPC64 = 100 681 R_PPC64_DTPREL16_DS R_PPC64 = 101 682 R_PPC64_DTPREL16_LO_DS R_PPC64 = 102 683 R_PPC64_DTPREL16_HIGHER R_PPC64 = 103 684 R_PPC64_DTPREL16_HIGHERA R_PPC64 = 104 685 R_PPC64_DTPREL16_HIGHEST R_PPC64 = 105 686 R_PPC64_DTPREL16_HIGHESTA R_PPC64 = 106 687 R_PPC64_TLSGD R_PPC64 = 107 688 R_PPC64_TLSLD R_PPC64 = 108 689 R_PPC64_TOCSAVE R_PPC64 = 109 690 R_PPC64_ADDR16_HIGH R_PPC64 = 110 691 R_PPC64_ADDR16_HIGHA R_PPC64 = 111 692 R_PPC64_TPREL16_HIGH R_PPC64 = 112 693 R_PPC64_TPREL16_HIGHA R_PPC64 = 113 694 R_PPC64_DTPREL16_HIGH R_PPC64 = 114 695 R_PPC64_DTPREL16_HIGHA R_PPC64 = 115 696 R_PPC64_REL24_NOTOC R_PPC64 = 116 697 R_PPC64_ADDR64_LOCAL R_PPC64 = 117 698 R_PPC64_ENTRY R_PPC64 = 118 699 R_PPC64_PLTSEQ R_PPC64 = 119 700 R_PPC64_PLTCALL R_PPC64 = 120 701 R_PPC64_PLTSEQ_NOTOC R_PPC64 = 121 702 R_PPC64_PLTCALL_NOTOC R_PPC64 = 122 703 R_PPC64_PCREL_OPT R_PPC64 = 123 704 R_PPC64_REL24_P9NOTOC R_PPC64 = 124 705 R_PPC64_D34 R_PPC64 = 128 706 R_PPC64_D34_LO R_PPC64 = 129 707 R_PPC64_D34_HI30 R_PPC64 = 130 708 R_PPC64_D34_HA30 R_PPC64 = 131 709 R_PPC64_PCREL34 R_PPC64 = 132 710 R_PPC64_GOT_PCREL34 R_PPC64 = 133 711 R_PPC64_PLT_PCREL34 R_PPC64 = 134 712 R_PPC64_PLT_PCREL34_NOTOC R_PPC64 = 135 713 R_PPC64_ADDR16_HIGHER34 R_PPC64 = 136 714 R_PPC64_ADDR16_HIGHERA34 R_PPC64 = 137 715 R_PPC64_ADDR16_HIGHEST34 R_PPC64 = 138 716 R_PPC64_ADDR16_HIGHESTA34 R_PPC64 = 139 717 R_PPC64_REL16_HIGHER34 R_PPC64 = 140 718 R_PPC64_REL16_HIGHERA34 R_PPC64 = 141 719 R_PPC64_REL16_HIGHEST34 R_PPC64 = 142 720 R_PPC64_REL16_HIGHESTA34 R_PPC64 = 143 721 R_PPC64_D28 R_PPC64 = 144 722 R_PPC64_PCREL28 R_PPC64 = 145 723 R_PPC64_TPREL34 R_PPC64 = 146 724 R_PPC64_DTPREL34 R_PPC64 = 147 725 R_PPC64_GOT_TLSGD_PCREL34 R_PPC64 = 148 726 R_PPC64_GOT_TLSLD_PCREL34 R_PPC64 = 149 727 R_PPC64_GOT_TPREL_PCREL34 R_PPC64 = 150 728 R_PPC64_GOT_DTPREL_PCREL34 R_PPC64 = 151 729 R_PPC64_REL16_HIGH R_PPC64 = 240 730 R_PPC64_REL16_HIGHA R_PPC64 = 241 731 R_PPC64_REL16_HIGHER R_PPC64 = 242 732 R_PPC64_REL16_HIGHERA R_PPC64 = 243 733 R_PPC64_REL16_HIGHEST R_PPC64 = 244 734 R_PPC64_REL16_HIGHESTA R_PPC64 = 245 735 R_PPC64_REL16DX_HA R_PPC64 = 246 // R_POWERPC_REL16DX_HA 736 R_PPC64_JMP_IREL R_PPC64 = 247 737 R_PPC64_IRELATIVE R_PPC64 = 248 // R_POWERPC_IRELATIVE 738 R_PPC64_REL16 R_PPC64 = 249 // R_POWERPC_REL16 739 R_PPC64_REL16_LO R_PPC64 = 250 // R_POWERPC_REL16_LO 740 R_PPC64_REL16_HI R_PPC64 = 251 // R_POWERPC_REL16_HI 741 R_PPC64_REL16_HA R_PPC64 = 252 // R_POWERPC_REL16_HA 742 R_PPC64_GNU_VTINHERIT R_PPC64 = 253 743 R_PPC64_GNU_VTENTRY R_PPC64 = 254 744 ) 745 746 // Relocation types for RISC-V processors. 747 type R_RISCV int 748 749 const ( 750 R_RISCV_NONE R_RISCV = 0 /* No relocation. */ 751 R_RISCV_32 R_RISCV = 1 /* Add 32 bit zero extended symbol value */ 752 R_RISCV_64 R_RISCV = 2 /* Add 64 bit symbol value. */ 753 R_RISCV_RELATIVE R_RISCV = 3 /* Add load address of shared object. */ 754 R_RISCV_COPY R_RISCV = 4 /* Copy data from shared object. */ 755 R_RISCV_JUMP_SLOT R_RISCV = 5 /* Set GOT entry to code address. */ 756 R_RISCV_TLS_DTPMOD32 R_RISCV = 6 /* 32 bit ID of module containing symbol */ 757 R_RISCV_TLS_DTPMOD64 R_RISCV = 7 /* ID of module containing symbol */ 758 R_RISCV_TLS_DTPREL32 R_RISCV = 8 /* 32 bit relative offset in TLS block */ 759 R_RISCV_TLS_DTPREL64 R_RISCV = 9 /* Relative offset in TLS block */ 760 R_RISCV_TLS_TPREL32 R_RISCV = 10 /* 32 bit relative offset in static TLS block */ 761 R_RISCV_TLS_TPREL64 R_RISCV = 11 /* Relative offset in static TLS block */ 762 R_RISCV_BRANCH R_RISCV = 16 /* PC-relative branch */ 763 R_RISCV_JAL R_RISCV = 17 /* PC-relative jump */ 764 R_RISCV_CALL R_RISCV = 18 /* PC-relative call */ 765 R_RISCV_CALL_PLT R_RISCV = 19 /* PC-relative call (PLT) */ 766 R_RISCV_GOT_HI20 R_RISCV = 20 /* PC-relative GOT reference */ 767 R_RISCV_TLS_GOT_HI20 R_RISCV = 21 /* PC-relative TLS IE GOT offset */ 768 R_RISCV_TLS_GD_HI20 R_RISCV = 22 /* PC-relative TLS GD reference */ 769 R_RISCV_PCREL_HI20 R_RISCV = 23 /* PC-relative reference */ 770 R_RISCV_PCREL_LO12_I R_RISCV = 24 /* PC-relative reference */ 771 R_RISCV_PCREL_LO12_S R_RISCV = 25 /* PC-relative reference */ 772 R_RISCV_HI20 R_RISCV = 26 /* Absolute address */ 773 R_RISCV_LO12_I R_RISCV = 27 /* Absolute address */ 774 R_RISCV_LO12_S R_RISCV = 28 /* Absolute address */ 775 R_RISCV_TPREL_HI20 R_RISCV = 29 /* TLS LE thread offset */ 776 R_RISCV_TPREL_LO12_I R_RISCV = 30 /* TLS LE thread offset */ 777 R_RISCV_TPREL_LO12_S R_RISCV = 31 /* TLS LE thread offset */ 778 R_RISCV_TPREL_ADD R_RISCV = 32 /* TLS LE thread usage */ 779 R_RISCV_ADD8 R_RISCV = 33 /* 8-bit label addition */ 780 R_RISCV_ADD16 R_RISCV = 34 /* 16-bit label addition */ 781 R_RISCV_ADD32 R_RISCV = 35 /* 32-bit label addition */ 782 R_RISCV_ADD64 R_RISCV = 36 /* 64-bit label addition */ 783 R_RISCV_SUB8 R_RISCV = 37 /* 8-bit label subtraction */ 784 R_RISCV_SUB16 R_RISCV = 38 /* 16-bit label subtraction */ 785 R_RISCV_SUB32 R_RISCV = 39 /* 32-bit label subtraction */ 786 R_RISCV_SUB64 R_RISCV = 40 /* 64-bit label subtraction */ 787 R_RISCV_GNU_VTINHERIT R_RISCV = 41 /* GNU C++ vtable hierarchy */ 788 R_RISCV_GNU_VTENTRY R_RISCV = 42 /* GNU C++ vtable member usage */ 789 R_RISCV_ALIGN R_RISCV = 43 /* Alignment statement */ 790 R_RISCV_RVC_BRANCH R_RISCV = 44 /* PC-relative branch offset */ 791 R_RISCV_RVC_JUMP R_RISCV = 45 /* PC-relative jump offset */ 792 R_RISCV_RVC_LUI R_RISCV = 46 /* Absolute address */ 793 R_RISCV_GPREL_I R_RISCV = 47 /* GP-relative reference */ 794 R_RISCV_GPREL_S R_RISCV = 48 /* GP-relative reference */ 795 R_RISCV_TPREL_I R_RISCV = 49 /* TP-relative TLS LE load */ 796 R_RISCV_TPREL_S R_RISCV = 50 /* TP-relative TLS LE store */ 797 R_RISCV_RELAX R_RISCV = 51 /* Instruction pair can be relaxed */ 798 R_RISCV_SUB6 R_RISCV = 52 /* Local label subtraction */ 799 R_RISCV_SET6 R_RISCV = 53 /* Local label subtraction */ 800 R_RISCV_SET8 R_RISCV = 54 /* Local label subtraction */ 801 R_RISCV_SET16 R_RISCV = 55 /* Local label subtraction */ 802 R_RISCV_SET32 R_RISCV = 56 /* Local label subtraction */ 803 R_RISCV_32_PCREL R_RISCV = 57 /* 32-bit PC relative */ 804 ) 805 806 // Relocation types for s390x processors. 807 type R_390 int 808 809 const ( 810 R_390_NONE R_390 = 0 811 R_390_8 R_390 = 1 812 R_390_12 R_390 = 2 813 R_390_16 R_390 = 3 814 R_390_32 R_390 = 4 815 R_390_PC32 R_390 = 5 816 R_390_GOT12 R_390 = 6 817 R_390_GOT32 R_390 = 7 818 R_390_PLT32 R_390 = 8 819 R_390_COPY R_390 = 9 820 R_390_GLOB_DAT R_390 = 10 821 R_390_JMP_SLOT R_390 = 11 822 R_390_RELATIVE R_390 = 12 823 R_390_GOTOFF R_390 = 13 824 R_390_GOTPC R_390 = 14 825 R_390_GOT16 R_390 = 15 826 R_390_PC16 R_390 = 16 827 R_390_PC16DBL R_390 = 17 828 R_390_PLT16DBL R_390 = 18 829 R_390_PC32DBL R_390 = 19 830 R_390_PLT32DBL R_390 = 20 831 R_390_GOTPCDBL R_390 = 21 832 R_390_64 R_390 = 22 833 R_390_PC64 R_390 = 23 834 R_390_GOT64 R_390 = 24 835 R_390_PLT64 R_390 = 25 836 R_390_GOTENT R_390 = 26 837 R_390_GOTOFF16 R_390 = 27 838 R_390_GOTOFF64 R_390 = 28 839 R_390_GOTPLT12 R_390 = 29 840 R_390_GOTPLT16 R_390 = 30 841 R_390_GOTPLT32 R_390 = 31 842 R_390_GOTPLT64 R_390 = 32 843 R_390_GOTPLTENT R_390 = 33 844 R_390_GOTPLTOFF16 R_390 = 34 845 R_390_GOTPLTOFF32 R_390 = 35 846 R_390_GOTPLTOFF64 R_390 = 36 847 R_390_TLS_LOAD R_390 = 37 848 R_390_TLS_GDCALL R_390 = 38 849 R_390_TLS_LDCALL R_390 = 39 850 R_390_TLS_GD32 R_390 = 40 851 R_390_TLS_GD64 R_390 = 41 852 R_390_TLS_GOTIE12 R_390 = 42 853 R_390_TLS_GOTIE32 R_390 = 43 854 R_390_TLS_GOTIE64 R_390 = 44 855 R_390_TLS_LDM32 R_390 = 45 856 R_390_TLS_LDM64 R_390 = 46 857 R_390_TLS_IE32 R_390 = 47 858 R_390_TLS_IE64 R_390 = 48 859 R_390_TLS_IEENT R_390 = 49 860 R_390_TLS_LE32 R_390 = 50 861 R_390_TLS_LE64 R_390 = 51 862 R_390_TLS_LDO32 R_390 = 52 863 R_390_TLS_LDO64 R_390 = 53 864 R_390_TLS_DTPMOD R_390 = 54 865 R_390_TLS_DTPOFF R_390 = 55 866 R_390_TLS_TPOFF R_390 = 56 867 R_390_20 R_390 = 57 868 R_390_GOT20 R_390 = 58 869 R_390_GOTPLT20 R_390 = 59 870 R_390_TLS_GOTIE20 R_390 = 60 871 ) 872 873 // Relocation types for SPARC. 874 type R_SPARC int 875 876 const ( 877 R_SPARC_NONE R_SPARC = 0 878 R_SPARC_8 R_SPARC = 1 879 R_SPARC_16 R_SPARC = 2 880 R_SPARC_32 R_SPARC = 3 881 R_SPARC_DISP8 R_SPARC = 4 882 R_SPARC_DISP16 R_SPARC = 5 883 R_SPARC_DISP32 R_SPARC = 6 884 R_SPARC_WDISP30 R_SPARC = 7 885 R_SPARC_WDISP22 R_SPARC = 8 886 R_SPARC_HI22 R_SPARC = 9 887 R_SPARC_22 R_SPARC = 10 888 R_SPARC_13 R_SPARC = 11 889 R_SPARC_LO10 R_SPARC = 12 890 R_SPARC_GOT10 R_SPARC = 13 891 R_SPARC_GOT13 R_SPARC = 14 892 R_SPARC_GOT22 R_SPARC = 15 893 R_SPARC_PC10 R_SPARC = 16 894 R_SPARC_PC22 R_SPARC = 17 895 R_SPARC_WPLT30 R_SPARC = 18 896 R_SPARC_COPY R_SPARC = 19 897 R_SPARC_GLOB_DAT R_SPARC = 20 898 R_SPARC_JMP_SLOT R_SPARC = 21 899 R_SPARC_RELATIVE R_SPARC = 22 900 R_SPARC_UA32 R_SPARC = 23 901 R_SPARC_PLT32 R_SPARC = 24 902 R_SPARC_HIPLT22 R_SPARC = 25 903 R_SPARC_LOPLT10 R_SPARC = 26 904 R_SPARC_PCPLT32 R_SPARC = 27 905 R_SPARC_PCPLT22 R_SPARC = 28 906 R_SPARC_PCPLT10 R_SPARC = 29 907 R_SPARC_10 R_SPARC = 30 908 R_SPARC_11 R_SPARC = 31 909 R_SPARC_64 R_SPARC = 32 910 R_SPARC_OLO10 R_SPARC = 33 911 R_SPARC_HH22 R_SPARC = 34 912 R_SPARC_HM10 R_SPARC = 35 913 R_SPARC_LM22 R_SPARC = 36 914 R_SPARC_PC_HH22 R_SPARC = 37 915 R_SPARC_PC_HM10 R_SPARC = 38 916 R_SPARC_PC_LM22 R_SPARC = 39 917 R_SPARC_WDISP16 R_SPARC = 40 918 R_SPARC_WDISP19 R_SPARC = 41 919 R_SPARC_GLOB_JMP R_SPARC = 42 920 R_SPARC_7 R_SPARC = 43 921 R_SPARC_5 R_SPARC = 44 922 R_SPARC_6 R_SPARC = 45 923 R_SPARC_DISP64 R_SPARC = 46 924 R_SPARC_PLT64 R_SPARC = 47 925 R_SPARC_HIX22 R_SPARC = 48 926 R_SPARC_LOX10 R_SPARC = 49 927 R_SPARC_H44 R_SPARC = 50 928 R_SPARC_M44 R_SPARC = 51 929 R_SPARC_L44 R_SPARC = 52 930 R_SPARC_REGISTER R_SPARC = 53 931 R_SPARC_UA64 R_SPARC = 54 932 R_SPARC_UA16 R_SPARC = 55 933 )