How to use ld32 method of powerpc Package

Best Syzkaller code snippet using powerpc.ld32

elf.go

Source:elf.go Github

copy

Full Screen

1/*2 * ELF constants and data structures3 *4 * Derived from:5 * $FreeBSD: src/sys/sys/elf32.h,v 1.8.14.1 2005/12/30 22:13:58 marcel Exp $6 * $FreeBSD: src/sys/sys/elf64.h,v 1.10.14.1 2005/12/30 22:13:58 marcel Exp $7 * $FreeBSD: src/sys/sys/elf_common.h,v 1.15.8.1 2005/12/30 22:13:58 marcel Exp $8 * $FreeBSD: src/sys/alpha/include/elf.h,v 1.14 2003/09/25 01:10:22 peter Exp $9 * $FreeBSD: src/sys/amd64/include/elf.h,v 1.18 2004/08/03 08:21:48 dfr Exp $10 * $FreeBSD: src/sys/arm/include/elf.h,v 1.5.2.1 2006/06/30 21:42:52 cognet Exp $11 * $FreeBSD: src/sys/i386/include/elf.h,v 1.16 2004/08/02 19:12:17 dfr Exp $12 * $FreeBSD: src/sys/powerpc/include/elf.h,v 1.7 2004/11/02 09:47:01 ssouhlal Exp $13 * $FreeBSD: src/sys/sparc64/include/elf.h,v 1.12 2003/09/25 01:10:26 peter Exp $14 * "System V ABI" (http://www.sco.com/developers/gabi/latest/ch4.eheader.html)15 * "ELF for the ARM® 64-bit Architecture (AArch64)" (ARM IHI 0056B)16 * "RISC-V ELF psABI specification" (https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md)17 * llvm/BinaryFormat/ELF.h - ELF constants and structures18 *19 * Copyright (c) 1996-1998 John D. Polstra. All rights reserved.20 * Copyright (c) 2001 David E. O'Brien21 * Portions Copyright 2009 The Go Authors. All rights reserved.22 *23 * Redistribution and use in source and binary forms, with or without24 * modification, are permitted provided that the following conditions25 * are met:26 * 1. Redistributions of source code must retain the above copyright27 * notice, this list of conditions and the following disclaimer.28 * 2. Redistributions in binary form must reproduce the above copyright29 * notice, this list of conditions and the following disclaimer in the30 * documentation and/or other materials provided with the distribution.31 *32 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND33 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE34 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE35 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE36 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT40 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF42 * SUCH DAMAGE.43 */44package elf45import "strconv"46/*47 * Constants48 */49// Indexes into the Header.Ident array.50const (51 EI_CLASS = 4 /* Class of machine. */52 EI_DATA = 5 /* Data format. */53 EI_VERSION = 6 /* ELF format version. */54 EI_OSABI = 7 /* Operating system / ABI identification */55 EI_ABIVERSION = 8 /* ABI version */56 EI_PAD = 9 /* Start of padding (per SVR4 ABI). */57 EI_NIDENT = 16 /* Size of e_ident array. */58)59// Initial magic number for ELF files.60const ELFMAG = "\177ELF"61// Version is found in Header.Ident[EI_VERSION] and Header.Version.62type Version byte63const (64 EV_NONE Version = 065 EV_CURRENT Version = 166)67var versionStrings = []intName{68 {0, "EV_NONE"},69 {1, "EV_CURRENT"},70}71func (i Version) String() string { return stringName(uint32(i), versionStrings, false) }72func (i Version) GoString() string { return stringName(uint32(i), versionStrings, true) }73// Class is found in Header.Ident[EI_CLASS] and Header.Class.74type Class byte75const (76 ELFCLASSNONE Class = 0 /* Unknown class. */77 ELFCLASS32 Class = 1 /* 32-bit architecture. */78 ELFCLASS64 Class = 2 /* 64-bit architecture. */79)80var classStrings = []intName{81 {0, "ELFCLASSNONE"},82 {1, "ELFCLASS32"},83 {2, "ELFCLASS64"},84}85func (i Class) String() string { return stringName(uint32(i), classStrings, false) }86func (i Class) GoString() string { return stringName(uint32(i), classStrings, true) }87// Data is found in Header.Ident[EI_DATA] and Header.Data.88type Data byte89const (90 ELFDATANONE Data = 0 /* Unknown data format. */91 ELFDATA2LSB Data = 1 /* 2's complement little-endian. */92 ELFDATA2MSB Data = 2 /* 2's complement big-endian. */93)94var dataStrings = []intName{95 {0, "ELFDATANONE"},96 {1, "ELFDATA2LSB"},97 {2, "ELFDATA2MSB"},98}99func (i Data) String() string { return stringName(uint32(i), dataStrings, false) }100func (i Data) GoString() string { return stringName(uint32(i), dataStrings, true) }101// OSABI is found in Header.Ident[EI_OSABI] and Header.OSABI.102type OSABI byte103const (104 ELFOSABI_NONE OSABI = 0 /* UNIX System V ABI */105 ELFOSABI_HPUX OSABI = 1 /* HP-UX operating system */106 ELFOSABI_NETBSD OSABI = 2 /* NetBSD */107 ELFOSABI_LINUX OSABI = 3 /* GNU/Linux */108 ELFOSABI_HURD OSABI = 4 /* GNU/Hurd */109 ELFOSABI_86OPEN OSABI = 5 /* 86Open common IA32 ABI */110 ELFOSABI_SOLARIS OSABI = 6 /* Solaris */111 ELFOSABI_AIX OSABI = 7 /* AIX */112 ELFOSABI_IRIX OSABI = 8 /* IRIX */113 ELFOSABI_FREEBSD OSABI = 9 /* FreeBSD */114 ELFOSABI_TRU64 OSABI = 10 /* TRU64 UNIX */115 ELFOSABI_MODESTO OSABI = 11 /* Novell Modesto */116 ELFOSABI_OPENBSD OSABI = 12 /* OpenBSD */117 ELFOSABI_OPENVMS OSABI = 13 /* Open VMS */118 ELFOSABI_NSK OSABI = 14 /* HP Non-Stop Kernel */119 ELFOSABI_AROS OSABI = 15 /* Amiga Research OS */120 ELFOSABI_FENIXOS OSABI = 16 /* The FenixOS highly scalable multi-core OS */121 ELFOSABI_CLOUDABI OSABI = 17 /* Nuxi CloudABI */122 ELFOSABI_ARM OSABI = 97 /* ARM */123 ELFOSABI_STANDALONE OSABI = 255 /* Standalone (embedded) application */124)125var osabiStrings = []intName{126 {0, "ELFOSABI_NONE"},127 {1, "ELFOSABI_HPUX"},128 {2, "ELFOSABI_NETBSD"},129 {3, "ELFOSABI_LINUX"},130 {4, "ELFOSABI_HURD"},131 {5, "ELFOSABI_86OPEN"},132 {6, "ELFOSABI_SOLARIS"},133 {7, "ELFOSABI_AIX"},134 {8, "ELFOSABI_IRIX"},135 {9, "ELFOSABI_FREEBSD"},136 {10, "ELFOSABI_TRU64"},137 {11, "ELFOSABI_MODESTO"},138 {12, "ELFOSABI_OPENBSD"},139 {13, "ELFOSABI_OPENVMS"},140 {14, "ELFOSABI_NSK"},141 {15, "ELFOSABI_AROS"},142 {16, "ELFOSABI_FENIXOS"},143 {17, "ELFOSABI_CLOUDABI"},144 {97, "ELFOSABI_ARM"},145 {255, "ELFOSABI_STANDALONE"},146}147func (i OSABI) String() string { return stringName(uint32(i), osabiStrings, false) }148func (i OSABI) GoString() string { return stringName(uint32(i), osabiStrings, true) }149// Type is found in Header.Type.150type Type uint16151const (152 ET_NONE Type = 0 /* Unknown type. */153 ET_REL Type = 1 /* Relocatable. */154 ET_EXEC Type = 2 /* Executable. */155 ET_DYN Type = 3 /* Shared object. */156 ET_CORE Type = 4 /* Core file. */157 ET_LOOS Type = 0xfe00 /* First operating system specific. */158 ET_HIOS Type = 0xfeff /* Last operating system-specific. */159 ET_LOPROC Type = 0xff00 /* First processor-specific. */160 ET_HIPROC Type = 0xffff /* Last processor-specific. */161)162var typeStrings = []intName{163 {0, "ET_NONE"},164 {1, "ET_REL"},165 {2, "ET_EXEC"},166 {3, "ET_DYN"},167 {4, "ET_CORE"},168 {0xfe00, "ET_LOOS"},169 {0xfeff, "ET_HIOS"},170 {0xff00, "ET_LOPROC"},171 {0xffff, "ET_HIPROC"},172}173func (i Type) String() string { return stringName(uint32(i), typeStrings, false) }174func (i Type) GoString() string { return stringName(uint32(i), typeStrings, true) }175// Machine is found in Header.Machine.176type Machine uint16177const (178 EM_NONE Machine = 0 /* Unknown machine. */179 EM_M32 Machine = 1 /* AT&T WE32100. */180 EM_SPARC Machine = 2 /* Sun SPARC. */181 EM_386 Machine = 3 /* Intel i386. */182 EM_68K Machine = 4 /* Motorola 68000. */183 EM_88K Machine = 5 /* Motorola 88000. */184 EM_860 Machine = 7 /* Intel i860. */185 EM_MIPS Machine = 8 /* MIPS R3000 Big-Endian only. */186 EM_S370 Machine = 9 /* IBM System/370. */187 EM_MIPS_RS3_LE Machine = 10 /* MIPS R3000 Little-Endian. */188 EM_PARISC Machine = 15 /* HP PA-RISC. */189 EM_VPP500 Machine = 17 /* Fujitsu VPP500. */190 EM_SPARC32PLUS Machine = 18 /* SPARC v8plus. */191 EM_960 Machine = 19 /* Intel 80960. */192 EM_PPC Machine = 20 /* PowerPC 32-bit. */193 EM_PPC64 Machine = 21 /* PowerPC 64-bit. */194 EM_S390 Machine = 22 /* IBM System/390. */195 EM_V800 Machine = 36 /* NEC V800. */196 EM_FR20 Machine = 37 /* Fujitsu FR20. */197 EM_RH32 Machine = 38 /* TRW RH-32. */198 EM_RCE Machine = 39 /* Motorola RCE. */199 EM_ARM Machine = 40 /* ARM. */200 EM_SH Machine = 42 /* Hitachi SH. */201 EM_SPARCV9 Machine = 43 /* SPARC v9 64-bit. */202 EM_TRICORE Machine = 44 /* Siemens TriCore embedded processor. */203 EM_ARC Machine = 45 /* Argonaut RISC Core. */204 EM_H8_300 Machine = 46 /* Hitachi H8/300. */205 EM_H8_300H Machine = 47 /* Hitachi H8/300H. */206 EM_H8S Machine = 48 /* Hitachi H8S. */207 EM_H8_500 Machine = 49 /* Hitachi H8/500. */208 EM_IA_64 Machine = 50 /* Intel IA-64 Processor. */209 EM_MIPS_X Machine = 51 /* Stanford MIPS-X. */210 EM_COLDFIRE Machine = 52 /* Motorola ColdFire. */211 EM_68HC12 Machine = 53 /* Motorola M68HC12. */212 EM_MMA Machine = 54 /* Fujitsu MMA. */213 EM_PCP Machine = 55 /* Siemens PCP. */214 EM_NCPU Machine = 56 /* Sony nCPU. */215 EM_NDR1 Machine = 57 /* Denso NDR1 microprocessor. */216 EM_STARCORE Machine = 58 /* Motorola Star*Core processor. */217 EM_ME16 Machine = 59 /* Toyota ME16 processor. */218 EM_ST100 Machine = 60 /* STMicroelectronics ST100 processor. */219 EM_TINYJ Machine = 61 /* Advanced Logic Corp. TinyJ processor. */220 EM_X86_64 Machine = 62 /* Advanced Micro Devices x86-64 */221 EM_PDSP Machine = 63 /* Sony DSP Processor */222 EM_PDP10 Machine = 64 /* Digital Equipment Corp. PDP-10 */223 EM_PDP11 Machine = 65 /* Digital Equipment Corp. PDP-11 */224 EM_FX66 Machine = 66 /* Siemens FX66 microcontroller */225 EM_ST9PLUS Machine = 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */226 EM_ST7 Machine = 68 /* STMicroelectronics ST7 8-bit microcontroller */227 EM_68HC16 Machine = 69 /* Motorola MC68HC16 Microcontroller */228 EM_68HC11 Machine = 70 /* Motorola MC68HC11 Microcontroller */229 EM_68HC08 Machine = 71 /* Motorola MC68HC08 Microcontroller */230 EM_68HC05 Machine = 72 /* Motorola MC68HC05 Microcontroller */231 EM_SVX Machine = 73 /* Silicon Graphics SVx */232 EM_ST19 Machine = 74 /* STMicroelectronics ST19 8-bit microcontroller */233 EM_VAX Machine = 75 /* Digital VAX */234 EM_CRIS Machine = 76 /* Axis Communications 32-bit embedded processor */235 EM_JAVELIN Machine = 77 /* Infineon Technologies 32-bit embedded processor */236 EM_FIREPATH Machine = 78 /* Element 14 64-bit DSP Processor */237 EM_ZSP Machine = 79 /* LSI Logic 16-bit DSP Processor */238 EM_MMIX Machine = 80 /* Donald Knuth's educational 64-bit processor */239 EM_HUANY Machine = 81 /* Harvard University machine-independent object files */240 EM_PRISM Machine = 82 /* SiTera Prism */241 EM_AVR Machine = 83 /* Atmel AVR 8-bit microcontroller */242 EM_FR30 Machine = 84 /* Fujitsu FR30 */243 EM_D10V Machine = 85 /* Mitsubishi D10V */244 EM_D30V Machine = 86 /* Mitsubishi D30V */245 EM_V850 Machine = 87 /* NEC v850 */246 EM_M32R Machine = 88 /* Mitsubishi M32R */247 EM_MN10300 Machine = 89 /* Matsushita MN10300 */248 EM_MN10200 Machine = 90 /* Matsushita MN10200 */249 EM_PJ Machine = 91 /* picoJava */250 EM_OPENRISC Machine = 92 /* OpenRISC 32-bit embedded processor */251 EM_ARC_COMPACT Machine = 93 /* ARC International ARCompact processor (old spelling/synonym: EM_ARC_A5) */252 EM_XTENSA Machine = 94 /* Tensilica Xtensa Architecture */253 EM_VIDEOCORE Machine = 95 /* Alphamosaic VideoCore processor */254 EM_TMM_GPP Machine = 96 /* Thompson Multimedia General Purpose Processor */255 EM_NS32K Machine = 97 /* National Semiconductor 32000 series */256 EM_TPC Machine = 98 /* Tenor Network TPC processor */257 EM_SNP1K Machine = 99 /* Trebia SNP 1000 processor */258 EM_ST200 Machine = 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */259 EM_IP2K Machine = 101 /* Ubicom IP2xxx microcontroller family */260 EM_MAX Machine = 102 /* MAX Processor */261 EM_CR Machine = 103 /* National Semiconductor CompactRISC microprocessor */262 EM_F2MC16 Machine = 104 /* Fujitsu F2MC16 */263 EM_MSP430 Machine = 105 /* Texas Instruments embedded microcontroller msp430 */264 EM_BLACKFIN Machine = 106 /* Analog Devices Blackfin (DSP) processor */265 EM_SE_C33 Machine = 107 /* S1C33 Family of Seiko Epson processors */266 EM_SEP Machine = 108 /* Sharp embedded microprocessor */267 EM_ARCA Machine = 109 /* Arca RISC Microprocessor */268 EM_UNICORE Machine = 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */269 EM_EXCESS Machine = 111 /* eXcess: 16/32/64-bit configurable embedded CPU */270 EM_DXP Machine = 112 /* Icera Semiconductor Inc. Deep Execution Processor */271 EM_ALTERA_NIOS2 Machine = 113 /* Altera Nios II soft-core processor */272 EM_CRX Machine = 114 /* National Semiconductor CompactRISC CRX microprocessor */273 EM_XGATE Machine = 115 /* Motorola XGATE embedded processor */274 EM_C166 Machine = 116 /* Infineon C16x/XC16x processor */275 EM_M16C Machine = 117 /* Renesas M16C series microprocessors */276 EM_DSPIC30F Machine = 118 /* Microchip Technology dsPIC30F Digital Signal Controller */277 EM_CE Machine = 119 /* Freescale Communication Engine RISC core */278 EM_M32C Machine = 120 /* Renesas M32C series microprocessors */279 EM_TSK3000 Machine = 131 /* Altium TSK3000 core */280 EM_RS08 Machine = 132 /* Freescale RS08 embedded processor */281 EM_SHARC Machine = 133 /* Analog Devices SHARC family of 32-bit DSP processors */282 EM_ECOG2 Machine = 134 /* Cyan Technology eCOG2 microprocessor */283 EM_SCORE7 Machine = 135 /* Sunplus S+core7 RISC processor */284 EM_DSP24 Machine = 136 /* New Japan Radio (NJR) 24-bit DSP Processor */285 EM_VIDEOCORE3 Machine = 137 /* Broadcom VideoCore III processor */286 EM_LATTICEMICO32 Machine = 138 /* RISC processor for Lattice FPGA architecture */287 EM_SE_C17 Machine = 139 /* Seiko Epson C17 family */288 EM_TI_C6000 Machine = 140 /* The Texas Instruments TMS320C6000 DSP family */289 EM_TI_C2000 Machine = 141 /* The Texas Instruments TMS320C2000 DSP family */290 EM_TI_C5500 Machine = 142 /* The Texas Instruments TMS320C55x DSP family */291 EM_TI_ARP32 Machine = 143 /* Texas Instruments Application Specific RISC Processor, 32bit fetch */292 EM_TI_PRU Machine = 144 /* Texas Instruments Programmable Realtime Unit */293 EM_MMDSP_PLUS Machine = 160 /* STMicroelectronics 64bit VLIW Data Signal Processor */294 EM_CYPRESS_M8C Machine = 161 /* Cypress M8C microprocessor */295 EM_R32C Machine = 162 /* Renesas R32C series microprocessors */296 EM_TRIMEDIA Machine = 163 /* NXP Semiconductors TriMedia architecture family */297 EM_QDSP6 Machine = 164 /* QUALCOMM DSP6 Processor */298 EM_8051 Machine = 165 /* Intel 8051 and variants */299 EM_STXP7X Machine = 166 /* STMicroelectronics STxP7x family of configurable and extensible RISC processors */300 EM_NDS32 Machine = 167 /* Andes Technology compact code size embedded RISC processor family */301 EM_ECOG1 Machine = 168 /* Cyan Technology eCOG1X family */302 EM_ECOG1X Machine = 168 /* Cyan Technology eCOG1X family */303 EM_MAXQ30 Machine = 169 /* Dallas Semiconductor MAXQ30 Core Micro-controllers */304 EM_XIMO16 Machine = 170 /* New Japan Radio (NJR) 16-bit DSP Processor */305 EM_MANIK Machine = 171 /* M2000 Reconfigurable RISC Microprocessor */306 EM_CRAYNV2 Machine = 172 /* Cray Inc. NV2 vector architecture */307 EM_RX Machine = 173 /* Renesas RX family */308 EM_METAG Machine = 174 /* Imagination Technologies META processor architecture */309 EM_MCST_ELBRUS Machine = 175 /* MCST Elbrus general purpose hardware architecture */310 EM_ECOG16 Machine = 176 /* Cyan Technology eCOG16 family */311 EM_CR16 Machine = 177 /* National Semiconductor CompactRISC CR16 16-bit microprocessor */312 EM_ETPU Machine = 178 /* Freescale Extended Time Processing Unit */313 EM_SLE9X Machine = 179 /* Infineon Technologies SLE9X core */314 EM_L10M Machine = 180 /* Intel L10M */315 EM_K10M Machine = 181 /* Intel K10M */316 EM_AARCH64 Machine = 183 /* ARM 64-bit Architecture (AArch64) */317 EM_AVR32 Machine = 185 /* Atmel Corporation 32-bit microprocessor family */318 EM_STM8 Machine = 186 /* STMicroeletronics STM8 8-bit microcontroller */319 EM_TILE64 Machine = 187 /* Tilera TILE64 multicore architecture family */320 EM_TILEPRO Machine = 188 /* Tilera TILEPro multicore architecture family */321 EM_MICROBLAZE Machine = 189 /* Xilinx MicroBlaze 32-bit RISC soft processor core */322 EM_CUDA Machine = 190 /* NVIDIA CUDA architecture */323 EM_TILEGX Machine = 191 /* Tilera TILE-Gx multicore architecture family */324 EM_CLOUDSHIELD Machine = 192 /* CloudShield architecture family */325 EM_COREA_1ST Machine = 193 /* KIPO-KAIST Core-A 1st generation processor family */326 EM_COREA_2ND Machine = 194 /* KIPO-KAIST Core-A 2nd generation processor family */327 EM_ARC_COMPACT2 Machine = 195 /* Synopsys ARCompact V2 */328 EM_OPEN8 Machine = 196 /* Open8 8-bit RISC soft processor core */329 EM_RL78 Machine = 197 /* Renesas RL78 family */330 EM_VIDEOCORE5 Machine = 198 /* Broadcom VideoCore V processor */331 EM_78KOR Machine = 199 /* Renesas 78KOR family */332 EM_56800EX Machine = 200 /* Freescale 56800EX Digital Signal Controller (DSC) */333 EM_BA1 Machine = 201 /* Beyond BA1 CPU architecture */334 EM_BA2 Machine = 202 /* Beyond BA2 CPU architecture */335 EM_XCORE Machine = 203 /* XMOS xCORE processor family */336 EM_MCHP_PIC Machine = 204 /* Microchip 8-bit PIC(r) family */337 EM_INTEL205 Machine = 205 /* Reserved by Intel */338 EM_INTEL206 Machine = 206 /* Reserved by Intel */339 EM_INTEL207 Machine = 207 /* Reserved by Intel */340 EM_INTEL208 Machine = 208 /* Reserved by Intel */341 EM_INTEL209 Machine = 209 /* Reserved by Intel */342 EM_KM32 Machine = 210 /* KM211 KM32 32-bit processor */343 EM_KMX32 Machine = 211 /* KM211 KMX32 32-bit processor */344 EM_KMX16 Machine = 212 /* KM211 KMX16 16-bit processor */345 EM_KMX8 Machine = 213 /* KM211 KMX8 8-bit processor */346 EM_KVARC Machine = 214 /* KM211 KVARC processor */347 EM_CDP Machine = 215 /* Paneve CDP architecture family */348 EM_COGE Machine = 216 /* Cognitive Smart Memory Processor */349 EM_COOL Machine = 217 /* Bluechip Systems CoolEngine */350 EM_NORC Machine = 218 /* Nanoradio Optimized RISC */351 EM_CSR_KALIMBA Machine = 219 /* CSR Kalimba architecture family */352 EM_Z80 Machine = 220 /* Zilog Z80 */353 EM_VISIUM Machine = 221 /* Controls and Data Services VISIUMcore processor */354 EM_FT32 Machine = 222 /* FTDI Chip FT32 high performance 32-bit RISC architecture */355 EM_MOXIE Machine = 223 /* Moxie processor family */356 EM_AMDGPU Machine = 224 /* AMD GPU architecture */357 EM_RISCV Machine = 243 /* RISC-V */358 EM_LANAI Machine = 244 /* Lanai 32-bit processor */359 EM_BPF Machine = 247 /* Linux BPF – in-kernel virtual machine */360 /* Non-standard or deprecated. */361 EM_486 Machine = 6 /* Intel i486. */362 EM_MIPS_RS4_BE Machine = 10 /* MIPS R4000 Big-Endian */363 EM_ALPHA_STD Machine = 41 /* Digital Alpha (standard value). */364 EM_ALPHA Machine = 0x9026 /* Alpha (written in the absence of an ABI) */365)366var machineStrings = []intName{367 {0, "EM_NONE"},368 {1, "EM_M32"},369 {2, "EM_SPARC"},370 {3, "EM_386"},371 {4, "EM_68K"},372 {5, "EM_88K"},373 {7, "EM_860"},374 {8, "EM_MIPS"},375 {9, "EM_S370"},376 {10, "EM_MIPS_RS3_LE"},377 {15, "EM_PARISC"},378 {17, "EM_VPP500"},379 {18, "EM_SPARC32PLUS"},380 {19, "EM_960"},381 {20, "EM_PPC"},382 {21, "EM_PPC64"},383 {22, "EM_S390"},384 {36, "EM_V800"},385 {37, "EM_FR20"},386 {38, "EM_RH32"},387 {39, "EM_RCE"},388 {40, "EM_ARM"},389 {42, "EM_SH"},390 {43, "EM_SPARCV9"},391 {44, "EM_TRICORE"},392 {45, "EM_ARC"},393 {46, "EM_H8_300"},394 {47, "EM_H8_300H"},395 {48, "EM_H8S"},396 {49, "EM_H8_500"},397 {50, "EM_IA_64"},398 {51, "EM_MIPS_X"},399 {52, "EM_COLDFIRE"},400 {53, "EM_68HC12"},401 {54, "EM_MMA"},402 {55, "EM_PCP"},403 {56, "EM_NCPU"},404 {57, "EM_NDR1"},405 {58, "EM_STARCORE"},406 {59, "EM_ME16"},407 {60, "EM_ST100"},408 {61, "EM_TINYJ"},409 {62, "EM_X86_64"},410 {63, "EM_PDSP"},411 {64, "EM_PDP10"},412 {65, "EM_PDP11"},413 {66, "EM_FX66"},414 {67, "EM_ST9PLUS"},415 {68, "EM_ST7"},416 {69, "EM_68HC16"},417 {70, "EM_68HC11"},418 {71, "EM_68HC08"},419 {72, "EM_68HC05"},420 {73, "EM_SVX"},421 {74, "EM_ST19"},422 {75, "EM_VAX"},423 {76, "EM_CRIS"},424 {77, "EM_JAVELIN"},425 {78, "EM_FIREPATH"},426 {79, "EM_ZSP"},427 {80, "EM_MMIX"},428 {81, "EM_HUANY"},429 {82, "EM_PRISM"},430 {83, "EM_AVR"},431 {84, "EM_FR30"},432 {85, "EM_D10V"},433 {86, "EM_D30V"},434 {87, "EM_V850"},435 {88, "EM_M32R"},436 {89, "EM_MN10300"},437 {90, "EM_MN10200"},438 {91, "EM_PJ"},439 {92, "EM_OPENRISC"},440 {93, "EM_ARC_COMPACT"},441 {94, "EM_XTENSA"},442 {95, "EM_VIDEOCORE"},443 {96, "EM_TMM_GPP"},444 {97, "EM_NS32K"},445 {98, "EM_TPC"},446 {99, "EM_SNP1K"},447 {100, "EM_ST200"},448 {101, "EM_IP2K"},449 {102, "EM_MAX"},450 {103, "EM_CR"},451 {104, "EM_F2MC16"},452 {105, "EM_MSP430"},453 {106, "EM_BLACKFIN"},454 {107, "EM_SE_C33"},455 {108, "EM_SEP"},456 {109, "EM_ARCA"},457 {110, "EM_UNICORE"},458 {111, "EM_EXCESS"},459 {112, "EM_DXP"},460 {113, "EM_ALTERA_NIOS2"},461 {114, "EM_CRX"},462 {115, "EM_XGATE"},463 {116, "EM_C166"},464 {117, "EM_M16C"},465 {118, "EM_DSPIC30F"},466 {119, "EM_CE"},467 {120, "EM_M32C"},468 {131, "EM_TSK3000"},469 {132, "EM_RS08"},470 {133, "EM_SHARC"},471 {134, "EM_ECOG2"},472 {135, "EM_SCORE7"},473 {136, "EM_DSP24"},474 {137, "EM_VIDEOCORE3"},475 {138, "EM_LATTICEMICO32"},476 {139, "EM_SE_C17"},477 {140, "EM_TI_C6000"},478 {141, "EM_TI_C2000"},479 {142, "EM_TI_C5500"},480 {143, "EM_TI_ARP32"},481 {144, "EM_TI_PRU"},482 {160, "EM_MMDSP_PLUS"},483 {161, "EM_CYPRESS_M8C"},484 {162, "EM_R32C"},485 {163, "EM_TRIMEDIA"},486 {164, "EM_QDSP6"},487 {165, "EM_8051"},488 {166, "EM_STXP7X"},489 {167, "EM_NDS32"},490 {168, "EM_ECOG1"},491 {168, "EM_ECOG1X"},492 {169, "EM_MAXQ30"},493 {170, "EM_XIMO16"},494 {171, "EM_MANIK"},495 {172, "EM_CRAYNV2"},496 {173, "EM_RX"},497 {174, "EM_METAG"},498 {175, "EM_MCST_ELBRUS"},499 {176, "EM_ECOG16"},500 {177, "EM_CR16"},501 {178, "EM_ETPU"},502 {179, "EM_SLE9X"},503 {180, "EM_L10M"},504 {181, "EM_K10M"},505 {183, "EM_AARCH64"},506 {185, "EM_AVR32"},507 {186, "EM_STM8"},508 {187, "EM_TILE64"},509 {188, "EM_TILEPRO"},510 {189, "EM_MICROBLAZE"},511 {190, "EM_CUDA"},512 {191, "EM_TILEGX"},513 {192, "EM_CLOUDSHIELD"},514 {193, "EM_COREA_1ST"},515 {194, "EM_COREA_2ND"},516 {195, "EM_ARC_COMPACT2"},517 {196, "EM_OPEN8"},518 {197, "EM_RL78"},519 {198, "EM_VIDEOCORE5"},520 {199, "EM_78KOR"},521 {200, "EM_56800EX"},522 {201, "EM_BA1"},523 {202, "EM_BA2"},524 {203, "EM_XCORE"},525 {204, "EM_MCHP_PIC"},526 {205, "EM_INTEL205"},527 {206, "EM_INTEL206"},528 {207, "EM_INTEL207"},529 {208, "EM_INTEL208"},530 {209, "EM_INTEL209"},531 {210, "EM_KM32"},532 {211, "EM_KMX32"},533 {212, "EM_KMX16"},534 {213, "EM_KMX8"},535 {214, "EM_KVARC"},536 {215, "EM_CDP"},537 {216, "EM_COGE"},538 {217, "EM_COOL"},539 {218, "EM_NORC"},540 {219, "EM_CSR_KALIMBA "},541 {220, "EM_Z80 "},542 {221, "EM_VISIUM "},543 {222, "EM_FT32 "},544 {223, "EM_MOXIE"},545 {224, "EM_AMDGPU"},546 {243, "EM_RISCV"},547 {244, "EM_LANAI"},548 {247, "EM_BPF"},549 /* Non-standard or deprecated. */550 {6, "EM_486"},551 {10, "EM_MIPS_RS4_BE"},552 {41, "EM_ALPHA_STD"},553 {0x9026, "EM_ALPHA"},554}555func (i Machine) String() string { return stringName(uint32(i), machineStrings, false) }556func (i Machine) GoString() string { return stringName(uint32(i), machineStrings, true) }557// Special section indices.558type SectionIndex int559const (560 SHN_UNDEF SectionIndex = 0 /* Undefined, missing, irrelevant. */561 SHN_LORESERVE SectionIndex = 0xff00 /* First of reserved range. */562 SHN_LOPROC SectionIndex = 0xff00 /* First processor-specific. */563 SHN_HIPROC SectionIndex = 0xff1f /* Last processor-specific. */564 SHN_LOOS SectionIndex = 0xff20 /* First operating system-specific. */565 SHN_HIOS SectionIndex = 0xff3f /* Last operating system-specific. */566 SHN_ABS SectionIndex = 0xfff1 /* Absolute values. */567 SHN_COMMON SectionIndex = 0xfff2 /* Common data. */568 SHN_XINDEX SectionIndex = 0xffff /* Escape; index stored elsewhere. */569 SHN_HIRESERVE SectionIndex = 0xffff /* Last of reserved range. */570)571var shnStrings = []intName{572 {0, "SHN_UNDEF"},573 {0xff00, "SHN_LOPROC"},574 {0xff20, "SHN_LOOS"},575 {0xfff1, "SHN_ABS"},576 {0xfff2, "SHN_COMMON"},577 {0xffff, "SHN_XINDEX"},578}579func (i SectionIndex) String() string { return stringName(uint32(i), shnStrings, false) }580func (i SectionIndex) GoString() string { return stringName(uint32(i), shnStrings, true) }581// Section type.582type SectionType uint32583const (584 SHT_NULL SectionType = 0 /* inactive */585 SHT_PROGBITS SectionType = 1 /* program defined information */586 SHT_SYMTAB SectionType = 2 /* symbol table section */587 SHT_STRTAB SectionType = 3 /* string table section */588 SHT_RELA SectionType = 4 /* relocation section with addends */589 SHT_HASH SectionType = 5 /* symbol hash table section */590 SHT_DYNAMIC SectionType = 6 /* dynamic section */591 SHT_NOTE SectionType = 7 /* note section */592 SHT_NOBITS SectionType = 8 /* no space section */593 SHT_REL SectionType = 9 /* relocation section - no addends */594 SHT_SHLIB SectionType = 10 /* reserved - purpose unknown */595 SHT_DYNSYM SectionType = 11 /* dynamic symbol table section */596 SHT_INIT_ARRAY SectionType = 14 /* Initialization function pointers. */597 SHT_FINI_ARRAY SectionType = 15 /* Termination function pointers. */598 SHT_PREINIT_ARRAY SectionType = 16 /* Pre-initialization function ptrs. */599 SHT_GROUP SectionType = 17 /* Section group. */600 SHT_SYMTAB_SHNDX SectionType = 18 /* Section indexes (see SHN_XINDEX). */601 SHT_LOOS SectionType = 0x60000000 /* First of OS specific semantics */602 SHT_GNU_ATTRIBUTES SectionType = 0x6ffffff5 /* GNU object attributes */603 SHT_GNU_HASH SectionType = 0x6ffffff6 /* GNU hash table */604 SHT_GNU_LIBLIST SectionType = 0x6ffffff7 /* GNU prelink library list */605 SHT_GNU_VERDEF SectionType = 0x6ffffffd /* GNU version definition section */606 SHT_GNU_VERNEED SectionType = 0x6ffffffe /* GNU version needs section */607 SHT_GNU_VERSYM SectionType = 0x6fffffff /* GNU version symbol table */608 SHT_HIOS SectionType = 0x6fffffff /* Last of OS specific semantics */609 SHT_LOPROC SectionType = 0x70000000 /* reserved range for processor */610 SHT_HIPROC SectionType = 0x7fffffff /* specific section header types */611 SHT_LOUSER SectionType = 0x80000000 /* reserved range for application */612 SHT_HIUSER SectionType = 0xffffffff /* specific indexes */613)614var shtStrings = []intName{615 {0, "SHT_NULL"},616 {1, "SHT_PROGBITS"},617 {2, "SHT_SYMTAB"},618 {3, "SHT_STRTAB"},619 {4, "SHT_RELA"},620 {5, "SHT_HASH"},621 {6, "SHT_DYNAMIC"},622 {7, "SHT_NOTE"},623 {8, "SHT_NOBITS"},624 {9, "SHT_REL"},625 {10, "SHT_SHLIB"},626 {11, "SHT_DYNSYM"},627 {14, "SHT_INIT_ARRAY"},628 {15, "SHT_FINI_ARRAY"},629 {16, "SHT_PREINIT_ARRAY"},630 {17, "SHT_GROUP"},631 {18, "SHT_SYMTAB_SHNDX"},632 {0x60000000, "SHT_LOOS"},633 {0x6ffffff5, "SHT_GNU_ATTRIBUTES"},634 {0x6ffffff6, "SHT_GNU_HASH"},635 {0x6ffffff7, "SHT_GNU_LIBLIST"},636 {0x6ffffffd, "SHT_GNU_VERDEF"},637 {0x6ffffffe, "SHT_GNU_VERNEED"},638 {0x6fffffff, "SHT_GNU_VERSYM"},639 {0x70000000, "SHT_LOPROC"},640 {0x7fffffff, "SHT_HIPROC"},641 {0x80000000, "SHT_LOUSER"},642 {0xffffffff, "SHT_HIUSER"},643}644func (i SectionType) String() string { return stringName(uint32(i), shtStrings, false) }645func (i SectionType) GoString() string { return stringName(uint32(i), shtStrings, true) }646// Section flags.647type SectionFlag uint32648const (649 SHF_WRITE SectionFlag = 0x1 /* Section contains writable data. */650 SHF_ALLOC SectionFlag = 0x2 /* Section occupies memory. */651 SHF_EXECINSTR SectionFlag = 0x4 /* Section contains instructions. */652 SHF_MERGE SectionFlag = 0x10 /* Section may be merged. */653 SHF_STRINGS SectionFlag = 0x20 /* Section contains strings. */654 SHF_INFO_LINK SectionFlag = 0x40 /* sh_info holds section index. */655 SHF_LINK_ORDER SectionFlag = 0x80 /* Special ordering requirements. */656 SHF_OS_NONCONFORMING SectionFlag = 0x100 /* OS-specific processing required. */657 SHF_GROUP SectionFlag = 0x200 /* Member of section group. */658 SHF_TLS SectionFlag = 0x400 /* Section contains TLS data. */659 SHF_COMPRESSED SectionFlag = 0x800 /* Section is compressed. */660 SHF_MASKOS SectionFlag = 0x0ff00000 /* OS-specific semantics. */661 SHF_MASKPROC SectionFlag = 0xf0000000 /* Processor-specific semantics. */662)663var shfStrings = []intName{664 {0x1, "SHF_WRITE"},665 {0x2, "SHF_ALLOC"},666 {0x4, "SHF_EXECINSTR"},667 {0x10, "SHF_MERGE"},668 {0x20, "SHF_STRINGS"},669 {0x40, "SHF_INFO_LINK"},670 {0x80, "SHF_LINK_ORDER"},671 {0x100, "SHF_OS_NONCONFORMING"},672 {0x200, "SHF_GROUP"},673 {0x400, "SHF_TLS"},674 {0x800, "SHF_COMPRESSED"},675}676func (i SectionFlag) String() string { return flagName(uint32(i), shfStrings, false) }677func (i SectionFlag) GoString() string { return flagName(uint32(i), shfStrings, true) }678// Section compression type.679type CompressionType int680const (681 COMPRESS_ZLIB CompressionType = 1 /* ZLIB compression. */682 COMPRESS_LOOS CompressionType = 0x60000000 /* First OS-specific. */683 COMPRESS_HIOS CompressionType = 0x6fffffff /* Last OS-specific. */684 COMPRESS_LOPROC CompressionType = 0x70000000 /* First processor-specific type. */685 COMPRESS_HIPROC CompressionType = 0x7fffffff /* Last processor-specific type. */686)687var compressionStrings = []intName{688 {0, "COMPRESS_ZLIB"},689 {0x60000000, "COMPRESS_LOOS"},690 {0x6fffffff, "COMPRESS_HIOS"},691 {0x70000000, "COMPRESS_LOPROC"},692 {0x7fffffff, "COMPRESS_HIPROC"},693}694func (i CompressionType) String() string { return stringName(uint32(i), compressionStrings, false) }695func (i CompressionType) GoString() string { return stringName(uint32(i), compressionStrings, true) }696// Prog.Type697type ProgType int698const (699 PT_NULL ProgType = 0 /* Unused entry. */700 PT_LOAD ProgType = 1 /* Loadable segment. */701 PT_DYNAMIC ProgType = 2 /* Dynamic linking information segment. */702 PT_INTERP ProgType = 3 /* Pathname of interpreter. */703 PT_NOTE ProgType = 4 /* Auxiliary information. */704 PT_SHLIB ProgType = 5 /* Reserved (not used). */705 PT_PHDR ProgType = 6 /* Location of program header itself. */706 PT_TLS ProgType = 7 /* Thread local storage segment */707 PT_LOOS ProgType = 0x60000000 /* First OS-specific. */708 PT_HIOS ProgType = 0x6fffffff /* Last OS-specific. */709 PT_LOPROC ProgType = 0x70000000 /* First processor-specific type. */710 PT_HIPROC ProgType = 0x7fffffff /* Last processor-specific type. */711)712var ptStrings = []intName{713 {0, "PT_NULL"},714 {1, "PT_LOAD"},715 {2, "PT_DYNAMIC"},716 {3, "PT_INTERP"},717 {4, "PT_NOTE"},718 {5, "PT_SHLIB"},719 {6, "PT_PHDR"},720 {7, "PT_TLS"},721 {0x60000000, "PT_LOOS"},722 {0x6fffffff, "PT_HIOS"},723 {0x70000000, "PT_LOPROC"},724 {0x7fffffff, "PT_HIPROC"},725}726func (i ProgType) String() string { return stringName(uint32(i), ptStrings, false) }727func (i ProgType) GoString() string { return stringName(uint32(i), ptStrings, true) }728// Prog.Flag729type ProgFlag uint32730const (731 PF_X ProgFlag = 0x1 /* Executable. */732 PF_W ProgFlag = 0x2 /* Writable. */733 PF_R ProgFlag = 0x4 /* Readable. */734 PF_MASKOS ProgFlag = 0x0ff00000 /* Operating system-specific. */735 PF_MASKPROC ProgFlag = 0xf0000000 /* Processor-specific. */736)737var pfStrings = []intName{738 {0x1, "PF_X"},739 {0x2, "PF_W"},740 {0x4, "PF_R"},741}742func (i ProgFlag) String() string { return flagName(uint32(i), pfStrings, false) }743func (i ProgFlag) GoString() string { return flagName(uint32(i), pfStrings, true) }744// Dyn.Tag745type DynTag int746const (747 DT_NULL DynTag = 0 /* Terminating entry. */748 DT_NEEDED DynTag = 1 /* String table offset of a needed shared library. */749 DT_PLTRELSZ DynTag = 2 /* Total size in bytes of PLT relocations. */750 DT_PLTGOT DynTag = 3 /* Processor-dependent address. */751 DT_HASH DynTag = 4 /* Address of symbol hash table. */752 DT_STRTAB DynTag = 5 /* Address of string table. */753 DT_SYMTAB DynTag = 6 /* Address of symbol table. */754 DT_RELA DynTag = 7 /* Address of ElfNN_Rela relocations. */755 DT_RELASZ DynTag = 8 /* Total size of ElfNN_Rela relocations. */756 DT_RELAENT DynTag = 9 /* Size of each ElfNN_Rela relocation entry. */757 DT_STRSZ DynTag = 10 /* Size of string table. */758 DT_SYMENT DynTag = 11 /* Size of each symbol table entry. */759 DT_INIT DynTag = 12 /* Address of initialization function. */760 DT_FINI DynTag = 13 /* Address of finalization function. */761 DT_SONAME DynTag = 14 /* String table offset of shared object name. */762 DT_RPATH DynTag = 15 /* String table offset of library path. [sup] */763 DT_SYMBOLIC DynTag = 16 /* Indicates "symbolic" linking. [sup] */764 DT_REL DynTag = 17 /* Address of ElfNN_Rel relocations. */765 DT_RELSZ DynTag = 18 /* Total size of ElfNN_Rel relocations. */766 DT_RELENT DynTag = 19 /* Size of each ElfNN_Rel relocation. */767 DT_PLTREL DynTag = 20 /* Type of relocation used for PLT. */768 DT_DEBUG DynTag = 21 /* Reserved (not used). */769 DT_TEXTREL DynTag = 22 /* Indicates there may be relocations in non-writable segments. [sup] */770 DT_JMPREL DynTag = 23 /* Address of PLT relocations. */771 DT_BIND_NOW DynTag = 24 /* [sup] */772 DT_INIT_ARRAY DynTag = 25 /* Address of the array of pointers to initialization functions */773 DT_FINI_ARRAY DynTag = 26 /* Address of the array of pointers to termination functions */774 DT_INIT_ARRAYSZ DynTag = 27 /* Size in bytes of the array of initialization functions. */775 DT_FINI_ARRAYSZ DynTag = 28 /* Size in bytes of the array of termination functions. */776 DT_RUNPATH DynTag = 29 /* String table offset of a null-terminated library search path string. */777 DT_FLAGS DynTag = 30 /* Object specific flag values. */778 DT_ENCODING DynTag = 32 /* Values greater than or equal to DT_ENCODING779 and less than DT_LOOS follow the rules for780 the interpretation of the d_un union781 as follows: even == 'd_ptr', even == 'd_val'782 or none */783 DT_PREINIT_ARRAY DynTag = 32 /* Address of the array of pointers to pre-initialization functions. */784 DT_PREINIT_ARRAYSZ DynTag = 33 /* Size in bytes of the array of pre-initialization functions. */785 DT_LOOS DynTag = 0x6000000d /* First OS-specific */786 DT_HIOS DynTag = 0x6ffff000 /* Last OS-specific */787 DT_VERSYM DynTag = 0x6ffffff0788 DT_VERNEED DynTag = 0x6ffffffe789 DT_VERNEEDNUM DynTag = 0x6fffffff790 DT_LOPROC DynTag = 0x70000000 /* First processor-specific type. */791 DT_HIPROC DynTag = 0x7fffffff /* Last processor-specific type. */792)793var dtStrings = []intName{794 {0, "DT_NULL"},795 {1, "DT_NEEDED"},796 {2, "DT_PLTRELSZ"},797 {3, "DT_PLTGOT"},798 {4, "DT_HASH"},799 {5, "DT_STRTAB"},800 {6, "DT_SYMTAB"},801 {7, "DT_RELA"},802 {8, "DT_RELASZ"},803 {9, "DT_RELAENT"},804 {10, "DT_STRSZ"},805 {11, "DT_SYMENT"},806 {12, "DT_INIT"},807 {13, "DT_FINI"},808 {14, "DT_SONAME"},809 {15, "DT_RPATH"},810 {16, "DT_SYMBOLIC"},811 {17, "DT_REL"},812 {18, "DT_RELSZ"},813 {19, "DT_RELENT"},814 {20, "DT_PLTREL"},815 {21, "DT_DEBUG"},816 {22, "DT_TEXTREL"},817 {23, "DT_JMPREL"},818 {24, "DT_BIND_NOW"},819 {25, "DT_INIT_ARRAY"},820 {26, "DT_FINI_ARRAY"},821 {27, "DT_INIT_ARRAYSZ"},822 {28, "DT_FINI_ARRAYSZ"},823 {29, "DT_RUNPATH"},824 {30, "DT_FLAGS"},825 {32, "DT_ENCODING"},826 {32, "DT_PREINIT_ARRAY"},827 {33, "DT_PREINIT_ARRAYSZ"},828 {0x6000000d, "DT_LOOS"},829 {0x6ffff000, "DT_HIOS"},830 {0x6ffffff0, "DT_VERSYM"},831 {0x6ffffffe, "DT_VERNEED"},832 {0x6fffffff, "DT_VERNEEDNUM"},833 {0x70000000, "DT_LOPROC"},834 {0x7fffffff, "DT_HIPROC"},835}836func (i DynTag) String() string { return stringName(uint32(i), dtStrings, false) }837func (i DynTag) GoString() string { return stringName(uint32(i), dtStrings, true) }838// DT_FLAGS values.839type DynFlag int840const (841 DF_ORIGIN DynFlag = 0x0001 /* Indicates that the object being loaded may842 make reference to the843 $ORIGIN substitution string */844 DF_SYMBOLIC DynFlag = 0x0002 /* Indicates "symbolic" linking. */845 DF_TEXTREL DynFlag = 0x0004 /* Indicates there may be relocations in non-writable segments. */846 DF_BIND_NOW DynFlag = 0x0008 /* Indicates that the dynamic linker should847 process all relocations for the object848 containing this entry before transferring849 control to the program. */850 DF_STATIC_TLS DynFlag = 0x0010 /* Indicates that the shared object or851 executable contains code using a static852 thread-local storage scheme. */853)854var dflagStrings = []intName{855 {0x0001, "DF_ORIGIN"},856 {0x0002, "DF_SYMBOLIC"},857 {0x0004, "DF_TEXTREL"},858 {0x0008, "DF_BIND_NOW"},859 {0x0010, "DF_STATIC_TLS"},860}861func (i DynFlag) String() string { return flagName(uint32(i), dflagStrings, false) }862func (i DynFlag) GoString() string { return flagName(uint32(i), dflagStrings, true) }863// NType values; used in core files.864type NType int865const (866 NT_PRSTATUS NType = 1 /* Process status. */867 NT_FPREGSET NType = 2 /* Floating point registers. */868 NT_PRPSINFO NType = 3 /* Process state info. */869)870var ntypeStrings = []intName{871 {1, "NT_PRSTATUS"},872 {2, "NT_FPREGSET"},873 {3, "NT_PRPSINFO"},874}875func (i NType) String() string { return stringName(uint32(i), ntypeStrings, false) }876func (i NType) GoString() string { return stringName(uint32(i), ntypeStrings, true) }877/* Symbol Binding - ELFNN_ST_BIND - st_info */878type SymBind int879const (880 STB_LOCAL SymBind = 0 /* Local symbol */881 STB_GLOBAL SymBind = 1 /* Global symbol */882 STB_WEAK SymBind = 2 /* like global - lower precedence */883 STB_LOOS SymBind = 10 /* Reserved range for operating system */884 STB_HIOS SymBind = 12 /* specific semantics. */885 STB_LOPROC SymBind = 13 /* reserved range for processor */886 STB_HIPROC SymBind = 15 /* specific semantics. */887)888var stbStrings = []intName{889 {0, "STB_LOCAL"},890 {1, "STB_GLOBAL"},891 {2, "STB_WEAK"},892 {10, "STB_LOOS"},893 {12, "STB_HIOS"},894 {13, "STB_LOPROC"},895 {15, "STB_HIPROC"},896}897func (i SymBind) String() string { return stringName(uint32(i), stbStrings, false) }898func (i SymBind) GoString() string { return stringName(uint32(i), stbStrings, true) }899/* Symbol type - ELFNN_ST_TYPE - st_info */900type SymType int901const (902 STT_NOTYPE SymType = 0 /* Unspecified type. */903 STT_OBJECT SymType = 1 /* Data object. */904 STT_FUNC SymType = 2 /* Function. */905 STT_SECTION SymType = 3 /* Section. */906 STT_FILE SymType = 4 /* Source file. */907 STT_COMMON SymType = 5 /* Uninitialized common block. */908 STT_TLS SymType = 6 /* TLS object. */909 STT_LOOS SymType = 10 /* Reserved range for operating system */910 STT_HIOS SymType = 12 /* specific semantics. */911 STT_LOPROC SymType = 13 /* reserved range for processor */912 STT_HIPROC SymType = 15 /* specific semantics. */913)914var sttStrings = []intName{915 {0, "STT_NOTYPE"},916 {1, "STT_OBJECT"},917 {2, "STT_FUNC"},918 {3, "STT_SECTION"},919 {4, "STT_FILE"},920 {5, "STT_COMMON"},921 {6, "STT_TLS"},922 {10, "STT_LOOS"},923 {12, "STT_HIOS"},924 {13, "STT_LOPROC"},925 {15, "STT_HIPROC"},926}927func (i SymType) String() string { return stringName(uint32(i), sttStrings, false) }928func (i SymType) GoString() string { return stringName(uint32(i), sttStrings, true) }929/* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */930type SymVis int931const (932 STV_DEFAULT SymVis = 0x0 /* Default visibility (see binding). */933 STV_INTERNAL SymVis = 0x1 /* Special meaning in relocatable objects. */934 STV_HIDDEN SymVis = 0x2 /* Not visible. */935 STV_PROTECTED SymVis = 0x3 /* Visible but not preemptible. */936)937var stvStrings = []intName{938 {0x0, "STV_DEFAULT"},939 {0x1, "STV_INTERNAL"},940 {0x2, "STV_HIDDEN"},941 {0x3, "STV_PROTECTED"},942}943func (i SymVis) String() string { return stringName(uint32(i), stvStrings, false) }944func (i SymVis) GoString() string { return stringName(uint32(i), stvStrings, true) }945/*946 * Relocation types.947 */948// Relocation types for x86-64.949type R_X86_64 int950const (951 R_X86_64_NONE R_X86_64 = 0 /* No relocation. */952 R_X86_64_64 R_X86_64 = 1 /* Add 64 bit symbol value. */953 R_X86_64_PC32 R_X86_64 = 2 /* PC-relative 32 bit signed sym value. */954 R_X86_64_GOT32 R_X86_64 = 3 /* PC-relative 32 bit GOT offset. */955 R_X86_64_PLT32 R_X86_64 = 4 /* PC-relative 32 bit PLT offset. */956 R_X86_64_COPY R_X86_64 = 5 /* Copy data from shared object. */957 R_X86_64_GLOB_DAT R_X86_64 = 6 /* Set GOT entry to data address. */958 R_X86_64_JMP_SLOT R_X86_64 = 7 /* Set GOT entry to code address. */959 R_X86_64_RELATIVE R_X86_64 = 8 /* Add load address of shared object. */960 R_X86_64_GOTPCREL R_X86_64 = 9 /* Add 32 bit signed pcrel offset to GOT. */961 R_X86_64_32 R_X86_64 = 10 /* Add 32 bit zero extended symbol value */962 R_X86_64_32S R_X86_64 = 11 /* Add 32 bit sign extended symbol value */963 R_X86_64_16 R_X86_64 = 12 /* Add 16 bit zero extended symbol value */964 R_X86_64_PC16 R_X86_64 = 13 /* Add 16 bit signed extended pc relative symbol value */965 R_X86_64_8 R_X86_64 = 14 /* Add 8 bit zero extended symbol value */966 R_X86_64_PC8 R_X86_64 = 15 /* Add 8 bit signed extended pc relative symbol value */967 R_X86_64_DTPMOD64 R_X86_64 = 16 /* ID of module containing symbol */968 R_X86_64_DTPOFF64 R_X86_64 = 17 /* Offset in TLS block */969 R_X86_64_TPOFF64 R_X86_64 = 18 /* Offset in static TLS block */970 R_X86_64_TLSGD R_X86_64 = 19 /* PC relative offset to GD GOT entry */971 R_X86_64_TLSLD R_X86_64 = 20 /* PC relative offset to LD GOT entry */972 R_X86_64_DTPOFF32 R_X86_64 = 21 /* Offset in TLS block */973 R_X86_64_GOTTPOFF R_X86_64 = 22 /* PC relative offset to IE GOT entry */974 R_X86_64_TPOFF32 R_X86_64 = 23 /* Offset in static TLS block */975 R_X86_64_PC64 R_X86_64 = 24 /* PC relative 64-bit sign extended symbol value. */976 R_X86_64_GOTOFF64 R_X86_64 = 25977 R_X86_64_GOTPC32 R_X86_64 = 26978 R_X86_64_GOT64 R_X86_64 = 27979 R_X86_64_GOTPCREL64 R_X86_64 = 28980 R_X86_64_GOTPC64 R_X86_64 = 29981 R_X86_64_GOTPLT64 R_X86_64 = 30982 R_X86_64_PLTOFF64 R_X86_64 = 31983 R_X86_64_SIZE32 R_X86_64 = 32984 R_X86_64_SIZE64 R_X86_64 = 33985 R_X86_64_GOTPC32_TLSDESC R_X86_64 = 34986 R_X86_64_TLSDESC_CALL R_X86_64 = 35987 R_X86_64_TLSDESC R_X86_64 = 36988 R_X86_64_IRELATIVE R_X86_64 = 37989 R_X86_64_RELATIVE64 R_X86_64 = 38990 R_X86_64_PC32_BND R_X86_64 = 39991 R_X86_64_PLT32_BND R_X86_64 = 40992 R_X86_64_GOTPCRELX R_X86_64 = 41993 R_X86_64_REX_GOTPCRELX R_X86_64 = 42994)995var rx86_64Strings = []intName{996 {0, "R_X86_64_NONE"},997 {1, "R_X86_64_64"},998 {2, "R_X86_64_PC32"},999 {3, "R_X86_64_GOT32"},1000 {4, "R_X86_64_PLT32"},1001 {5, "R_X86_64_COPY"},1002 {6, "R_X86_64_GLOB_DAT"},1003 {7, "R_X86_64_JMP_SLOT"},1004 {8, "R_X86_64_RELATIVE"},1005 {9, "R_X86_64_GOTPCREL"},1006 {10, "R_X86_64_32"},1007 {11, "R_X86_64_32S"},1008 {12, "R_X86_64_16"},1009 {13, "R_X86_64_PC16"},1010 {14, "R_X86_64_8"},1011 {15, "R_X86_64_PC8"},1012 {16, "R_X86_64_DTPMOD64"},1013 {17, "R_X86_64_DTPOFF64"},1014 {18, "R_X86_64_TPOFF64"},1015 {19, "R_X86_64_TLSGD"},1016 {20, "R_X86_64_TLSLD"},1017 {21, "R_X86_64_DTPOFF32"},1018 {22, "R_X86_64_GOTTPOFF"},1019 {23, "R_X86_64_TPOFF32"},1020 {24, "R_X86_64_PC64"},1021 {25, "R_X86_64_GOTOFF64"},1022 {26, "R_X86_64_GOTPC32"},1023 {27, "R_X86_64_GOT64"},1024 {28, "R_X86_64_GOTPCREL64"},1025 {29, "R_X86_64_GOTPC64"},1026 {30, "R_X86_64_GOTPLT64"},1027 {31, "R_X86_64_PLTOFF64"},1028 {32, "R_X86_64_SIZE32"},1029 {33, "R_X86_64_SIZE64"},1030 {34, "R_X86_64_GOTPC32_TLSDESC"},1031 {35, "R_X86_64_TLSDESC_CALL"},1032 {36, "R_X86_64_TLSDESC"},1033 {37, "R_X86_64_IRELATIVE"},1034 {38, "R_X86_64_RELATIVE64"},1035 {39, "R_X86_64_PC32_BND"},1036 {40, "R_X86_64_PLT32_BND"},1037 {41, "R_X86_64_GOTPCRELX"},1038 {42, "R_X86_64_REX_GOTPCRELX"},1039}1040func (i R_X86_64) String() string { return stringName(uint32(i), rx86_64Strings, false) }1041func (i R_X86_64) GoString() string { return stringName(uint32(i), rx86_64Strings, true) }1042// Relocation types for AArch64 (aka arm64)1043type R_AARCH64 int1044const (1045 R_AARCH64_NONE R_AARCH64 = 01046 R_AARCH64_P32_ABS32 R_AARCH64 = 11047 R_AARCH64_P32_ABS16 R_AARCH64 = 21048 R_AARCH64_P32_PREL32 R_AARCH64 = 31049 R_AARCH64_P32_PREL16 R_AARCH64 = 41050 R_AARCH64_P32_MOVW_UABS_G0 R_AARCH64 = 51051 R_AARCH64_P32_MOVW_UABS_G0_NC R_AARCH64 = 61052 R_AARCH64_P32_MOVW_UABS_G1 R_AARCH64 = 71053 R_AARCH64_P32_MOVW_SABS_G0 R_AARCH64 = 81054 R_AARCH64_P32_LD_PREL_LO19 R_AARCH64 = 91055 R_AARCH64_P32_ADR_PREL_LO21 R_AARCH64 = 101056 R_AARCH64_P32_ADR_PREL_PG_HI21 R_AARCH64 = 111057 R_AARCH64_P32_ADD_ABS_LO12_NC R_AARCH64 = 121058 R_AARCH64_P32_LDST8_ABS_LO12_NC R_AARCH64 = 131059 R_AARCH64_P32_LDST16_ABS_LO12_NC R_AARCH64 = 141060 R_AARCH64_P32_LDST32_ABS_LO12_NC R_AARCH64 = 151061 R_AARCH64_P32_LDST64_ABS_LO12_NC R_AARCH64 = 161062 R_AARCH64_P32_LDST128_ABS_LO12_NC R_AARCH64 = 171063 R_AARCH64_P32_TSTBR14 R_AARCH64 = 181064 R_AARCH64_P32_CONDBR19 R_AARCH64 = 191065 R_AARCH64_P32_JUMP26 R_AARCH64 = 201066 R_AARCH64_P32_CALL26 R_AARCH64 = 211067 R_AARCH64_P32_GOT_LD_PREL19 R_AARCH64 = 251068 R_AARCH64_P32_ADR_GOT_PAGE R_AARCH64 = 261069 R_AARCH64_P32_LD32_GOT_LO12_NC R_AARCH64 = 271070 R_AARCH64_P32_TLSGD_ADR_PAGE21 R_AARCH64 = 811071 R_AARCH64_P32_TLSGD_ADD_LO12_NC R_AARCH64 = 821072 R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21 R_AARCH64 = 1031073 R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC R_AARCH64 = 1041074 R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19 R_AARCH64 = 1051075 R_AARCH64_P32_TLSLE_MOVW_TPREL_G1 R_AARCH64 = 1061076 R_AARCH64_P32_TLSLE_MOVW_TPREL_G0 R_AARCH64 = 1071077 R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC R_AARCH64 = 1081078 R_AARCH64_P32_TLSLE_ADD_TPREL_HI12 R_AARCH64 = 1091079 R_AARCH64_P32_TLSLE_ADD_TPREL_LO12 R_AARCH64 = 1101080 R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC R_AARCH64 = 1111081 R_AARCH64_P32_TLSDESC_LD_PREL19 R_AARCH64 = 1221082 R_AARCH64_P32_TLSDESC_ADR_PREL21 R_AARCH64 = 1231083 R_AARCH64_P32_TLSDESC_ADR_PAGE21 R_AARCH64 = 1241084 R_AARCH64_P32_TLSDESC_LD32_LO12_NC R_AARCH64 = 1251085 R_AARCH64_P32_TLSDESC_ADD_LO12_NC R_AARCH64 = 1261086 R_AARCH64_P32_TLSDESC_CALL R_AARCH64 = 1271087 R_AARCH64_P32_COPY R_AARCH64 = 1801088 R_AARCH64_P32_GLOB_DAT R_AARCH64 = 1811089 R_AARCH64_P32_JUMP_SLOT R_AARCH64 = 1821090 R_AARCH64_P32_RELATIVE R_AARCH64 = 1831091 R_AARCH64_P32_TLS_DTPMOD R_AARCH64 = 1841092 R_AARCH64_P32_TLS_DTPREL R_AARCH64 = 1851093 R_AARCH64_P32_TLS_TPREL R_AARCH64 = 1861094 R_AARCH64_P32_TLSDESC R_AARCH64 = 1871095 R_AARCH64_P32_IRELATIVE R_AARCH64 = 1881096 R_AARCH64_NULL R_AARCH64 = 2561097 R_AARCH64_ABS64 R_AARCH64 = 2571098 R_AARCH64_ABS32 R_AARCH64 = 2581099 R_AARCH64_ABS16 R_AARCH64 = 2591100 R_AARCH64_PREL64 R_AARCH64 = 2601101 R_AARCH64_PREL32 R_AARCH64 = 2611102 R_AARCH64_PREL16 R_AARCH64 = 2621103 R_AARCH64_MOVW_UABS_G0 R_AARCH64 = 2631104 R_AARCH64_MOVW_UABS_G0_NC R_AARCH64 = 2641105 R_AARCH64_MOVW_UABS_G1 R_AARCH64 = 2651106 R_AARCH64_MOVW_UABS_G1_NC R_AARCH64 = 2661107 R_AARCH64_MOVW_UABS_G2 R_AARCH64 = 2671108 R_AARCH64_MOVW_UABS_G2_NC R_AARCH64 = 2681109 R_AARCH64_MOVW_UABS_G3 R_AARCH64 = 2691110 R_AARCH64_MOVW_SABS_G0 R_AARCH64 = 2701111 R_AARCH64_MOVW_SABS_G1 R_AARCH64 = 2711112 R_AARCH64_MOVW_SABS_G2 R_AARCH64 = 2721113 R_AARCH64_LD_PREL_LO19 R_AARCH64 = 2731114 R_AARCH64_ADR_PREL_LO21 R_AARCH64 = 2741115 R_AARCH64_ADR_PREL_PG_HI21 R_AARCH64 = 2751116 R_AARCH64_ADR_PREL_PG_HI21_NC R_AARCH64 = 2761117 R_AARCH64_ADD_ABS_LO12_NC R_AARCH64 = 2771118 R_AARCH64_LDST8_ABS_LO12_NC R_AARCH64 = 2781119 R_AARCH64_TSTBR14 R_AARCH64 = 2791120 R_AARCH64_CONDBR19 R_AARCH64 = 2801121 R_AARCH64_JUMP26 R_AARCH64 = 2821122 R_AARCH64_CALL26 R_AARCH64 = 2831123 R_AARCH64_LDST16_ABS_LO12_NC R_AARCH64 = 2841124 R_AARCH64_LDST32_ABS_LO12_NC R_AARCH64 = 2851125 R_AARCH64_LDST64_ABS_LO12_NC R_AARCH64 = 2861126 R_AARCH64_LDST128_ABS_LO12_NC R_AARCH64 = 2991127 R_AARCH64_GOT_LD_PREL19 R_AARCH64 = 3091128 R_AARCH64_LD64_GOTOFF_LO15 R_AARCH64 = 3101129 R_AARCH64_ADR_GOT_PAGE R_AARCH64 = 3111130 R_AARCH64_LD64_GOT_LO12_NC R_AARCH64 = 3121131 R_AARCH64_LD64_GOTPAGE_LO15 R_AARCH64 = 3131132 R_AARCH64_TLSGD_ADR_PREL21 R_AARCH64 = 5121133 R_AARCH64_TLSGD_ADR_PAGE21 R_AARCH64 = 5131134 R_AARCH64_TLSGD_ADD_LO12_NC R_AARCH64 = 5141135 R_AARCH64_TLSGD_MOVW_G1 R_AARCH64 = 5151136 R_AARCH64_TLSGD_MOVW_G0_NC R_AARCH64 = 5161137 R_AARCH64_TLSLD_ADR_PREL21 R_AARCH64 = 5171138 R_AARCH64_TLSLD_ADR_PAGE21 R_AARCH64 = 5181139 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 R_AARCH64 = 5391140 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC R_AARCH64 = 5401141 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 R_AARCH64 = 5411142 R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC R_AARCH64 = 5421143 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 R_AARCH64 = 5431144 R_AARCH64_TLSLE_MOVW_TPREL_G2 R_AARCH64 = 5441145 R_AARCH64_TLSLE_MOVW_TPREL_G1 R_AARCH64 = 5451146 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC R_AARCH64 = 5461147 R_AARCH64_TLSLE_MOVW_TPREL_G0 R_AARCH64 = 5471148 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC R_AARCH64 = 5481149 R_AARCH64_TLSLE_ADD_TPREL_HI12 R_AARCH64 = 5491150 R_AARCH64_TLSLE_ADD_TPREL_LO12 R_AARCH64 = 5501151 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC R_AARCH64 = 5511152 R_AARCH64_TLSDESC_LD_PREL19 R_AARCH64 = 5601153 R_AARCH64_TLSDESC_ADR_PREL21 R_AARCH64 = 5611154 R_AARCH64_TLSDESC_ADR_PAGE21 R_AARCH64 = 5621155 R_AARCH64_TLSDESC_LD64_LO12_NC R_AARCH64 = 5631156 R_AARCH64_TLSDESC_ADD_LO12_NC R_AARCH64 = 5641157 R_AARCH64_TLSDESC_OFF_G1 R_AARCH64 = 5651158 R_AARCH64_TLSDESC_OFF_G0_NC R_AARCH64 = 5661159 R_AARCH64_TLSDESC_LDR R_AARCH64 = 5671160 R_AARCH64_TLSDESC_ADD R_AARCH64 = 5681161 R_AARCH64_TLSDESC_CALL R_AARCH64 = 5691162 R_AARCH64_TLSLE_LDST128_TPREL_LO12 R_AARCH64 = 5701163 R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC R_AARCH64 = 5711164 R_AARCH64_TLSLD_LDST128_DTPREL_LO12 R_AARCH64 = 5721165 R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC R_AARCH64 = 5731166 R_AARCH64_COPY R_AARCH64 = 10241167 R_AARCH64_GLOB_DAT R_AARCH64 = 10251168 R_AARCH64_JUMP_SLOT R_AARCH64 = 10261169 R_AARCH64_RELATIVE R_AARCH64 = 10271170 R_AARCH64_TLS_DTPMOD64 R_AARCH64 = 10281171 R_AARCH64_TLS_DTPREL64 R_AARCH64 = 10291172 R_AARCH64_TLS_TPREL64 R_AARCH64 = 10301173 R_AARCH64_TLSDESC R_AARCH64 = 10311174 R_AARCH64_IRELATIVE R_AARCH64 = 10321175)1176var raarch64Strings = []intName{1177 {0, "R_AARCH64_NONE"},1178 {1, "R_AARCH64_P32_ABS32"},1179 {2, "R_AARCH64_P32_ABS16"},1180 {3, "R_AARCH64_P32_PREL32"},1181 {4, "R_AARCH64_P32_PREL16"},1182 {5, "R_AARCH64_P32_MOVW_UABS_G0"},1183 {6, "R_AARCH64_P32_MOVW_UABS_G0_NC"},1184 {7, "R_AARCH64_P32_MOVW_UABS_G1"},1185 {8, "R_AARCH64_P32_MOVW_SABS_G0"},1186 {9, "R_AARCH64_P32_LD_PREL_LO19"},1187 {10, "R_AARCH64_P32_ADR_PREL_LO21"},1188 {11, "R_AARCH64_P32_ADR_PREL_PG_HI21"},1189 {12, "R_AARCH64_P32_ADD_ABS_LO12_NC"},1190 {13, "R_AARCH64_P32_LDST8_ABS_LO12_NC"},1191 {14, "R_AARCH64_P32_LDST16_ABS_LO12_NC"},1192 {15, "R_AARCH64_P32_LDST32_ABS_LO12_NC"},1193 {16, "R_AARCH64_P32_LDST64_ABS_LO12_NC"},1194 {17, "R_AARCH64_P32_LDST128_ABS_LO12_NC"},1195 {18, "R_AARCH64_P32_TSTBR14"},1196 {19, "R_AARCH64_P32_CONDBR19"},1197 {20, "R_AARCH64_P32_JUMP26"},1198 {21, "R_AARCH64_P32_CALL26"},1199 {25, "R_AARCH64_P32_GOT_LD_PREL19"},1200 {26, "R_AARCH64_P32_ADR_GOT_PAGE"},1201 {27, "R_AARCH64_P32_LD32_GOT_LO12_NC"},1202 {81, "R_AARCH64_P32_TLSGD_ADR_PAGE21"},1203 {82, "R_AARCH64_P32_TLSGD_ADD_LO12_NC"},1204 {103, "R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21"},1205 {104, "R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC"},1206 {105, "R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19"},1207 {106, "R_AARCH64_P32_TLSLE_MOVW_TPREL_G1"},1208 {107, "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0"},1209 {108, "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC"},1210 {109, "R_AARCH64_P32_TLSLE_ADD_TPREL_HI12"},1211 {110, "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12"},1212 {111, "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC"},1213 {122, "R_AARCH64_P32_TLSDESC_LD_PREL19"},1214 {123, "R_AARCH64_P32_TLSDESC_ADR_PREL21"},1215 {124, "R_AARCH64_P32_TLSDESC_ADR_PAGE21"},1216 {125, "R_AARCH64_P32_TLSDESC_LD32_LO12_NC"},1217 {126, "R_AARCH64_P32_TLSDESC_ADD_LO12_NC"},1218 {127, "R_AARCH64_P32_TLSDESC_CALL"},1219 {180, "R_AARCH64_P32_COPY"},1220 {181, "R_AARCH64_P32_GLOB_DAT"},1221 {182, "R_AARCH64_P32_JUMP_SLOT"},1222 {183, "R_AARCH64_P32_RELATIVE"},1223 {184, "R_AARCH64_P32_TLS_DTPMOD"},1224 {185, "R_AARCH64_P32_TLS_DTPREL"},1225 {186, "R_AARCH64_P32_TLS_TPREL"},1226 {187, "R_AARCH64_P32_TLSDESC"},1227 {188, "R_AARCH64_P32_IRELATIVE"},1228 {256, "R_AARCH64_NULL"},1229 {257, "R_AARCH64_ABS64"},1230 {258, "R_AARCH64_ABS32"},1231 {259, "R_AARCH64_ABS16"},1232 {260, "R_AARCH64_PREL64"},1233 {261, "R_AARCH64_PREL32"},1234 {262, "R_AARCH64_PREL16"},1235 {263, "R_AARCH64_MOVW_UABS_G0"},1236 {264, "R_AARCH64_MOVW_UABS_G0_NC"},1237 {265, "R_AARCH64_MOVW_UABS_G1"},1238 {266, "R_AARCH64_MOVW_UABS_G1_NC"},1239 {267, "R_AARCH64_MOVW_UABS_G2"},1240 {268, "R_AARCH64_MOVW_UABS_G2_NC"},1241 {269, "R_AARCH64_MOVW_UABS_G3"},1242 {270, "R_AARCH64_MOVW_SABS_G0"},1243 {271, "R_AARCH64_MOVW_SABS_G1"},1244 {272, "R_AARCH64_MOVW_SABS_G2"},1245 {273, "R_AARCH64_LD_PREL_LO19"},1246 {274, "R_AARCH64_ADR_PREL_LO21"},1247 {275, "R_AARCH64_ADR_PREL_PG_HI21"},1248 {276, "R_AARCH64_ADR_PREL_PG_HI21_NC"},1249 {277, "R_AARCH64_ADD_ABS_LO12_NC"},1250 {278, "R_AARCH64_LDST8_ABS_LO12_NC"},1251 {279, "R_AARCH64_TSTBR14"},1252 {280, "R_AARCH64_CONDBR19"},1253 {282, "R_AARCH64_JUMP26"},1254 {283, "R_AARCH64_CALL26"},1255 {284, "R_AARCH64_LDST16_ABS_LO12_NC"},1256 {285, "R_AARCH64_LDST32_ABS_LO12_NC"},1257 {286, "R_AARCH64_LDST64_ABS_LO12_NC"},1258 {299, "R_AARCH64_LDST128_ABS_LO12_NC"},1259 {309, "R_AARCH64_GOT_LD_PREL19"},1260 {310, "R_AARCH64_LD64_GOTOFF_LO15"},1261 {311, "R_AARCH64_ADR_GOT_PAGE"},1262 {312, "R_AARCH64_LD64_GOT_LO12_NC"},1263 {313, "R_AARCH64_LD64_GOTPAGE_LO15"},1264 {512, "R_AARCH64_TLSGD_ADR_PREL21"},1265 {513, "R_AARCH64_TLSGD_ADR_PAGE21"},1266 {514, "R_AARCH64_TLSGD_ADD_LO12_NC"},1267 {515, "R_AARCH64_TLSGD_MOVW_G1"},1268 {516, "R_AARCH64_TLSGD_MOVW_G0_NC"},1269 {517, "R_AARCH64_TLSLD_ADR_PREL21"},1270 {518, "R_AARCH64_TLSLD_ADR_PAGE21"},1271 {539, "R_AARCH64_TLSIE_MOVW_GOTTPREL_G1"},1272 {540, "R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC"},1273 {541, "R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21"},1274 {542, "R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC"},1275 {543, "R_AARCH64_TLSIE_LD_GOTTPREL_PREL19"},1276 {544, "R_AARCH64_TLSLE_MOVW_TPREL_G2"},1277 {545, "R_AARCH64_TLSLE_MOVW_TPREL_G1"},1278 {546, "R_AARCH64_TLSLE_MOVW_TPREL_G1_NC"},1279 {547, "R_AARCH64_TLSLE_MOVW_TPREL_G0"},1280 {548, "R_AARCH64_TLSLE_MOVW_TPREL_G0_NC"},1281 {549, "R_AARCH64_TLSLE_ADD_TPREL_HI12"},1282 {550, "R_AARCH64_TLSLE_ADD_TPREL_LO12"},1283 {551, "R_AARCH64_TLSLE_ADD_TPREL_LO12_NC"},1284 {560, "R_AARCH64_TLSDESC_LD_PREL19"},1285 {561, "R_AARCH64_TLSDESC_ADR_PREL21"},1286 {562, "R_AARCH64_TLSDESC_ADR_PAGE21"},1287 {563, "R_AARCH64_TLSDESC_LD64_LO12_NC"},1288 {564, "R_AARCH64_TLSDESC_ADD_LO12_NC"},1289 {565, "R_AARCH64_TLSDESC_OFF_G1"},1290 {566, "R_AARCH64_TLSDESC_OFF_G0_NC"},1291 {567, "R_AARCH64_TLSDESC_LDR"},1292 {568, "R_AARCH64_TLSDESC_ADD"},1293 {569, "R_AARCH64_TLSDESC_CALL"},1294 {570, "R_AARCH64_TLSLE_LDST128_TPREL_LO12"},1295 {571, "R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC"},1296 {572, "R_AARCH64_TLSLD_LDST128_DTPREL_LO12"},1297 {573, "R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC"},1298 {1024, "R_AARCH64_COPY"},1299 {1025, "R_AARCH64_GLOB_DAT"},1300 {1026, "R_AARCH64_JUMP_SLOT"},1301 {1027, "R_AARCH64_RELATIVE"},1302 {1028, "R_AARCH64_TLS_DTPMOD64"},1303 {1029, "R_AARCH64_TLS_DTPREL64"},1304 {1030, "R_AARCH64_TLS_TPREL64"},1305 {1031, "R_AARCH64_TLSDESC"},1306 {1032, "R_AARCH64_IRELATIVE"},1307}1308func (i R_AARCH64) String() string { return stringName(uint32(i), raarch64Strings, false) }1309func (i R_AARCH64) GoString() string { return stringName(uint32(i), raarch64Strings, true) }1310// Relocation types for Alpha.1311type R_ALPHA int1312const (1313 R_ALPHA_NONE R_ALPHA = 0 /* No reloc */1314 R_ALPHA_REFLONG R_ALPHA = 1 /* Direct 32 bit */1315 R_ALPHA_REFQUAD R_ALPHA = 2 /* Direct 64 bit */1316 R_ALPHA_GPREL32 R_ALPHA = 3 /* GP relative 32 bit */1317 R_ALPHA_LITERAL R_ALPHA = 4 /* GP relative 16 bit w/optimization */1318 R_ALPHA_LITUSE R_ALPHA = 5 /* Optimization hint for LITERAL */1319 R_ALPHA_GPDISP R_ALPHA = 6 /* Add displacement to GP */1320 R_ALPHA_BRADDR R_ALPHA = 7 /* PC+4 relative 23 bit shifted */1321 R_ALPHA_HINT R_ALPHA = 8 /* PC+4 relative 16 bit shifted */1322 R_ALPHA_SREL16 R_ALPHA = 9 /* PC relative 16 bit */1323 R_ALPHA_SREL32 R_ALPHA = 10 /* PC relative 32 bit */1324 R_ALPHA_SREL64 R_ALPHA = 11 /* PC relative 64 bit */1325 R_ALPHA_OP_PUSH R_ALPHA = 12 /* OP stack push */1326 R_ALPHA_OP_STORE R_ALPHA = 13 /* OP stack pop and store */1327 R_ALPHA_OP_PSUB R_ALPHA = 14 /* OP stack subtract */1328 R_ALPHA_OP_PRSHIFT R_ALPHA = 15 /* OP stack right shift */1329 R_ALPHA_GPVALUE R_ALPHA = 161330 R_ALPHA_GPRELHIGH R_ALPHA = 171331 R_ALPHA_GPRELLOW R_ALPHA = 181332 R_ALPHA_IMMED_GP_16 R_ALPHA = 191333 R_ALPHA_IMMED_GP_HI32 R_ALPHA = 201334 R_ALPHA_IMMED_SCN_HI32 R_ALPHA = 211335 R_ALPHA_IMMED_BR_HI32 R_ALPHA = 221336 R_ALPHA_IMMED_LO32 R_ALPHA = 231337 R_ALPHA_COPY R_ALPHA = 24 /* Copy symbol at runtime */1338 R_ALPHA_GLOB_DAT R_ALPHA = 25 /* Create GOT entry */1339 R_ALPHA_JMP_SLOT R_ALPHA = 26 /* Create PLT entry */1340 R_ALPHA_RELATIVE R_ALPHA = 27 /* Adjust by program base */1341)1342var ralphaStrings = []intName{1343 {0, "R_ALPHA_NONE"},1344 {1, "R_ALPHA_REFLONG"},1345 {2, "R_ALPHA_REFQUAD"},1346 {3, "R_ALPHA_GPREL32"},1347 {4, "R_ALPHA_LITERAL"},1348 {5, "R_ALPHA_LITUSE"},1349 {6, "R_ALPHA_GPDISP"},1350 {7, "R_ALPHA_BRADDR"},1351 {8, "R_ALPHA_HINT"},1352 {9, "R_ALPHA_SREL16"},1353 {10, "R_ALPHA_SREL32"},1354 {11, "R_ALPHA_SREL64"},1355 {12, "R_ALPHA_OP_PUSH"},1356 {13, "R_ALPHA_OP_STORE"},1357 {14, "R_ALPHA_OP_PSUB"},1358 {15, "R_ALPHA_OP_PRSHIFT"},1359 {16, "R_ALPHA_GPVALUE"},1360 {17, "R_ALPHA_GPRELHIGH"},1361 {18, "R_ALPHA_GPRELLOW"},1362 {19, "R_ALPHA_IMMED_GP_16"},1363 {20, "R_ALPHA_IMMED_GP_HI32"},1364 {21, "R_ALPHA_IMMED_SCN_HI32"},1365 {22, "R_ALPHA_IMMED_BR_HI32"},1366 {23, "R_ALPHA_IMMED_LO32"},1367 {24, "R_ALPHA_COPY"},1368 {25, "R_ALPHA_GLOB_DAT"},1369 {26, "R_ALPHA_JMP_SLOT"},1370 {27, "R_ALPHA_RELATIVE"},1371}1372func (i R_ALPHA) String() string { return stringName(uint32(i), ralphaStrings, false) }1373func (i R_ALPHA) GoString() string { return stringName(uint32(i), ralphaStrings, true) }1374// Relocation types for ARM.1375type R_ARM int1376const (1377 R_ARM_NONE R_ARM = 0 /* No relocation. */1378 R_ARM_PC24 R_ARM = 11379 R_ARM_ABS32 R_ARM = 21380 R_ARM_REL32 R_ARM = 31381 R_ARM_PC13 R_ARM = 41382 R_ARM_ABS16 R_ARM = 51383 R_ARM_ABS12 R_ARM = 61384 R_ARM_THM_ABS5 R_ARM = 71385 R_ARM_ABS8 R_ARM = 81386 R_ARM_SBREL32 R_ARM = 91387 R_ARM_THM_PC22 R_ARM = 101388 R_ARM_THM_PC8 R_ARM = 111389 R_ARM_AMP_VCALL9 R_ARM = 121390 R_ARM_SWI24 R_ARM = 131391 R_ARM_THM_SWI8 R_ARM = 141392 R_ARM_XPC25 R_ARM = 151393 R_ARM_THM_XPC22 R_ARM = 161394 R_ARM_TLS_DTPMOD32 R_ARM = 171395 R_ARM_TLS_DTPOFF32 R_ARM = 181396 R_ARM_TLS_TPOFF32 R_ARM = 191397 R_ARM_COPY R_ARM = 20 /* Copy data from shared object. */1398 R_ARM_GLOB_DAT R_ARM = 21 /* Set GOT entry to data address. */1399 R_ARM_JUMP_SLOT R_ARM = 22 /* Set GOT entry to code address. */1400 R_ARM_RELATIVE R_ARM = 23 /* Add load address of shared object. */1401 R_ARM_GOTOFF R_ARM = 24 /* Add GOT-relative symbol address. */1402 R_ARM_GOTPC R_ARM = 25 /* Add PC-relative GOT table address. */1403 R_ARM_GOT32 R_ARM = 26 /* Add PC-relative GOT offset. */1404 R_ARM_PLT32 R_ARM = 27 /* Add PC-relative PLT offset. */1405 R_ARM_CALL R_ARM = 281406 R_ARM_JUMP24 R_ARM = 291407 R_ARM_THM_JUMP24 R_ARM = 301408 R_ARM_BASE_ABS R_ARM = 311409 R_ARM_ALU_PCREL_7_0 R_ARM = 321410 R_ARM_ALU_PCREL_15_8 R_ARM = 331411 R_ARM_ALU_PCREL_23_15 R_ARM = 341412 R_ARM_LDR_SBREL_11_10_NC R_ARM = 351413 R_ARM_ALU_SBREL_19_12_NC R_ARM = 361414 R_ARM_ALU_SBREL_27_20_CK R_ARM = 371415 R_ARM_TARGET1 R_ARM = 381416 R_ARM_SBREL31 R_ARM = 391417 R_ARM_V4BX R_ARM = 401418 R_ARM_TARGET2 R_ARM = 411419 R_ARM_PREL31 R_ARM = 421420 R_ARM_MOVW_ABS_NC R_ARM = 431421 R_ARM_MOVT_ABS R_ARM = 441422 R_ARM_MOVW_PREL_NC R_ARM = 451423 R_ARM_MOVT_PREL R_ARM = 461424 R_ARM_THM_MOVW_ABS_NC R_ARM = 471425 R_ARM_THM_MOVT_ABS R_ARM = 481426 R_ARM_THM_MOVW_PREL_NC R_ARM = 491427 R_ARM_THM_MOVT_PREL R_ARM = 501428 R_ARM_THM_JUMP19 R_ARM = 511429 R_ARM_THM_JUMP6 R_ARM = 521430 R_ARM_THM_ALU_PREL_11_0 R_ARM = 531431 R_ARM_THM_PC12 R_ARM = 541432 R_ARM_ABS32_NOI R_ARM = 551433 R_ARM_REL32_NOI R_ARM = 561434 R_ARM_ALU_PC_G0_NC R_ARM = 571435 R_ARM_ALU_PC_G0 R_ARM = 581436 R_ARM_ALU_PC_G1_NC R_ARM = 591437 R_ARM_ALU_PC_G1 R_ARM = 601438 R_ARM_ALU_PC_G2 R_ARM = 611439 R_ARM_LDR_PC_G1 R_ARM = 621440 R_ARM_LDR_PC_G2 R_ARM = 631441 R_ARM_LDRS_PC_G0 R_ARM = 641442 R_ARM_LDRS_PC_G1 R_ARM = 651443 R_ARM_LDRS_PC_G2 R_ARM = 661444 R_ARM_LDC_PC_G0 R_ARM = 671445 R_ARM_LDC_PC_G1 R_ARM = 681446 R_ARM_LDC_PC_G2 R_ARM = 691447 R_ARM_ALU_SB_G0_NC R_ARM = 701448 R_ARM_ALU_SB_G0 R_ARM = 711449 R_ARM_ALU_SB_G1_NC R_ARM = 721450 R_ARM_ALU_SB_G1 R_ARM = 731451 R_ARM_ALU_SB_G2 R_ARM = 741452 R_ARM_LDR_SB_G0 R_ARM = 751453 R_ARM_LDR_SB_G1 R_ARM = 761454 R_ARM_LDR_SB_G2 R_ARM = 771455 R_ARM_LDRS_SB_G0 R_ARM = 781456 R_ARM_LDRS_SB_G1 R_ARM = 791457 R_ARM_LDRS_SB_G2 R_ARM = 801458 R_ARM_LDC_SB_G0 R_ARM = 811459 R_ARM_LDC_SB_G1 R_ARM = 821460 R_ARM_LDC_SB_G2 R_ARM = 831461 R_ARM_MOVW_BREL_NC R_ARM = 841462 R_ARM_MOVT_BREL R_ARM = 851463 R_ARM_MOVW_BREL R_ARM = 861464 R_ARM_THM_MOVW_BREL_NC R_ARM = 871465 R_ARM_THM_MOVT_BREL R_ARM = 881466 R_ARM_THM_MOVW_BREL R_ARM = 891467 R_ARM_TLS_GOTDESC R_ARM = 901468 R_ARM_TLS_CALL R_ARM = 911469 R_ARM_TLS_DESCSEQ R_ARM = 921470 R_ARM_THM_TLS_CALL R_ARM = 931471 R_ARM_PLT32_ABS R_ARM = 941472 R_ARM_GOT_ABS R_ARM = 951473 R_ARM_GOT_PREL R_ARM = 961474 R_ARM_GOT_BREL12 R_ARM = 971475 R_ARM_GOTOFF12 R_ARM = 981476 R_ARM_GOTRELAX R_ARM = 991477 R_ARM_GNU_VTENTRY R_ARM = 1001478 R_ARM_GNU_VTINHERIT R_ARM = 1011479 R_ARM_THM_JUMP11 R_ARM = 1021480 R_ARM_THM_JUMP8 R_ARM = 1031481 R_ARM_TLS_GD32 R_ARM = 1041482 R_ARM_TLS_LDM32 R_ARM = 1051483 R_ARM_TLS_LDO32 R_ARM = 1061484 R_ARM_TLS_IE32 R_ARM = 1071485 R_ARM_TLS_LE32 R_ARM = 1081486 R_ARM_TLS_LDO12 R_ARM = 1091487 R_ARM_TLS_LE12 R_ARM = 1101488 R_ARM_TLS_IE12GP R_ARM = 1111489 R_ARM_PRIVATE_0 R_ARM = 1121490 R_ARM_PRIVATE_1 R_ARM = 1131491 R_ARM_PRIVATE_2 R_ARM = 1141492 R_ARM_PRIVATE_3 R_ARM = 1151493 R_ARM_PRIVATE_4 R_ARM = 1161494 R_ARM_PRIVATE_5 R_ARM = 1171495 R_ARM_PRIVATE_6 R_ARM = 1181496 R_ARM_PRIVATE_7 R_ARM = 1191497 R_ARM_PRIVATE_8 R_ARM = 1201498 R_ARM_PRIVATE_9 R_ARM = 1211499 R_ARM_PRIVATE_10 R_ARM = 1221500 R_ARM_PRIVATE_11 R_ARM = 1231501 R_ARM_PRIVATE_12 R_ARM = 1241502 R_ARM_PRIVATE_13 R_ARM = 1251503 R_ARM_PRIVATE_14 R_ARM = 1261504 R_ARM_PRIVATE_15 R_ARM = 1271505 R_ARM_ME_TOO R_ARM = 1281506 R_ARM_THM_TLS_DESCSEQ16 R_ARM = 1291507 R_ARM_THM_TLS_DESCSEQ32 R_ARM = 1301508 R_ARM_THM_GOT_BREL12 R_ARM = 1311509 R_ARM_THM_ALU_ABS_G0_NC R_ARM = 1321510 R_ARM_THM_ALU_ABS_G1_NC R_ARM = 1331511 R_ARM_THM_ALU_ABS_G2_NC R_ARM = 1341512 R_ARM_THM_ALU_ABS_G3 R_ARM = 1351513 R_ARM_IRELATIVE R_ARM = 1601514 R_ARM_RXPC25 R_ARM = 2491515 R_ARM_RSBREL32 R_ARM = 2501516 R_ARM_THM_RPC22 R_ARM = 2511517 R_ARM_RREL32 R_ARM = 2521518 R_ARM_RABS32 R_ARM = 2531519 R_ARM_RPC24 R_ARM = 2541520 R_ARM_RBASE R_ARM = 2551521)1522var rarmStrings = []intName{1523 {0, "R_ARM_NONE"},1524 {1, "R_ARM_PC24"},1525 {2, "R_ARM_ABS32"},1526 {3, "R_ARM_REL32"},1527 {4, "R_ARM_PC13"},1528 {5, "R_ARM_ABS16"},1529 {6, "R_ARM_ABS12"},1530 {7, "R_ARM_THM_ABS5"},1531 {8, "R_ARM_ABS8"},1532 {9, "R_ARM_SBREL32"},1533 {10, "R_ARM_THM_PC22"},1534 {11, "R_ARM_THM_PC8"},1535 {12, "R_ARM_AMP_VCALL9"},1536 {13, "R_ARM_SWI24"},1537 {14, "R_ARM_THM_SWI8"},1538 {15, "R_ARM_XPC25"},1539 {16, "R_ARM_THM_XPC22"},1540 {17, "R_ARM_TLS_DTPMOD32"},1541 {18, "R_ARM_TLS_DTPOFF32"},1542 {19, "R_ARM_TLS_TPOFF32"},1543 {20, "R_ARM_COPY"},1544 {21, "R_ARM_GLOB_DAT"},1545 {22, "R_ARM_JUMP_SLOT"},1546 {23, "R_ARM_RELATIVE"},1547 {24, "R_ARM_GOTOFF"},1548 {25, "R_ARM_GOTPC"},1549 {26, "R_ARM_GOT32"},1550 {27, "R_ARM_PLT32"},1551 {28, "R_ARM_CALL"},1552 {29, "R_ARM_JUMP24"},1553 {30, "R_ARM_THM_JUMP24"},1554 {31, "R_ARM_BASE_ABS"},1555 {32, "R_ARM_ALU_PCREL_7_0"},1556 {33, "R_ARM_ALU_PCREL_15_8"},1557 {34, "R_ARM_ALU_PCREL_23_15"},1558 {35, "R_ARM_LDR_SBREL_11_10_NC"},1559 {36, "R_ARM_ALU_SBREL_19_12_NC"},1560 {37, "R_ARM_ALU_SBREL_27_20_CK"},1561 {38, "R_ARM_TARGET1"},1562 {39, "R_ARM_SBREL31"},1563 {40, "R_ARM_V4BX"},1564 {41, "R_ARM_TARGET2"},1565 {42, "R_ARM_PREL31"},1566 {43, "R_ARM_MOVW_ABS_NC"},1567 {44, "R_ARM_MOVT_ABS"},1568 {45, "R_ARM_MOVW_PREL_NC"},1569 {46, "R_ARM_MOVT_PREL"},1570 {47, "R_ARM_THM_MOVW_ABS_NC"},1571 {48, "R_ARM_THM_MOVT_ABS"},1572 {49, "R_ARM_THM_MOVW_PREL_NC"},1573 {50, "R_ARM_THM_MOVT_PREL"},1574 {51, "R_ARM_THM_JUMP19"},1575 {52, "R_ARM_THM_JUMP6"},1576 {53, "R_ARM_THM_ALU_PREL_11_0"},1577 {54, "R_ARM_THM_PC12"},1578 {55, "R_ARM_ABS32_NOI"},1579 {56, "R_ARM_REL32_NOI"},1580 {57, "R_ARM_ALU_PC_G0_NC"},1581 {58, "R_ARM_ALU_PC_G0"},1582 {59, "R_ARM_ALU_PC_G1_NC"},1583 {60, "R_ARM_ALU_PC_G1"},1584 {61, "R_ARM_ALU_PC_G2"},1585 {62, "R_ARM_LDR_PC_G1"},1586 {63, "R_ARM_LDR_PC_G2"},1587 {64, "R_ARM_LDRS_PC_G0"},1588 {65, "R_ARM_LDRS_PC_G1"},1589 {66, "R_ARM_LDRS_PC_G2"},1590 {67, "R_ARM_LDC_PC_G0"},1591 {68, "R_ARM_LDC_PC_G1"},1592 {69, "R_ARM_LDC_PC_G2"},1593 {70, "R_ARM_ALU_SB_G0_NC"},1594 {71, "R_ARM_ALU_SB_G0"},1595 {72, "R_ARM_ALU_SB_G1_NC"},1596 {73, "R_ARM_ALU_SB_G1"},1597 {74, "R_ARM_ALU_SB_G2"},1598 {75, "R_ARM_LDR_SB_G0"},1599 {76, "R_ARM_LDR_SB_G1"},1600 {77, "R_ARM_LDR_SB_G2"},1601 {78, "R_ARM_LDRS_SB_G0"},1602 {79, "R_ARM_LDRS_SB_G1"},1603 {80, "R_ARM_LDRS_SB_G2"},1604 {81, "R_ARM_LDC_SB_G0"},1605 {82, "R_ARM_LDC_SB_G1"},1606 {83, "R_ARM_LDC_SB_G2"},1607 {84, "R_ARM_MOVW_BREL_NC"},1608 {85, "R_ARM_MOVT_BREL"},1609 {86, "R_ARM_MOVW_BREL"},1610 {87, "R_ARM_THM_MOVW_BREL_NC"},1611 {88, "R_ARM_THM_MOVT_BREL"},1612 {89, "R_ARM_THM_MOVW_BREL"},1613 {90, "R_ARM_TLS_GOTDESC"},1614 {91, "R_ARM_TLS_CALL"},1615 {92, "R_ARM_TLS_DESCSEQ"},1616 {93, "R_ARM_THM_TLS_CALL"},1617 {94, "R_ARM_PLT32_ABS"},1618 {95, "R_ARM_GOT_ABS"},1619 {96, "R_ARM_GOT_PREL"},1620 {97, "R_ARM_GOT_BREL12"},1621 {98, "R_ARM_GOTOFF12"},1622 {99, "R_ARM_GOTRELAX"},1623 {100, "R_ARM_GNU_VTENTRY"},1624 {101, "R_ARM_GNU_VTINHERIT"},1625 {102, "R_ARM_THM_JUMP11"},1626 {103, "R_ARM_THM_JUMP8"},1627 {104, "R_ARM_TLS_GD32"},1628 {105, "R_ARM_TLS_LDM32"},1629 {106, "R_ARM_TLS_LDO32"},1630 {107, "R_ARM_TLS_IE32"},1631 {108, "R_ARM_TLS_LE32"},1632 {109, "R_ARM_TLS_LDO12"},1633 {110, "R_ARM_TLS_LE12"},1634 {111, "R_ARM_TLS_IE12GP"},1635 {112, "R_ARM_PRIVATE_0"},1636 {113, "R_ARM_PRIVATE_1"},1637 {114, "R_ARM_PRIVATE_2"},1638 {115, "R_ARM_PRIVATE_3"},1639 {116, "R_ARM_PRIVATE_4"},1640 {117, "R_ARM_PRIVATE_5"},1641 {118, "R_ARM_PRIVATE_6"},1642 {119, "R_ARM_PRIVATE_7"},1643 {120, "R_ARM_PRIVATE_8"},1644 {121, "R_ARM_PRIVATE_9"},1645 {122, "R_ARM_PRIVATE_10"},1646 {123, "R_ARM_PRIVATE_11"},1647 {124, "R_ARM_PRIVATE_12"},1648 {125, "R_ARM_PRIVATE_13"},1649 {126, "R_ARM_PRIVATE_14"},1650 {127, "R_ARM_PRIVATE_15"},1651 {128, "R_ARM_ME_TOO"},1652 {129, "R_ARM_THM_TLS_DESCSEQ16"},1653 {130, "R_ARM_THM_TLS_DESCSEQ32"},1654 {131, "R_ARM_THM_GOT_BREL12"},1655 {132, "R_ARM_THM_ALU_ABS_G0_NC"},1656 {133, "R_ARM_THM_ALU_ABS_G1_NC"},1657 {134, "R_ARM_THM_ALU_ABS_G2_NC"},1658 {135, "R_ARM_THM_ALU_ABS_G3"},1659 {160, "R_ARM_IRELATIVE"},1660 {249, "R_ARM_RXPC25"},1661 {250, "R_ARM_RSBREL32"},1662 {251, "R_ARM_THM_RPC22"},1663 {252, "R_ARM_RREL32"},1664 {253, "R_ARM_RABS32"},1665 {254, "R_ARM_RPC24"},1666 {255, "R_ARM_RBASE"},1667}1668func (i R_ARM) String() string { return stringName(uint32(i), rarmStrings, false) }1669func (i R_ARM) GoString() string { return stringName(uint32(i), rarmStrings, true) }1670// Relocation types for 386.1671type R_386 int1672const (1673 R_386_NONE R_386 = 0 /* No relocation. */1674 R_386_32 R_386 = 1 /* Add symbol value. */1675 R_386_PC32 R_386 = 2 /* Add PC-relative symbol value. */1676 R_386_GOT32 R_386 = 3 /* Add PC-relative GOT offset. */1677 R_386_PLT32 R_386 = 4 /* Add PC-relative PLT offset. */1678 R_386_COPY R_386 = 5 /* Copy data from shared object. */1679 R_386_GLOB_DAT R_386 = 6 /* Set GOT entry to data address. */1680 R_386_JMP_SLOT R_386 = 7 /* Set GOT entry to code address. */1681 R_386_RELATIVE R_386 = 8 /* Add load address of shared object. */1682 R_386_GOTOFF R_386 = 9 /* Add GOT-relative symbol address. */1683 R_386_GOTPC R_386 = 10 /* Add PC-relative GOT table address. */1684 R_386_32PLT R_386 = 111685 R_386_TLS_TPOFF R_386 = 14 /* Negative offset in static TLS block */1686 R_386_TLS_IE R_386 = 15 /* Absolute address of GOT for -ve static TLS */1687 R_386_TLS_GOTIE R_386 = 16 /* GOT entry for negative static TLS block */1688 R_386_TLS_LE R_386 = 17 /* Negative offset relative to static TLS */1689 R_386_TLS_GD R_386 = 18 /* 32 bit offset to GOT (index,off) pair */1690 R_386_TLS_LDM R_386 = 19 /* 32 bit offset to GOT (index,zero) pair */1691 R_386_16 R_386 = 201692 R_386_PC16 R_386 = 211693 R_386_8 R_386 = 221694 R_386_PC8 R_386 = 231695 R_386_TLS_GD_32 R_386 = 24 /* 32 bit offset to GOT (index,off) pair */1696 R_386_TLS_GD_PUSH R_386 = 25 /* pushl instruction for Sun ABI GD sequence */1697 R_386_TLS_GD_CALL R_386 = 26 /* call instruction for Sun ABI GD sequence */1698 R_386_TLS_GD_POP R_386 = 27 /* popl instruction for Sun ABI GD sequence */1699 R_386_TLS_LDM_32 R_386 = 28 /* 32 bit offset to GOT (index,zero) pair */1700 R_386_TLS_LDM_PUSH R_386 = 29 /* pushl instruction for Sun ABI LD sequence */1701 R_386_TLS_LDM_CALL R_386 = 30 /* call instruction for Sun ABI LD sequence */1702 R_386_TLS_LDM_POP R_386 = 31 /* popl instruction for Sun ABI LD sequence */1703 R_386_TLS_LDO_32 R_386 = 32 /* 32 bit offset from start of TLS block */1704 R_386_TLS_IE_32 R_386 = 33 /* 32 bit offset to GOT static TLS offset entry */1705 R_386_TLS_LE_32 R_386 = 34 /* 32 bit offset within static TLS block */1706 R_386_TLS_DTPMOD32 R_386 = 35 /* GOT entry containing TLS index */1707 R_386_TLS_DTPOFF32 R_386 = 36 /* GOT entry containing TLS offset */1708 R_386_TLS_TPOFF32 R_386 = 37 /* GOT entry of -ve static TLS offset */1709 R_386_SIZE32 R_386 = 381710 R_386_TLS_GOTDESC R_386 = 391711 R_386_TLS_DESC_CALL R_386 = 401712 R_386_TLS_DESC R_386 = 411713 R_386_IRELATIVE R_386 = 421714 R_386_GOT32X R_386 = 431715)1716var r386Strings = []intName{1717 {0, "R_386_NONE"},1718 {1, "R_386_32"},1719 {2, "R_386_PC32"},1720 {3, "R_386_GOT32"},1721 {4, "R_386_PLT32"},1722 {5, "R_386_COPY"},1723 {6, "R_386_GLOB_DAT"},1724 {7, "R_386_JMP_SLOT"},1725 {8, "R_386_RELATIVE"},1726 {9, "R_386_GOTOFF"},1727 {10, "R_386_GOTPC"},1728 {11, "R_386_32PLT"},1729 {14, "R_386_TLS_TPOFF"},1730 {15, "R_386_TLS_IE"},1731 {16, "R_386_TLS_GOTIE"},1732 {17, "R_386_TLS_LE"},1733 {18, "R_386_TLS_GD"},1734 {19, "R_386_TLS_LDM"},1735 {20, "R_386_16"},1736 {21, "R_386_PC16"},1737 {22, "R_386_8"},1738 {23, "R_386_PC8"},1739 {24, "R_386_TLS_GD_32"},1740 {25, "R_386_TLS_GD_PUSH"},1741 {26, "R_386_TLS_GD_CALL"},1742 {27, "R_386_TLS_GD_POP"},1743 {28, "R_386_TLS_LDM_32"},1744 {29, "R_386_TLS_LDM_PUSH"},1745 {30, "R_386_TLS_LDM_CALL"},1746 {31, "R_386_TLS_LDM_POP"},1747 {32, "R_386_TLS_LDO_32"},1748 {33, "R_386_TLS_IE_32"},1749 {34, "R_386_TLS_LE_32"},1750 {35, "R_386_TLS_DTPMOD32"},1751 {36, "R_386_TLS_DTPOFF32"},1752 {37, "R_386_TLS_TPOFF32"},1753 {38, "R_386_SIZE32"},1754 {39, "R_386_TLS_GOTDESC"},1755 {40, "R_386_TLS_DESC_CALL"},1756 {41, "R_386_TLS_DESC"},1757 {42, "R_386_IRELATIVE"},1758 {43, "R_386_GOT32X"},1759}1760func (i R_386) String() string { return stringName(uint32(i), r386Strings, false) }1761func (i R_386) GoString() string { return stringName(uint32(i), r386Strings, true) }1762// Relocation types for MIPS.1763type R_MIPS int1764const (1765 R_MIPS_NONE R_MIPS = 01766 R_MIPS_16 R_MIPS = 11767 R_MIPS_32 R_MIPS = 21768 R_MIPS_REL32 R_MIPS = 31769 R_MIPS_26 R_MIPS = 41770 R_MIPS_HI16 R_MIPS = 5 /* high 16 bits of symbol value */1771 R_MIPS_LO16 R_MIPS = 6 /* low 16 bits of symbol value */1772 R_MIPS_GPREL16 R_MIPS = 7 /* GP-relative reference */1773 R_MIPS_LITERAL R_MIPS = 8 /* Reference to literal section */1774 R_MIPS_GOT16 R_MIPS = 9 /* Reference to global offset table */1775 R_MIPS_PC16 R_MIPS = 10 /* 16 bit PC relative reference */1776 R_MIPS_CALL16 R_MIPS = 11 /* 16 bit call through glbl offset tbl */1777 R_MIPS_GPREL32 R_MIPS = 121778 R_MIPS_SHIFT5 R_MIPS = 161779 R_MIPS_SHIFT6 R_MIPS = 171780 R_MIPS_64 R_MIPS = 181781 R_MIPS_GOT_DISP R_MIPS = 191782 R_MIPS_GOT_PAGE R_MIPS = 201783 R_MIPS_GOT_OFST R_MIPS = 211784 R_MIPS_GOT_HI16 R_MIPS = 221785 R_MIPS_GOT_LO16 R_MIPS = 231786 R_MIPS_SUB R_MIPS = 241787 R_MIPS_INSERT_A R_MIPS = 251788 R_MIPS_INSERT_B R_MIPS = 261789 R_MIPS_DELETE R_MIPS = 271790 R_MIPS_HIGHER R_MIPS = 281791 R_MIPS_HIGHEST R_MIPS = 291792 R_MIPS_CALL_HI16 R_MIPS = 301793 R_MIPS_CALL_LO16 R_MIPS = 311794 R_MIPS_SCN_DISP R_MIPS = 321795 R_MIPS_REL16 R_MIPS = 331796 R_MIPS_ADD_IMMEDIATE R_MIPS = 341797 R_MIPS_PJUMP R_MIPS = 351798 R_MIPS_RELGOT R_MIPS = 361799 R_MIPS_JALR R_MIPS = 371800 R_MIPS_TLS_DTPMOD32 R_MIPS = 38 /* Module number 32 bit */1801 R_MIPS_TLS_DTPREL32 R_MIPS = 39 /* Module-relative offset 32 bit */1802 R_MIPS_TLS_DTPMOD64 R_MIPS = 40 /* Module number 64 bit */1803 R_MIPS_TLS_DTPREL64 R_MIPS = 41 /* Module-relative offset 64 bit */1804 R_MIPS_TLS_GD R_MIPS = 42 /* 16 bit GOT offset for GD */1805 R_MIPS_TLS_LDM R_MIPS = 43 /* 16 bit GOT offset for LDM */1806 R_MIPS_TLS_DTPREL_HI16 R_MIPS = 44 /* Module-relative offset, high 16 bits */1807 R_MIPS_TLS_DTPREL_LO16 R_MIPS = 45 /* Module-relative offset, low 16 bits */1808 R_MIPS_TLS_GOTTPREL R_MIPS = 46 /* 16 bit GOT offset for IE */1809 R_MIPS_TLS_TPREL32 R_MIPS = 47 /* TP-relative offset, 32 bit */1810 R_MIPS_TLS_TPREL64 R_MIPS = 48 /* TP-relative offset, 64 bit */1811 R_MIPS_TLS_TPREL_HI16 R_MIPS = 49 /* TP-relative offset, high 16 bits */1812 R_MIPS_TLS_TPREL_LO16 R_MIPS = 50 /* TP-relative offset, low 16 bits */1813)1814var rmipsStrings = []intName{1815 {0, "R_MIPS_NONE"},1816 {1, "R_MIPS_16"},1817 {2, "R_MIPS_32"},1818 {3, "R_MIPS_REL32"},1819 {4, "R_MIPS_26"},1820 {5, "R_MIPS_HI16"},1821 {6, "R_MIPS_LO16"},1822 {7, "R_MIPS_GPREL16"},1823 {8, "R_MIPS_LITERAL"},1824 {9, "R_MIPS_GOT16"},1825 {10, "R_MIPS_PC16"},1826 {11, "R_MIPS_CALL16"},1827 {12, "R_MIPS_GPREL32"},1828 {16, "R_MIPS_SHIFT5"},1829 {17, "R_MIPS_SHIFT6"},1830 {18, "R_MIPS_64"},1831 {19, "R_MIPS_GOT_DISP"},1832 {20, "R_MIPS_GOT_PAGE"},1833 {21, "R_MIPS_GOT_OFST"},1834 {22, "R_MIPS_GOT_HI16"},1835 {23, "R_MIPS_GOT_LO16"},1836 {24, "R_MIPS_SUB"},1837 {25, "R_MIPS_INSERT_A"},1838 {26, "R_MIPS_INSERT_B"},1839 {27, "R_MIPS_DELETE"},1840 {28, "R_MIPS_HIGHER"},1841 {29, "R_MIPS_HIGHEST"},1842 {30, "R_MIPS_CALL_HI16"},1843 {31, "R_MIPS_CALL_LO16"},1844 {32, "R_MIPS_SCN_DISP"},1845 {33, "R_MIPS_REL16"},1846 {34, "R_MIPS_ADD_IMMEDIATE"},1847 {35, "R_MIPS_PJUMP"},1848 {36, "R_MIPS_RELGOT"},1849 {37, "R_MIPS_JALR"},1850 {38, "R_MIPS_TLS_DTPMOD32"},1851 {39, "R_MIPS_TLS_DTPREL32"},1852 {40, "R_MIPS_TLS_DTPMOD64"},1853 {41, "R_MIPS_TLS_DTPREL64"},1854 {42, "R_MIPS_TLS_GD"},1855 {43, "R_MIPS_TLS_LDM"},1856 {44, "R_MIPS_TLS_DTPREL_HI16"},1857 {45, "R_MIPS_TLS_DTPREL_LO16"},1858 {46, "R_MIPS_TLS_GOTTPREL"},1859 {47, "R_MIPS_TLS_TPREL32"},1860 {48, "R_MIPS_TLS_TPREL64"},1861 {49, "R_MIPS_TLS_TPREL_HI16"},1862 {50, "R_MIPS_TLS_TPREL_LO16"},1863}1864func (i R_MIPS) String() string { return stringName(uint32(i), rmipsStrings, false) }1865func (i R_MIPS) GoString() string { return stringName(uint32(i), rmipsStrings, true) }1866// Relocation types for PowerPC.1867//1868// Values that are shared by both R_PPC and R_PPC64 are prefixed with1869// R_POWERPC_ in the ELF standard. For the R_PPC type, the relevant1870// shared relocations have been renamed with the prefix R_PPC_.1871// The original name follows the value in a comment.1872type R_PPC int1873const (1874 R_PPC_NONE R_PPC = 0 // R_POWERPC_NONE1875 R_PPC_ADDR32 R_PPC = 1 // R_POWERPC_ADDR321876 R_PPC_ADDR24 R_PPC = 2 // R_POWERPC_ADDR241877 R_PPC_ADDR16 R_PPC = 3 // R_POWERPC_ADDR161878 R_PPC_ADDR16_LO R_PPC = 4 // R_POWERPC_ADDR16_LO1879 R_PPC_ADDR16_HI R_PPC = 5 // R_POWERPC_ADDR16_HI1880 R_PPC_ADDR16_HA R_PPC = 6 // R_POWERPC_ADDR16_HA1881 R_PPC_ADDR14 R_PPC = 7 // R_POWERPC_ADDR141882 R_PPC_ADDR14_BRTAKEN R_PPC = 8 // R_POWERPC_ADDR14_BRTAKEN1883 R_PPC_ADDR14_BRNTAKEN R_PPC = 9 // R_POWERPC_ADDR14_BRNTAKEN1884 R_PPC_REL24 R_PPC = 10 // R_POWERPC_REL241885 R_PPC_REL14 R_PPC = 11 // R_POWERPC_REL141886 R_PPC_REL14_BRTAKEN R_PPC = 12 // R_POWERPC_REL14_BRTAKEN1887 R_PPC_REL14_BRNTAKEN R_PPC = 13 // R_POWERPC_REL14_BRNTAKEN1888 R_PPC_GOT16 R_PPC = 14 // R_POWERPC_GOT161889 R_PPC_GOT16_LO R_PPC = 15 // R_POWERPC_GOT16_LO1890 R_PPC_GOT16_HI R_PPC = 16 // R_POWERPC_GOT16_HI1891 R_PPC_GOT16_HA R_PPC = 17 // R_POWERPC_GOT16_HA1892 R_PPC_PLTREL24 R_PPC = 181893 R_PPC_COPY R_PPC = 19 // R_POWERPC_COPY1894 R_PPC_GLOB_DAT R_PPC = 20 // R_POWERPC_GLOB_DAT1895 R_PPC_JMP_SLOT R_PPC = 21 // R_POWERPC_JMP_SLOT1896 R_PPC_RELATIVE R_PPC = 22 // R_POWERPC_RELATIVE1897 R_PPC_LOCAL24PC R_PPC = 231898 R_PPC_UADDR32 R_PPC = 24 // R_POWERPC_UADDR321899 R_PPC_UADDR16 R_PPC = 25 // R_POWERPC_UADDR161900 R_PPC_REL32 R_PPC = 26 // R_POWERPC_REL321901 R_PPC_PLT32 R_PPC = 27 // R_POWERPC_PLT321902 R_PPC_PLTREL32 R_PPC = 28 // R_POWERPC_PLTREL321903 R_PPC_PLT16_LO R_PPC = 29 // R_POWERPC_PLT16_LO1904 R_PPC_PLT16_HI R_PPC = 30 // R_POWERPC_PLT16_HI1905 R_PPC_PLT16_HA R_PPC = 31 // R_POWERPC_PLT16_HA1906 R_PPC_SDAREL16 R_PPC = 321907 R_PPC_SECTOFF R_PPC = 33 // R_POWERPC_SECTOFF1908 R_PPC_SECTOFF_LO R_PPC = 34 // R_POWERPC_SECTOFF_LO1909 R_PPC_SECTOFF_HI R_PPC = 35 // R_POWERPC_SECTOFF_HI1910 R_PPC_SECTOFF_HA R_PPC = 36 // R_POWERPC_SECTOFF_HA1911 R_PPC_TLS R_PPC = 67 // R_POWERPC_TLS1912 R_PPC_DTPMOD32 R_PPC = 68 // R_POWERPC_DTPMOD321913 R_PPC_TPREL16 R_PPC = 69 // R_POWERPC_TPREL161914 R_PPC_TPREL16_LO R_PPC = 70 // R_POWERPC_TPREL16_LO1915 R_PPC_TPREL16_HI R_PPC = 71 // R_POWERPC_TPREL16_HI1916 R_PPC_TPREL16_HA R_PPC = 72 // R_POWERPC_TPREL16_HA1917 R_PPC_TPREL32 R_PPC = 73 // R_POWERPC_TPREL321918 R_PPC_DTPREL16 R_PPC = 74 // R_POWERPC_DTPREL161919 R_PPC_DTPREL16_LO R_PPC = 75 // R_POWERPC_DTPREL16_LO1920 R_PPC_DTPREL16_HI R_PPC = 76 // R_POWERPC_DTPREL16_HI1921 R_PPC_DTPREL16_HA R_PPC = 77 // R_POWERPC_DTPREL16_HA1922 R_PPC_DTPREL32 R_PPC = 78 // R_POWERPC_DTPREL321923 R_PPC_GOT_TLSGD16 R_PPC = 79 // R_POWERPC_GOT_TLSGD161924 R_PPC_GOT_TLSGD16_LO R_PPC = 80 // R_POWERPC_GOT_TLSGD16_LO1925 R_PPC_GOT_TLSGD16_HI R_PPC = 81 // R_POWERPC_GOT_TLSGD16_HI1926 R_PPC_GOT_TLSGD16_HA R_PPC = 82 // R_POWERPC_GOT_TLSGD16_HA1927 R_PPC_GOT_TLSLD16 R_PPC = 83 // R_POWERPC_GOT_TLSLD161928 R_PPC_GOT_TLSLD16_LO R_PPC = 84 // R_POWERPC_GOT_TLSLD16_LO1929 R_PPC_GOT_TLSLD16_HI R_PPC = 85 // R_POWERPC_GOT_TLSLD16_HI1930 R_PPC_GOT_TLSLD16_HA R_PPC = 86 // R_POWERPC_GOT_TLSLD16_HA1931 R_PPC_GOT_TPREL16 R_PPC = 87 // R_POWERPC_GOT_TPREL161932 R_PPC_GOT_TPREL16_LO R_PPC = 88 // R_POWERPC_GOT_TPREL16_LO1933 R_PPC_GOT_TPREL16_HI R_PPC = 89 // R_POWERPC_GOT_TPREL16_HI1934 R_PPC_GOT_TPREL16_HA R_PPC = 90 // R_POWERPC_GOT_TPREL16_HA1935 R_PPC_EMB_NADDR32 R_PPC = 1011936 R_PPC_EMB_NADDR16 R_PPC = 1021937 R_PPC_EMB_NADDR16_LO R_PPC = 1031938 R_PPC_EMB_NADDR16_HI R_PPC = 1041939 R_PPC_EMB_NADDR16_HA R_PPC = 1051940 R_PPC_EMB_SDAI16 R_PPC = 1061941 R_PPC_EMB_SDA2I16 R_PPC = 1071942 R_PPC_EMB_SDA2REL R_PPC = 1081943 R_PPC_EMB_SDA21 R_PPC = 1091944 R_PPC_EMB_MRKREF R_PPC = 1101945 R_PPC_EMB_RELSEC16 R_PPC = 1111946 R_PPC_EMB_RELST_LO R_PPC = 1121947 R_PPC_EMB_RELST_HI R_PPC = 1131948 R_PPC_EMB_RELST_HA R_PPC = 1141949 R_PPC_EMB_BIT_FLD R_PPC = 1151950 R_PPC_EMB_RELSDA R_PPC = 1161951)1952var rppcStrings = []intName{1953 {0, "R_PPC_NONE"},1954 {1, "R_PPC_ADDR32"},1955 {2, "R_PPC_ADDR24"},1956 {3, "R_PPC_ADDR16"},1957 {4, "R_PPC_ADDR16_LO"},1958 {5, "R_PPC_ADDR16_HI"},1959 {6, "R_PPC_ADDR16_HA"},1960 {7, "R_PPC_ADDR14"},1961 {8, "R_PPC_ADDR14_BRTAKEN"},1962 {9, "R_PPC_ADDR14_BRNTAKEN"},1963 {10, "R_PPC_REL24"},1964 {11, "R_PPC_REL14"},1965 {12, "R_PPC_REL14_BRTAKEN"},1966 {13, "R_PPC_REL14_BRNTAKEN"},1967 {14, "R_PPC_GOT16"},1968 {15, "R_PPC_GOT16_LO"},1969 {16, "R_PPC_GOT16_HI"},1970 {17, "R_PPC_GOT16_HA"},1971 {18, "R_PPC_PLTREL24"},1972 {19, "R_PPC_COPY"},1973 {20, "R_PPC_GLOB_DAT"},1974 {21, "R_PPC_JMP_SLOT"},1975 {22, "R_PPC_RELATIVE"},1976 {23, "R_PPC_LOCAL24PC"},1977 {24, "R_PPC_UADDR32"},1978 {25, "R_PPC_UADDR16"},1979 {26, "R_PPC_REL32"},1980 {27, "R_PPC_PLT32"},1981 {28, "R_PPC_PLTREL32"},1982 {29, "R_PPC_PLT16_LO"},1983 {30, "R_PPC_PLT16_HI"},1984 {31, "R_PPC_PLT16_HA"},1985 {32, "R_PPC_SDAREL16"},1986 {33, "R_PPC_SECTOFF"},1987 {34, "R_PPC_SECTOFF_LO"},1988 {35, "R_PPC_SECTOFF_HI"},1989 {36, "R_PPC_SECTOFF_HA"},1990 {67, "R_PPC_TLS"},1991 {68, "R_PPC_DTPMOD32"},1992 {69, "R_PPC_TPREL16"},1993 {70, "R_PPC_TPREL16_LO"},1994 {71, "R_PPC_TPREL16_HI"},1995 {72, "R_PPC_TPREL16_HA"},1996 {73, "R_PPC_TPREL32"},1997 {74, "R_PPC_DTPREL16"},1998 {75, "R_PPC_DTPREL16_LO"},1999 {76, "R_PPC_DTPREL16_HI"},2000 {77, "R_PPC_DTPREL16_HA"},2001 {78, "R_PPC_DTPREL32"},2002 {79, "R_PPC_GOT_TLSGD16"},2003 {80, "R_PPC_GOT_TLSGD16_LO"},2004 {81, "R_PPC_GOT_TLSGD16_HI"},2005 {82, "R_PPC_GOT_TLSGD16_HA"},2006 {83, "R_PPC_GOT_TLSLD16"},2007 {84, "R_PPC_GOT_TLSLD16_LO"},2008 {85, "R_PPC_GOT_TLSLD16_HI"},2009 {86, "R_PPC_GOT_TLSLD16_HA"},2010 {87, "R_PPC_GOT_TPREL16"},2011 {88, "R_PPC_GOT_TPREL16_LO"},2012 {89, "R_PPC_GOT_TPREL16_HI"},2013 {90, "R_PPC_GOT_TPREL16_HA"},2014 {101, "R_PPC_EMB_NADDR32"},2015 {102, "R_PPC_EMB_NADDR16"},2016 {103, "R_PPC_EMB_NADDR16_LO"},2017 {104, "R_PPC_EMB_NADDR16_HI"},2018 {105, "R_PPC_EMB_NADDR16_HA"},2019 {106, "R_PPC_EMB_SDAI16"},2020 {107, "R_PPC_EMB_SDA2I16"},2021 {108, "R_PPC_EMB_SDA2REL"},2022 {109, "R_PPC_EMB_SDA21"},2023 {110, "R_PPC_EMB_MRKREF"},2024 {111, "R_PPC_EMB_RELSEC16"},2025 {112, "R_PPC_EMB_RELST_LO"},2026 {113, "R_PPC_EMB_RELST_HI"},2027 {114, "R_PPC_EMB_RELST_HA"},2028 {115, "R_PPC_EMB_BIT_FLD"},2029 {116, "R_PPC_EMB_RELSDA"},2030}2031func (i R_PPC) String() string { return stringName(uint32(i), rppcStrings, false) }2032func (i R_PPC) GoString() string { return stringName(uint32(i), rppcStrings, true) }2033// Relocation types for 64-bit PowerPC or Power Architecture processors.2034//2035// Values that are shared by both R_PPC and R_PPC64 are prefixed with2036// R_POWERPC_ in the ELF standard. For the R_PPC64 type, the relevant2037// shared relocations have been renamed with the prefix R_PPC64_.2038// The original name follows the value in a comment.2039type R_PPC64 int2040const (2041 R_PPC64_NONE R_PPC64 = 0 // R_POWERPC_NONE2042 R_PPC64_ADDR32 R_PPC64 = 1 // R_POWERPC_ADDR322043 R_PPC64_ADDR24 R_PPC64 = 2 // R_POWERPC_ADDR242044 R_PPC64_ADDR16 R_PPC64 = 3 // R_POWERPC_ADDR162045 R_PPC64_ADDR16_LO R_PPC64 = 4 // R_POWERPC_ADDR16_LO2046 R_PPC64_ADDR16_HI R_PPC64 = 5 // R_POWERPC_ADDR16_HI2047 R_PPC64_ADDR16_HA R_PPC64 = 6 // R_POWERPC_ADDR16_HA2048 R_PPC64_ADDR14 R_PPC64 = 7 // R_POWERPC_ADDR142049 R_PPC64_ADDR14_BRTAKEN R_PPC64 = 8 // R_POWERPC_ADDR14_BRTAKEN2050 R_PPC64_ADDR14_BRNTAKEN R_PPC64 = 9 // R_POWERPC_ADDR14_BRNTAKEN2051 R_PPC64_REL24 R_PPC64 = 10 // R_POWERPC_REL242052 R_PPC64_REL14 R_PPC64 = 11 // R_POWERPC_REL142053 R_PPC64_REL14_BRTAKEN R_PPC64 = 12 // R_POWERPC_REL14_BRTAKEN2054 R_PPC64_REL14_BRNTAKEN R_PPC64 = 13 // R_POWERPC_REL14_BRNTAKEN2055 R_PPC64_GOT16 R_PPC64 = 14 // R_POWERPC_GOT162056 R_PPC64_GOT16_LO R_PPC64 = 15 // R_POWERPC_GOT16_LO2057 R_PPC64_GOT16_HI R_PPC64 = 16 // R_POWERPC_GOT16_HI2058 R_PPC64_GOT16_HA R_PPC64 = 17 // R_POWERPC_GOT16_HA2059 R_PPC64_JMP_SLOT R_PPC64 = 21 // R_POWERPC_JMP_SLOT2060 R_PPC64_REL32 R_PPC64 = 26 // R_POWERPC_REL322061 R_PPC64_ADDR64 R_PPC64 = 382062 R_PPC64_ADDR16_HIGHER R_PPC64 = 392063 R_PPC64_ADDR16_HIGHERA R_PPC64 = 402064 R_PPC64_ADDR16_HIGHEST R_PPC64 = 412065 R_PPC64_ADDR16_HIGHESTA R_PPC64 = 422066 R_PPC64_REL64 R_PPC64 = 442067 R_PPC64_TOC16 R_PPC64 = 472068 R_PPC64_TOC16_LO R_PPC64 = 482069 R_PPC64_TOC16_HI R_PPC64 = 492070 R_PPC64_TOC16_HA R_PPC64 = 502071 R_PPC64_TOC R_PPC64 = 512072 R_PPC64_PLTGOT16 R_PPC64 = 522073 R_PPC64_PLTGOT16_LO R_PPC64 = 532074 R_PPC64_PLTGOT16_HI R_PPC64 = 542075 R_PPC64_PLTGOT16_HA R_PPC64 = 552076 R_PPC64_ADDR16_DS R_PPC64 = 562077 R_PPC64_ADDR16_LO_DS R_PPC64 = 572078 R_PPC64_GOT16_DS R_PPC64 = 582079 R_PPC64_GOT16_LO_DS R_PPC64 = 592080 R_PPC64_PLT16_LO_DS R_PPC64 = 602081 R_PPC64_SECTOFF_DS R_PPC64 = 612082 R_PPC64_SECTOFF_LO_DS R_PPC64 = 612083 R_PPC64_TOC16_DS R_PPC64 = 632084 R_PPC64_TOC16_LO_DS R_PPC64 = 642085 R_PPC64_PLTGOT16_DS R_PPC64 = 652086 R_PPC64_PLTGOT_LO_DS R_PPC64 = 662087 R_PPC64_TLS R_PPC64 = 67 // R_POWERPC_TLS2088 R_PPC64_DTPMOD64 R_PPC64 = 68 // R_POWERPC_DTPMOD642089 R_PPC64_TPREL16 R_PPC64 = 69 // R_POWERPC_TPREL162090 R_PPC64_TPREL16_LO R_PPC64 = 70 // R_POWERPC_TPREL16_LO2091 R_PPC64_TPREL16_HI R_PPC64 = 71 // R_POWERPC_TPREL16_HI2092 R_PPC64_TPREL16_HA R_PPC64 = 72 // R_POWERPC_TPREL16_HA2093 R_PPC64_TPREL64 R_PPC64 = 73 // R_POWERPC_TPREL642094 R_PPC64_DTPREL16 R_PPC64 = 74 // R_POWERPC_DTPREL162095 R_PPC64_DTPREL16_LO R_PPC64 = 75 // R_POWERPC_DTPREL16_LO2096 R_PPC64_DTPREL16_HI R_PPC64 = 76 // R_POWERPC_DTPREL16_HI2097 R_PPC64_DTPREL16_HA R_PPC64 = 77 // R_POWERPC_DTPREL16_HA2098 R_PPC64_DTPREL64 R_PPC64 = 78 // R_POWERPC_DTPREL642099 R_PPC64_GOT_TLSGD16 R_PPC64 = 79 // R_POWERPC_GOT_TLSGD162100 R_PPC64_GOT_TLSGD16_LO R_PPC64 = 80 // R_POWERPC_GOT_TLSGD16_LO2101 R_PPC64_GOT_TLSGD16_HI R_PPC64 = 81 // R_POWERPC_GOT_TLSGD16_HI2102 R_PPC64_GOT_TLSGD16_HA R_PPC64 = 82 // R_POWERPC_GOT_TLSGD16_HA2103 R_PPC64_GOT_TLSLD16 R_PPC64 = 83 // R_POWERPC_GOT_TLSLD162104 R_PPC64_GOT_TLSLD16_LO R_PPC64 = 84 // R_POWERPC_GOT_TLSLD16_LO2105 R_PPC64_GOT_TLSLD16_HI R_PPC64 = 85 // R_POWERPC_GOT_TLSLD16_HI2106 R_PPC64_GOT_TLSLD16_HA R_PPC64 = 86 // R_POWERPC_GOT_TLSLD16_HA2107 R_PPC64_GOT_TPREL16_DS R_PPC64 = 87 // R_POWERPC_GOT_TPREL16_DS2108 R_PPC64_GOT_TPREL16_LO_DS R_PPC64 = 88 // R_POWERPC_GOT_TPREL16_LO_DS2109 R_PPC64_GOT_TPREL16_HI R_PPC64 = 89 // R_POWERPC_GOT_TPREL16_HI2110 R_PPC64_GOT_TPREL16_HA R_PPC64 = 90 // R_POWERPC_GOT_TPREL16_HA2111 R_PPC64_GOT_DTPREL16_DS R_PPC64 = 91 // R_POWERPC_GOT_DTPREL16_DS2112 R_PPC64_GOT_DTPREL16_LO_DS R_PPC64 = 92 // R_POWERPC_GOT_DTPREL16_LO_DS2113 R_PPC64_GOT_DTPREL16_HI R_PPC64 = 93 // R_POWERPC_GOT_DTPREL16_HI2114 R_PPC64_GOT_DTPREL16_HA R_PPC64 = 94 // R_POWERPC_GOT_DTPREL16_HA2115 R_PPC64_TPREL16_DS R_PPC64 = 952116 R_PPC64_TPREL16_LO_DS R_PPC64 = 962117 R_PPC64_TPREL16_HIGHER R_PPC64 = 972118 R_PPC64_TPREL16_HIGHERA R_PPC64 = 982119 R_PPC64_TPREL16_HIGHEST R_PPC64 = 992120 R_PPC64_TPREL16_HIGHESTA R_PPC64 = 1002121 R_PPC64_DTPREL16_DS R_PPC64 = 1012122 R_PPC64_DTPREL16_LO_DS R_PPC64 = 1022123 R_PPC64_DTPREL16_HIGHER R_PPC64 = 1032124 R_PPC64_DTPREL16_HIGHERA R_PPC64 = 1042125 R_PPC64_DTPREL16_HIGHEST R_PPC64 = 1052126 R_PPC64_DTPREL16_HIGHESTA R_PPC64 = 1062127 R_PPC64_TLSGD R_PPC64 = 1072128 R_PPC64_TLSLD R_PPC64 = 1082129 R_PPC64_TOCSAVE R_PPC64 = 1092130 R_PPC64_ADDR16_HIGH R_PPC64 = 1102131 R_PPC64_ADDR16_HIGHA R_PPC64 = 1112132 R_PPC64_TPREL16_HIGH R_PPC64 = 1122133 R_PPC64_TPREL16_HIGHA R_PPC64 = 1132134 R_PPC64_DTPREL16_HIGH R_PPC64 = 1142135 R_PPC64_DTPREL16_HIGHA R_PPC64 = 1152136 R_PPC64_REL24_NOTOC R_PPC64 = 1162137 R_PPC64_ADDR64_LOCAL R_PPC64 = 1172138 R_PPC64_ENTRY R_PPC64 = 1182139 R_PPC64_REL16DX_HA R_PPC64 = 246 // R_POWERPC_REL16DX_HA2140 R_PPC64_JMP_IREL R_PPC64 = 2472141 R_PPC64_IRELATIVE R_PPC64 = 248 // R_POWERPC_IRELATIVE2142 R_PPC64_REL16 R_PPC64 = 249 // R_POWERPC_REL162143 R_PPC64_REL16_LO R_PPC64 = 250 // R_POWERPC_REL16_LO2144 R_PPC64_REL16_HI R_PPC64 = 251 // R_POWERPC_REL16_HI2145 R_PPC64_REL16_HA R_PPC64 = 252 // R_POWERPC_REL16_HA2146)2147var rppc64Strings = []intName{2148 {0, "R_PPC64_NONE"},2149 {1, "R_PPC64_ADDR32"},2150 {2, "R_PPC64_ADDR24"},2151 {3, "R_PPC64_ADDR16"},2152 {4, "R_PPC64_ADDR16_LO"},2153 {5, "R_PPC64_ADDR16_HI"},2154 {6, "R_PPC64_ADDR16_HA"},2155 {7, "R_PPC64_ADDR14"},2156 {8, "R_PPC64_ADDR14_BRTAKEN"},2157 {9, "R_PPC64_ADDR14_BRNTAKEN"},2158 {10, "R_PPC64_REL24"},2159 {11, "R_PPC64_REL14"},2160 {12, "R_PPC64_REL14_BRTAKEN"},2161 {13, "R_PPC64_REL14_BRNTAKEN"},2162 {14, "R_PPC64_GOT16"},2163 {15, "R_PPC64_GOT16_LO"},2164 {16, "R_PPC64_GOT16_HI"},2165 {17, "R_PPC64_GOT16_HA"},2166 {21, "R_PPC64_JMP_SLOT"},2167 {26, "R_PPC64_REL32"},2168 {38, "R_PPC64_ADDR64"},2169 {39, "R_PPC64_ADDR16_HIGHER"},2170 {40, "R_PPC64_ADDR16_HIGHERA"},2171 {41, "R_PPC64_ADDR16_HIGHEST"},2172 {42, "R_PPC64_ADDR16_HIGHESTA"},2173 {44, "R_PPC64_REL64"},2174 {47, "R_PPC64_TOC16"},2175 {48, "R_PPC64_TOC16_LO"},2176 {49, "R_PPC64_TOC16_HI"},2177 {50, "R_PPC64_TOC16_HA"},2178 {51, "R_PPC64_TOC"},2179 {52, "R_PPC64_PLTGOT16"},2180 {53, "R_PPC64_PLTGOT16_LO"},2181 {54, "R_PPC64_PLTGOT16_HI"},2182 {55, "R_PPC64_PLTGOT16_HA"},2183 {56, "R_PPC64_ADDR16_DS"},2184 {57, "R_PPC64_ADDR16_LO_DS"},2185 {58, "R_PPC64_GOT16_DS"},2186 {59, "R_PPC64_GOT16_LO_DS"},2187 {60, "R_PPC64_PLT16_LO_DS"},2188 {61, "R_PPC64_SECTOFF_DS"},2189 {61, "R_PPC64_SECTOFF_LO_DS"},2190 {63, "R_PPC64_TOC16_DS"},2191 {64, "R_PPC64_TOC16_LO_DS"},2192 {65, "R_PPC64_PLTGOT16_DS"},2193 {66, "R_PPC64_PLTGOT_LO_DS"},2194 {67, "R_PPC64_TLS"},2195 {68, "R_PPC64_DTPMOD64"},2196 {69, "R_PPC64_TPREL16"},2197 {70, "R_PPC64_TPREL16_LO"},2198 {71, "R_PPC64_TPREL16_HI"},2199 {72, "R_PPC64_TPREL16_HA"},2200 {73, "R_PPC64_TPREL64"},2201 {74, "R_PPC64_DTPREL16"},2202 {75, "R_PPC64_DTPREL16_LO"},2203 {76, "R_PPC64_DTPREL16_HI"},2204 {77, "R_PPC64_DTPREL16_HA"},2205 {78, "R_PPC64_DTPREL64"},2206 {79, "R_PPC64_GOT_TLSGD16"},2207 {80, "R_PPC64_GOT_TLSGD16_LO"},2208 {81, "R_PPC64_GOT_TLSGD16_HI"},2209 {82, "R_PPC64_GOT_TLSGD16_HA"},2210 {83, "R_PPC64_GOT_TLSLD16"},2211 {84, "R_PPC64_GOT_TLSLD16_LO"},2212 {85, "R_PPC64_GOT_TLSLD16_HI"},2213 {86, "R_PPC64_GOT_TLSLD16_HA"},2214 {87, "R_PPC64_GOT_TPREL16_DS"},2215 {88, "R_PPC64_GOT_TPREL16_LO_DS"},2216 {89, "R_PPC64_GOT_TPREL16_HI"},2217 {90, "R_PPC64_GOT_TPREL16_HA"},2218 {91, "R_PPC64_GOT_DTPREL16_DS"},2219 {92, "R_PPC64_GOT_DTPREL16_LO_DS"},2220 {93, "R_PPC64_GOT_DTPREL16_HI"},2221 {94, "R_PPC64_GOT_DTPREL16_HA"},2222 {95, "R_PPC64_TPREL16_DS"},2223 {96, "R_PPC64_TPREL16_LO_DS"},2224 {97, "R_PPC64_TPREL16_HIGHER"},2225 {98, "R_PPC64_TPREL16_HIGHERA"},2226 {99, "R_PPC64_TPREL16_HIGHEST"},2227 {100, "R_PPC64_TPREL16_HIGHESTA"},2228 {101, "R_PPC64_DTPREL16_DS"},2229 {102, "R_PPC64_DTPREL16_LO_DS"},2230 {103, "R_PPC64_DTPREL16_HIGHER"},2231 {104, "R_PPC64_DTPREL16_HIGHERA"},2232 {105, "R_PPC64_DTPREL16_HIGHEST"},2233 {106, "R_PPC64_DTPREL16_HIGHESTA"},2234 {107, "R_PPC64_TLSGD"},2235 {108, "R_PPC64_TLSLD"},2236 {109, "R_PPC64_TOCSAVE"},2237 {110, "R_PPC64_ADDR16_HIGH"},2238 {111, "R_PPC64_ADDR16_HIGHA"},2239 {112, "R_PPC64_TPREL16_HIGH"},2240 {113, "R_PPC64_TPREL16_HIGHA"},2241 {114, "R_PPC64_DTPREL16_HIGH"},2242 {115, "R_PPC64_DTPREL16_HIGHA"},2243 {116, "R_PPC64_REL24_NOTOC"},2244 {117, "R_PPC64_ADDR64_LOCAL"},2245 {118, "R_PPC64_ENTRY"},2246 {246, "R_PPC64_REL16DX_HA"},2247 {247, "R_PPC64_JMP_IREL"},2248 {248, "R_PPC64_IRELATIVE"},2249 {249, "R_PPC64_REL16"},2250 {250, "R_PPC64_REL16_LO"},2251 {251, "R_PPC64_REL16_HI"},2252 {252, "R_PPC64_REL16_HA"},2253}2254func (i R_PPC64) String() string { return stringName(uint32(i), rppc64Strings, false) }2255func (i R_PPC64) GoString() string { return stringName(uint32(i), rppc64Strings, true) }2256// Relocation types for RISC-V processors.2257type R_RISCV int2258const (2259 R_RISCV_NONE R_RISCV = 0 /* No relocation. */2260 R_RISCV_32 R_RISCV = 1 /* Add 32 bit zero extended symbol value */2261 R_RISCV_64 R_RISCV = 2 /* Add 64 bit symbol value. */2262 R_RISCV_RELATIVE R_RISCV = 3 /* Add load address of shared object. */2263 R_RISCV_COPY R_RISCV = 4 /* Copy data from shared object. */2264 R_RISCV_JUMP_SLOT R_RISCV = 5 /* Set GOT entry to code address. */2265 R_RISCV_TLS_DTPMOD32 R_RISCV = 6 /* 32 bit ID of module containing symbol */2266 R_RISCV_TLS_DTPMOD64 R_RISCV = 7 /* ID of module containing symbol */2267 R_RISCV_TLS_DTPREL32 R_RISCV = 8 /* 32 bit relative offset in TLS block */2268 R_RISCV_TLS_DTPREL64 R_RISCV = 9 /* Relative offset in TLS block */2269 R_RISCV_TLS_TPREL32 R_RISCV = 10 /* 32 bit relative offset in static TLS block */2270 R_RISCV_TLS_TPREL64 R_RISCV = 11 /* Relative offset in static TLS block */2271 R_RISCV_BRANCH R_RISCV = 16 /* PC-relative branch */2272 R_RISCV_JAL R_RISCV = 17 /* PC-relative jump */2273 R_RISCV_CALL R_RISCV = 18 /* PC-relative call */2274 R_RISCV_CALL_PLT R_RISCV = 19 /* PC-relative call (PLT) */2275 R_RISCV_GOT_HI20 R_RISCV = 20 /* PC-relative GOT reference */2276 R_RISCV_TLS_GOT_HI20 R_RISCV = 21 /* PC-relative TLS IE GOT offset */2277 R_RISCV_TLS_GD_HI20 R_RISCV = 22 /* PC-relative TLS GD reference */2278 R_RISCV_PCREL_HI20 R_RISCV = 23 /* PC-relative reference */2279 R_RISCV_PCREL_LO12_I R_RISCV = 24 /* PC-relative reference */2280 R_RISCV_PCREL_LO12_S R_RISCV = 25 /* PC-relative reference */2281 R_RISCV_HI20 R_RISCV = 26 /* Absolute address */2282 R_RISCV_LO12_I R_RISCV = 27 /* Absolute address */2283 R_RISCV_LO12_S R_RISCV = 28 /* Absolute address */2284 R_RISCV_TPREL_HI20 R_RISCV = 29 /* TLS LE thread offset */2285 R_RISCV_TPREL_LO12_I R_RISCV = 30 /* TLS LE thread offset */2286 R_RISCV_TPREL_LO12_S R_RISCV = 31 /* TLS LE thread offset */2287 R_RISCV_TPREL_ADD R_RISCV = 32 /* TLS LE thread usage */2288 R_RISCV_ADD8 R_RISCV = 33 /* 8-bit label addition */2289 R_RISCV_ADD16 R_RISCV = 34 /* 16-bit label addition */2290 R_RISCV_ADD32 R_RISCV = 35 /* 32-bit label addition */2291 R_RISCV_ADD64 R_RISCV = 36 /* 64-bit label addition */2292 R_RISCV_SUB8 R_RISCV = 37 /* 8-bit label subtraction */2293 R_RISCV_SUB16 R_RISCV = 38 /* 16-bit label subtraction */2294 R_RISCV_SUB32 R_RISCV = 39 /* 32-bit label subtraction */2295 R_RISCV_SUB64 R_RISCV = 40 /* 64-bit label subtraction */2296 R_RISCV_GNU_VTINHERIT R_RISCV = 41 /* GNU C++ vtable hierarchy */2297 R_RISCV_GNU_VTENTRY R_RISCV = 42 /* GNU C++ vtable member usage */2298 R_RISCV_ALIGN R_RISCV = 43 /* Alignment statement */2299 R_RISCV_RVC_BRANCH R_RISCV = 44 /* PC-relative branch offset */2300 R_RISCV_RVC_JUMP R_RISCV = 45 /* PC-relative jump offset */2301 R_RISCV_RVC_LUI R_RISCV = 46 /* Absolute address */2302 R_RISCV_GPREL_I R_RISCV = 47 /* GP-relative reference */2303 R_RISCV_GPREL_S R_RISCV = 48 /* GP-relative reference */2304 R_RISCV_TPREL_I R_RISCV = 49 /* TP-relative TLS LE load */2305 R_RISCV_TPREL_S R_RISCV = 50 /* TP-relative TLS LE store */2306 R_RISCV_RELAX R_RISCV = 51 /* Instruction pair can be relaxed */2307 R_RISCV_SUB6 R_RISCV = 52 /* Local label subtraction */2308 R_RISCV_SET6 R_RISCV = 53 /* Local label subtraction */2309 R_RISCV_SET8 R_RISCV = 54 /* Local label subtraction */2310 R_RISCV_SET16 R_RISCV = 55 /* Local label subtraction */2311 R_RISCV_SET32 R_RISCV = 56 /* Local label subtraction */2312 R_RISCV_32_PCREL R_RISCV = 57 /* 32-bit PC relative */2313)2314var rriscvStrings = []intName{2315 {0, "R_RISCV_NONE"},2316 {1, "R_RISCV_32"},2317 {2, "R_RISCV_64"},2318 {3, "R_RISCV_RELATIVE"},2319 {4, "R_RISCV_COPY"},2320 {5, "R_RISCV_JUMP_SLOT"},2321 {6, "R_RISCV_TLS_DTPMOD32"},2322 {7, "R_RISCV_TLS_DTPMOD64"},2323 {8, "R_RISCV_TLS_DTPREL32"},2324 {9, "R_RISCV_TLS_DTPREL64"},2325 {10, "R_RISCV_TLS_TPREL32"},2326 {11, "R_RISCV_TLS_TPREL64"},2327 {16, "R_RISCV_BRANCH"},2328 {17, "R_RISCV_JAL"},2329 {18, "R_RISCV_CALL"},2330 {19, "R_RISCV_CALL_PLT"},2331 {20, "R_RISCV_GOT_HI20"},2332 {21, "R_RISCV_TLS_GOT_HI20"},2333 {22, "R_RISCV_TLS_GD_HI20"},2334 {23, "R_RISCV_PCREL_HI20"},2335 {24, "R_RISCV_PCREL_LO12_I"},2336 {25, "R_RISCV_PCREL_LO12_S"},2337 {26, "R_RISCV_HI20"},2338 {27, "R_RISCV_LO12_I"},2339 {28, "R_RISCV_LO12_S"},2340 {29, "R_RISCV_TPREL_HI20"},2341 {30, "R_RISCV_TPREL_LO12_I"},2342 {31, "R_RISCV_TPREL_LO12_S"},2343 {32, "R_RISCV_TPREL_ADD"},2344 {33, "R_RISCV_ADD8"},2345 {34, "R_RISCV_ADD16"},2346 {35, "R_RISCV_ADD32"},2347 {36, "R_RISCV_ADD64"},2348 {37, "R_RISCV_SUB8"},2349 {38, "R_RISCV_SUB16"},2350 {39, "R_RISCV_SUB32"},2351 {40, "R_RISCV_SUB64"},2352 {41, "R_RISCV_GNU_VTINHERIT"},2353 {42, "R_RISCV_GNU_VTENTRY"},2354 {43, "R_RISCV_ALIGN"},2355 {44, "R_RISCV_RVC_BRANCH"},2356 {45, "R_RISCV_RVC_JUMP"},2357 {46, "R_RISCV_RVC_LUI"},2358 {47, "R_RISCV_GPREL_I"},2359 {48, "R_RISCV_GPREL_S"},2360 {49, "R_RISCV_TPREL_I"},2361 {50, "R_RISCV_TPREL_S"},2362 {51, "R_RISCV_RELAX"},2363 {52, "R_RISCV_SUB6"},2364 {53, "R_RISCV_SET6"},2365 {54, "R_RISCV_SET8"},2366 {55, "R_RISCV_SET16"},2367 {56, "R_RISCV_SET32"},2368 {57, "R_RISCV_32_PCREL"},2369}2370func (i R_RISCV) String() string { return stringName(uint32(i), rriscvStrings, false) }2371func (i R_RISCV) GoString() string { return stringName(uint32(i), rriscvStrings, true) }2372// Relocation types for s390x processors.2373type R_390 int2374const (2375 R_390_NONE R_390 = 02376 R_390_8 R_390 = 12377 R_390_12 R_390 = 22378 R_390_16 R_390 = 32379 R_390_32 R_390 = 42380 R_390_PC32 R_390 = 52381 R_390_GOT12 R_390 = 62382 R_390_GOT32 R_390 = 72383 R_390_PLT32 R_390 = 82384 R_390_COPY R_390 = 92385 R_390_GLOB_DAT R_390 = 102386 R_390_JMP_SLOT R_390 = 112387 R_390_RELATIVE R_390 = 122388 R_390_GOTOFF R_390 = 132389 R_390_GOTPC R_390 = 142390 R_390_GOT16 R_390 = 152391 R_390_PC16 R_390 = 162392 R_390_PC16DBL R_390 = 172393 R_390_PLT16DBL R_390 = 182394 R_390_PC32DBL R_390 = 192395 R_390_PLT32DBL R_390 = 202396 R_390_GOTPCDBL R_390 = 212397 R_390_64 R_390 = 222398 R_390_PC64 R_390 = 232399 R_390_GOT64 R_390 = 242400 R_390_PLT64 R_390 = 252401 R_390_GOTENT R_390 = 262402 R_390_GOTOFF16 R_390 = 272403 R_390_GOTOFF64 R_390 = 282404 R_390_GOTPLT12 R_390 = 292405 R_390_GOTPLT16 R_390 = 302406 R_390_GOTPLT32 R_390 = 312407 R_390_GOTPLT64 R_390 = 322408 R_390_GOTPLTENT R_390 = 332409 R_390_GOTPLTOFF16 R_390 = 342410 R_390_GOTPLTOFF32 R_390 = 352411 R_390_GOTPLTOFF64 R_390 = 362412 R_390_TLS_LOAD R_390 = 372413 R_390_TLS_GDCALL R_390 = 382414 R_390_TLS_LDCALL R_390 = 392415 R_390_TLS_GD32 R_390 = 402416 R_390_TLS_GD64 R_390 = 412417 R_390_TLS_GOTIE12 R_390 = 422418 R_390_TLS_GOTIE32 R_390 = 432419 R_390_TLS_GOTIE64 R_390 = 442420 R_390_TLS_LDM32 R_390 = 452421 R_390_TLS_LDM64 R_390 = 462422 R_390_TLS_IE32 R_390 = 472423 R_390_TLS_IE64 R_390 = 482424 R_390_TLS_IEENT R_390 = 492425 R_390_TLS_LE32 R_390 = 502426 R_390_TLS_LE64 R_390 = 512427 R_390_TLS_LDO32 R_390 = 522428 R_390_TLS_LDO64 R_390 = 532429 R_390_TLS_DTPMOD R_390 = 542430 R_390_TLS_DTPOFF R_390 = 552431 R_390_TLS_TPOFF R_390 = 562432 R_390_20 R_390 = 572433 R_390_GOT20 R_390 = 582434 R_390_GOTPLT20 R_390 = 592435 R_390_TLS_GOTIE20 R_390 = 602436)2437var r390Strings = []intName{2438 {0, "R_390_NONE"},2439 {1, "R_390_8"},2440 {2, "R_390_12"},2441 {3, "R_390_16"},2442 {4, "R_390_32"},2443 {5, "R_390_PC32"},2444 {6, "R_390_GOT12"},2445 {7, "R_390_GOT32"},2446 {8, "R_390_PLT32"},2447 {9, "R_390_COPY"},2448 {10, "R_390_GLOB_DAT"},2449 {11, "R_390_JMP_SLOT"},2450 {12, "R_390_RELATIVE"},2451 {13, "R_390_GOTOFF"},2452 {14, "R_390_GOTPC"},2453 {15, "R_390_GOT16"},2454 {16, "R_390_PC16"},2455 {17, "R_390_PC16DBL"},2456 {18, "R_390_PLT16DBL"},2457 {19, "R_390_PC32DBL"},2458 {20, "R_390_PLT32DBL"},2459 {21, "R_390_GOTPCDBL"},2460 {22, "R_390_64"},2461 {23, "R_390_PC64"},2462 {24, "R_390_GOT64"},2463 {25, "R_390_PLT64"},2464 {26, "R_390_GOTENT"},2465 {27, "R_390_GOTOFF16"},2466 {28, "R_390_GOTOFF64"},2467 {29, "R_390_GOTPLT12"},2468 {30, "R_390_GOTPLT16"},2469 {31, "R_390_GOTPLT32"},2470 {32, "R_390_GOTPLT64"},2471 {33, "R_390_GOTPLTENT"},2472 {34, "R_390_GOTPLTOFF16"},2473 {35, "R_390_GOTPLTOFF32"},2474 {36, "R_390_GOTPLTOFF64"},2475 {37, "R_390_TLS_LOAD"},2476 {38, "R_390_TLS_GDCALL"},2477 {39, "R_390_TLS_LDCALL"},2478 {40, "R_390_TLS_GD32"},2479 {41, "R_390_TLS_GD64"},2480 {42, "R_390_TLS_GOTIE12"},2481 {43, "R_390_TLS_GOTIE32"},2482 {44, "R_390_TLS_GOTIE64"},2483 {45, "R_390_TLS_LDM32"},2484 {46, "R_390_TLS_LDM64"},2485 {47, "R_390_TLS_IE32"},2486 {48, "R_390_TLS_IE64"},2487 {49, "R_390_TLS_IEENT"},2488 {50, "R_390_TLS_LE32"},2489 {51, "R_390_TLS_LE64"},2490 {52, "R_390_TLS_LDO32"},2491 {53, "R_390_TLS_LDO64"},2492 {54, "R_390_TLS_DTPMOD"},2493 {55, "R_390_TLS_DTPOFF"},2494 {56, "R_390_TLS_TPOFF"},2495 {57, "R_390_20"},2496 {58, "R_390_GOT20"},2497 {59, "R_390_GOTPLT20"},2498 {60, "R_390_TLS_GOTIE20"},2499}2500func (i R_390) String() string { return stringName(uint32(i), r390Strings, false) }2501func (i R_390) GoString() string { return stringName(uint32(i), r390Strings, true) }2502// Relocation types for SPARC.2503type R_SPARC int2504const (2505 R_SPARC_NONE R_SPARC = 02506 R_SPARC_8 R_SPARC = 12507 R_SPARC_16 R_SPARC = 22508 R_SPARC_32 R_SPARC = 32509 R_SPARC_DISP8 R_SPARC = 42510 R_SPARC_DISP16 R_SPARC = 52511 R_SPARC_DISP32 R_SPARC = 62512 R_SPARC_WDISP30 R_SPARC = 72513 R_SPARC_WDISP22 R_SPARC = 82514 R_SPARC_HI22 R_SPARC = 92515 R_SPARC_22 R_SPARC = 102516 R_SPARC_13 R_SPARC = 112517 R_SPARC_LO10 R_SPARC = 122518 R_SPARC_GOT10 R_SPARC = 132519 R_SPARC_GOT13 R_SPARC = 142520 R_SPARC_GOT22 R_SPARC = 152521 R_SPARC_PC10 R_SPARC = 162522 R_SPARC_PC22 R_SPARC = 172523 R_SPARC_WPLT30 R_SPARC = 182524 R_SPARC_COPY R_SPARC = 192525 R_SPARC_GLOB_DAT R_SPARC = 202526 R_SPARC_JMP_SLOT R_SPARC = 212527 R_SPARC_RELATIVE R_SPARC = 222528 R_SPARC_UA32 R_SPARC = 232529 R_SPARC_PLT32 R_SPARC = 242530 R_SPARC_HIPLT22 R_SPARC = 252531 R_SPARC_LOPLT10 R_SPARC = 262532 R_SPARC_PCPLT32 R_SPARC = 272533 R_SPARC_PCPLT22 R_SPARC = 282534 R_SPARC_PCPLT10 R_SPARC = 292535 R_SPARC_10 R_SPARC = 302536 R_SPARC_11 R_SPARC = 312537 R_SPARC_64 R_SPARC = 322538 R_SPARC_OLO10 R_SPARC = 332539 R_SPARC_HH22 R_SPARC = 342540 R_SPARC_HM10 R_SPARC = 352541 R_SPARC_LM22 R_SPARC = 362542 R_SPARC_PC_HH22 R_SPARC = 372543 R_SPARC_PC_HM10 R_SPARC = 382544 R_SPARC_PC_LM22 R_SPARC = 392545 R_SPARC_WDISP16 R_SPARC = 402546 R_SPARC_WDISP19 R_SPARC = 412547 R_SPARC_GLOB_JMP R_SPARC = 422548 R_SPARC_7 R_SPARC = 432549 R_SPARC_5 R_SPARC = 442550 R_SPARC_6 R_SPARC = 452551 R_SPARC_DISP64 R_SPARC = 462552 R_SPARC_PLT64 R_SPARC = 472553 R_SPARC_HIX22 R_SPARC = 482554 R_SPARC_LOX10 R_SPARC = 492555 R_SPARC_H44 R_SPARC = 502556 R_SPARC_M44 R_SPARC = 512557 R_SPARC_L44 R_SPARC = 522558 R_SPARC_REGISTER R_SPARC = 532559 R_SPARC_UA64 R_SPARC = 542560 R_SPARC_UA16 R_SPARC = 552561)2562var rsparcStrings = []intName{2563 {0, "R_SPARC_NONE"},2564 {1, "R_SPARC_8"},2565 {2, "R_SPARC_16"},2566 {3, "R_SPARC_32"},2567 {4, "R_SPARC_DISP8"},2568 {5, "R_SPARC_DISP16"},2569 {6, "R_SPARC_DISP32"},2570 {7, "R_SPARC_WDISP30"},2571 {8, "R_SPARC_WDISP22"},2572 {9, "R_SPARC_HI22"},2573 {10, "R_SPARC_22"},2574 {11, "R_SPARC_13"},2575 {12, "R_SPARC_LO10"},2576 {13, "R_SPARC_GOT10"},2577 {14, "R_SPARC_GOT13"},2578 {15, "R_SPARC_GOT22"},2579 {16, "R_SPARC_PC10"},2580 {17, "R_SPARC_PC22"},2581 {18, "R_SPARC_WPLT30"},2582 {19, "R_SPARC_COPY"},2583 {20, "R_SPARC_GLOB_DAT"},2584 {21, "R_SPARC_JMP_SLOT"},2585 {22, "R_SPARC_RELATIVE"},2586 {23, "R_SPARC_UA32"},2587 {24, "R_SPARC_PLT32"},2588 {25, "R_SPARC_HIPLT22"},2589 {26, "R_SPARC_LOPLT10"},2590 {27, "R_SPARC_PCPLT32"},2591 {28, "R_SPARC_PCPLT22"},2592 {29, "R_SPARC_PCPLT10"},2593 {30, "R_SPARC_10"},2594 {31, "R_SPARC_11"},2595 {32, "R_SPARC_64"},2596 {33, "R_SPARC_OLO10"},2597 {34, "R_SPARC_HH22"},2598 {35, "R_SPARC_HM10"},2599 {36, "R_SPARC_LM22"},2600 {37, "R_SPARC_PC_HH22"},2601 {38, "R_SPARC_PC_HM10"},2602 {39, "R_SPARC_PC_LM22"},2603 {40, "R_SPARC_WDISP16"},2604 {41, "R_SPARC_WDISP19"},2605 {42, "R_SPARC_GLOB_JMP"},2606 {43, "R_SPARC_7"},2607 {44, "R_SPARC_5"},2608 {45, "R_SPARC_6"},2609 {46, "R_SPARC_DISP64"},2610 {47, "R_SPARC_PLT64"},2611 {48, "R_SPARC_HIX22"},2612 {49, "R_SPARC_LOX10"},2613 {50, "R_SPARC_H44"},2614 {51, "R_SPARC_M44"},2615 {52, "R_SPARC_L44"},2616 {53, "R_SPARC_REGISTER"},2617 {54, "R_SPARC_UA64"},2618 {55, "R_SPARC_UA16"},2619}2620func (i R_SPARC) String() string { return stringName(uint32(i), rsparcStrings, false) }2621func (i R_SPARC) GoString() string { return stringName(uint32(i), rsparcStrings, true) }2622// Magic number for the elf trampoline, chosen wisely to be an immediate value.2623const ARM_MAGIC_TRAMP_NUMBER = 0x5c0000032624// ELF32 File header.2625type Header32 struct {2626 Ident [EI_NIDENT]byte /* File identification. */2627 Type uint16 /* File type. */2628 Machine uint16 /* Machine architecture. */2629 Version uint32 /* ELF format version. */2630 Entry uint32 /* Entry point. */2631 Phoff uint32 /* Program header file offset. */2632 Shoff uint32 /* Section header file offset. */2633 Flags uint32 /* Architecture-specific flags. */2634 Ehsize uint16 /* Size of ELF header in bytes. */2635 Phentsize uint16 /* Size of program header entry. */2636 Phnum uint16 /* Number of program header entries. */2637 Shentsize uint16 /* Size of section header entry. */2638 Shnum uint16 /* Number of section header entries. */2639 Shstrndx uint16 /* Section name strings section. */2640}2641// ELF32 Section header.2642type Section32 struct {2643 Name uint32 /* Section name (index into the section header string table). */2644 Type uint32 /* Section type. */2645 Flags uint32 /* Section flags. */2646 Addr uint32 /* Address in memory image. */2647 Off uint32 /* Offset in file. */2648 Size uint32 /* Size in bytes. */2649 Link uint32 /* Index of a related section. */2650 Info uint32 /* Depends on section type. */2651 Addralign uint32 /* Alignment in bytes. */2652 Entsize uint32 /* Size of each entry in section. */2653}2654// ELF32 Program header.2655type Prog32 struct {2656 Type uint32 /* Entry type. */2657 Off uint32 /* File offset of contents. */2658 Vaddr uint32 /* Virtual address in memory image. */2659 Paddr uint32 /* Physical address (not used). */2660 Filesz uint32 /* Size of contents in file. */2661 Memsz uint32 /* Size of contents in memory. */2662 Flags uint32 /* Access permission flags. */2663 Align uint32 /* Alignment in memory and file. */2664}2665// ELF32 Dynamic structure. The ".dynamic" section contains an array of them.2666type Dyn32 struct {2667 Tag int32 /* Entry type. */2668 Val uint32 /* Integer/Address value. */2669}2670// ELF32 Compression header.2671type Chdr32 struct {2672 Type uint322673 Size uint322674 Addralign uint322675}2676/*2677 * Relocation entries.2678 */2679// ELF32 Relocations that don't need an addend field.2680type Rel32 struct {2681 Off uint32 /* Location to be relocated. */2682 Info uint32 /* Relocation type and symbol index. */2683}2684// ELF32 Relocations that need an addend field.2685type Rela32 struct {2686 Off uint32 /* Location to be relocated. */2687 Info uint32 /* Relocation type and symbol index. */2688 Addend int32 /* Addend. */2689}2690func R_SYM32(info uint32) uint32 { return info >> 8 }2691func R_TYPE32(info uint32) uint32 { return info & 0xff }2692func R_INFO32(sym, typ uint32) uint32 { return sym<<8 | typ }2693// ELF32 Symbol.2694type Sym32 struct {2695 Name uint322696 Value uint322697 Size uint322698 Info uint82699 Other uint82700 Shndx uint162701}2702const Sym32Size = 162703func ST_BIND(info uint8) SymBind { return SymBind(info >> 4) }2704func ST_TYPE(info uint8) SymType { return SymType(info & 0xF) }2705func ST_INFO(bind SymBind, typ SymType) uint8 {2706 return uint8(bind)<<4 | uint8(typ)&0xf2707}2708func ST_VISIBILITY(other uint8) SymVis { return SymVis(other & 3) }2709/*2710 * ELF642711 */2712// ELF64 file header.2713type Header64 struct {2714 Ident [EI_NIDENT]byte /* File identification. */2715 Type uint16 /* File type. */2716 Machine uint16 /* Machine architecture. */2717 Version uint32 /* ELF format version. */2718 Entry uint64 /* Entry point. */2719 Phoff uint64 /* Program header file offset. */2720 Shoff uint64 /* Section header file offset. */2721 Flags uint32 /* Architecture-specific flags. */2722 Ehsize uint16 /* Size of ELF header in bytes. */2723 Phentsize uint16 /* Size of program header entry. */2724 Phnum uint16 /* Number of program header entries. */2725 Shentsize uint16 /* Size of section header entry. */2726 Shnum uint16 /* Number of section header entries. */2727 Shstrndx uint16 /* Section name strings section. */2728}2729// ELF64 Section header.2730type Section64 struct {2731 Name uint32 /* Section name (index into the section header string table). */2732 Type uint32 /* Section type. */2733 Flags uint64 /* Section flags. */2734 Addr uint64 /* Address in memory image. */2735 Off uint64 /* Offset in file. */2736 Size uint64 /* Size in bytes. */2737 Link uint32 /* Index of a related section. */2738 Info uint32 /* Depends on section type. */2739 Addralign uint64 /* Alignment in bytes. */2740 Entsize uint64 /* Size of each entry in section. */2741}2742// ELF64 Program header.2743type Prog64 struct {2744 Type uint32 /* Entry type. */2745 Flags uint32 /* Access permission flags. */2746 Off uint64 /* File offset of contents. */2747 Vaddr uint64 /* Virtual address in memory image. */2748 Paddr uint64 /* Physical address (not used). */2749 Filesz uint64 /* Size of contents in file. */2750 Memsz uint64 /* Size of contents in memory. */2751 Align uint64 /* Alignment in memory and file. */2752}2753// ELF64 Dynamic structure. The ".dynamic" section contains an array of them.2754type Dyn64 struct {2755 Tag int64 /* Entry type. */2756 Val uint64 /* Integer/address value */2757}2758// ELF64 Compression header.2759type Chdr64 struct {2760 Type uint322761 _ uint32 /* Reserved. */2762 Size uint642763 Addralign uint642764}2765/*2766 * Relocation entries.2767 */2768/* ELF64 relocations that don't need an addend field. */2769type Rel64 struct {2770 Off uint64 /* Location to be relocated. */2771 Info uint64 /* Relocation type and symbol index. */2772}2773/* ELF64 relocations that need an addend field. */2774type Rela64 struct {2775 Off uint64 /* Location to be relocated. */2776 Info uint64 /* Relocation type and symbol index. */2777 Addend int64 /* Addend. */2778}2779func R_SYM64(info uint64) uint32 { return uint32(info >> 32) }2780func R_TYPE64(info uint64) uint32 { return uint32(info) }2781func R_INFO(sym, typ uint32) uint64 { return uint64(sym)<<32 | uint64(typ) }2782// ELF64 symbol table entries.2783type Sym64 struct {2784 Name uint32 /* String table index of name. */2785 Info uint8 /* Type and binding information. */2786 Other uint8 /* Reserved (not used). */2787 Shndx uint16 /* Section index of symbol. */2788 Value uint64 /* Symbol value. */2789 Size uint64 /* Size of associated object. */2790}2791const Sym64Size = 242792type intName struct {2793 i uint322794 s string2795}2796func stringName(i uint32, names []intName, goSyntax bool) string {2797 for _, n := range names {2798 if n.i == i {2799 if goSyntax {2800 return "elf." + n.s2801 }2802 return n.s2803 }2804 }2805 // second pass - look for smaller to add with.2806 // assume sorted already2807 for j := len(names) - 1; j >= 0; j-- {2808 n := names[j]2809 if n.i < i {2810 s := n.s2811 if goSyntax {2812 s = "elf." + s2813 }2814 return s + "+" + strconv.FormatUint(uint64(i-n.i), 10)2815 }2816 }2817 return strconv.FormatUint(uint64(i), 10)2818}2819func flagName(i uint32, names []intName, goSyntax bool) string {2820 s := ""2821 for _, n := range names {2822 if n.i&i == n.i {2823 if len(s) > 0 {2824 s += "+"2825 }2826 if goSyntax {2827 s += "elf."2828 }2829 s += n.s2830 i -= n.i2831 }2832 }2833 if len(s) == 0 {2834 return "0x" + strconv.FormatUint(uint64(i), 16)2835 }2836 if i != 0 {2837 s += "+0x" + strconv.FormatUint(uint64(i), 16)2838 }2839 return s2840}...

Full Screen

Full Screen

powerpc.go

Source:powerpc.go Github

copy

Full Screen

...157 "RS": reg,158 "UI": uint(v & 0xffff)})...)159 return ret160}161func (imap insnSetMap) ld32(reg uint, v uint32) []byte {162 ret := make([]byte, 0)163 ret = append(ret, imap["addis"].enc(map[string]uint{164 "RT": reg,165 "RA": 0, // In "addis", '0' means 0, not GPR0166 "SI": uint((v >> 16) & 0xffff)})...)167 ret = append(ret, imap["ori"].enc(map[string]uint{168 "RA": reg,169 "RS": reg,170 "UI": uint(v & 0xffff)})...)171 return ret172}173func (imap insnSetMap) ldgpr32(regaddr, regval uint, addr uint64, v uint32) []byte {174 ret := make([]byte, 0)175 ret = append(ret, imap.ld64(regaddr, addr)...)176 ret = append(ret, imap.ld32(regval, v)...)177 ret = append(ret, imap["stw"].enc(map[string]uint{178 "RA": regaddr,179 "RS": regval})...)180 return ret181}182func (imap insnSetMap) sc(lev uint) []byte {183 return imap["sc"].enc(map[string]uint{"LEV": lev})184}...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Syzkaller automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful