src/debug/elf/elf.go GO 3,682 lines View on github.com → Search inside
File is large — showing lines 1–2,000 of 3,682.
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-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc)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 */4445package elf4647import "strconv"4849/*50 * Constants51 */5253// Indexes into the Header.Ident array.54const (55	EI_CLASS      = 4  /* Class of machine. */56	EI_DATA       = 5  /* Data format. */57	EI_VERSION    = 6  /* ELF format version. */58	EI_OSABI      = 7  /* Operating system / ABI identification */59	EI_ABIVERSION = 8  /* ABI version */60	EI_PAD        = 9  /* Start of padding (per SVR4 ABI). */61	EI_NIDENT     = 16 /* Size of e_ident array. */62)6364// Initial magic number for ELF files.65const ELFMAG = "\177ELF"6667// Version is found in Header.Ident[EI_VERSION] and Header.Version.68type Version byte6970const (71	EV_NONE    Version = 072	EV_CURRENT Version = 173)7475var versionStrings = []intName{76	{0, "EV_NONE"},77	{1, "EV_CURRENT"},78}7980func (i Version) String() string   { return stringName(uint32(i), versionStrings, false) }81func (i Version) GoString() string { return stringName(uint32(i), versionStrings, true) }8283// Class is found in Header.Ident[EI_CLASS] and Header.Class.84type Class byte8586const (87	ELFCLASSNONE Class = 0 /* Unknown class. */88	ELFCLASS32   Class = 1 /* 32-bit architecture. */89	ELFCLASS64   Class = 2 /* 64-bit architecture. */90)9192var classStrings = []intName{93	{0, "ELFCLASSNONE"},94	{1, "ELFCLASS32"},95	{2, "ELFCLASS64"},96}9798func (i Class) String() string   { return stringName(uint32(i), classStrings, false) }99func (i Class) GoString() string { return stringName(uint32(i), classStrings, true) }100101// Data is found in Header.Ident[EI_DATA] and Header.Data.102type Data byte103104const (105	ELFDATANONE Data = 0 /* Unknown data format. */106	ELFDATA2LSB Data = 1 /* 2's complement little-endian. */107	ELFDATA2MSB Data = 2 /* 2's complement big-endian. */108)109110var dataStrings = []intName{111	{0, "ELFDATANONE"},112	{1, "ELFDATA2LSB"},113	{2, "ELFDATA2MSB"},114}115116func (i Data) String() string   { return stringName(uint32(i), dataStrings, false) }117func (i Data) GoString() string { return stringName(uint32(i), dataStrings, true) }118119// OSABI is found in Header.Ident[EI_OSABI] and Header.OSABI.120type OSABI byte121122const (123	ELFOSABI_NONE       OSABI = 0   /* UNIX System V ABI */124	ELFOSABI_HPUX       OSABI = 1   /* HP-UX operating system */125	ELFOSABI_NETBSD     OSABI = 2   /* NetBSD */126	ELFOSABI_LINUX      OSABI = 3   /* Linux */127	ELFOSABI_HURD       OSABI = 4   /* Hurd */128	ELFOSABI_86OPEN     OSABI = 5   /* 86Open common IA32 ABI */129	ELFOSABI_SOLARIS    OSABI = 6   /* Solaris */130	ELFOSABI_AIX        OSABI = 7   /* AIX */131	ELFOSABI_IRIX       OSABI = 8   /* IRIX */132	ELFOSABI_FREEBSD    OSABI = 9   /* FreeBSD */133	ELFOSABI_TRU64      OSABI = 10  /* TRU64 UNIX */134	ELFOSABI_MODESTO    OSABI = 11  /* Novell Modesto */135	ELFOSABI_OPENBSD    OSABI = 12  /* OpenBSD */136	ELFOSABI_OPENVMS    OSABI = 13  /* Open VMS */137	ELFOSABI_NSK        OSABI = 14  /* HP Non-Stop Kernel */138	ELFOSABI_AROS       OSABI = 15  /* Amiga Research OS */139	ELFOSABI_FENIXOS    OSABI = 16  /* The FenixOS highly scalable multi-core OS */140	ELFOSABI_CLOUDABI   OSABI = 17  /* Nuxi CloudABI */141	ELFOSABI_ARM        OSABI = 97  /* ARM */142	ELFOSABI_STANDALONE OSABI = 255 /* Standalone (embedded) application */143)144145var osabiStrings = []intName{146	{0, "ELFOSABI_NONE"},147	{1, "ELFOSABI_HPUX"},148	{2, "ELFOSABI_NETBSD"},149	{3, "ELFOSABI_LINUX"},150	{4, "ELFOSABI_HURD"},151	{5, "ELFOSABI_86OPEN"},152	{6, "ELFOSABI_SOLARIS"},153	{7, "ELFOSABI_AIX"},154	{8, "ELFOSABI_IRIX"},155	{9, "ELFOSABI_FREEBSD"},156	{10, "ELFOSABI_TRU64"},157	{11, "ELFOSABI_MODESTO"},158	{12, "ELFOSABI_OPENBSD"},159	{13, "ELFOSABI_OPENVMS"},160	{14, "ELFOSABI_NSK"},161	{15, "ELFOSABI_AROS"},162	{16, "ELFOSABI_FENIXOS"},163	{17, "ELFOSABI_CLOUDABI"},164	{97, "ELFOSABI_ARM"},165	{255, "ELFOSABI_STANDALONE"},166}167168func (i OSABI) String() string   { return stringName(uint32(i), osabiStrings, false) }169func (i OSABI) GoString() string { return stringName(uint32(i), osabiStrings, true) }170171// Type is found in Header.Type.172type Type uint16173174const (175	ET_NONE   Type = 0      /* Unknown type. */176	ET_REL    Type = 1      /* Relocatable. */177	ET_EXEC   Type = 2      /* Executable. */178	ET_DYN    Type = 3      /* Shared object. */179	ET_CORE   Type = 4      /* Core file. */180	ET_LOOS   Type = 0xfe00 /* First operating system specific. */181	ET_HIOS   Type = 0xfeff /* Last operating system-specific. */182	ET_LOPROC Type = 0xff00 /* First processor-specific. */183	ET_HIPROC Type = 0xffff /* Last processor-specific. */184)185186var typeStrings = []intName{187	{0, "ET_NONE"},188	{1, "ET_REL"},189	{2, "ET_EXEC"},190	{3, "ET_DYN"},191	{4, "ET_CORE"},192	{0xfe00, "ET_LOOS"},193	{0xfeff, "ET_HIOS"},194	{0xff00, "ET_LOPROC"},195	{0xffff, "ET_HIPROC"},196}197198func (i Type) String() string   { return stringName(uint32(i), typeStrings, false) }199func (i Type) GoString() string { return stringName(uint32(i), typeStrings, true) }200201// Machine is found in Header.Machine.202type Machine uint16203204const (205	EM_NONE          Machine = 0   /* Unknown machine. */206	EM_M32           Machine = 1   /* AT&T WE32100. */207	EM_SPARC         Machine = 2   /* Sun SPARC. */208	EM_386           Machine = 3   /* Intel i386. */209	EM_68K           Machine = 4   /* Motorola 68000. */210	EM_88K           Machine = 5   /* Motorola 88000. */211	EM_860           Machine = 7   /* Intel i860. */212	EM_MIPS          Machine = 8   /* MIPS R3000 Big-Endian only. */213	EM_S370          Machine = 9   /* IBM System/370. */214	EM_MIPS_RS3_LE   Machine = 10  /* MIPS R3000 Little-Endian. */215	EM_PARISC        Machine = 15  /* HP PA-RISC. */216	EM_VPP500        Machine = 17  /* Fujitsu VPP500. */217	EM_SPARC32PLUS   Machine = 18  /* SPARC v8plus. */218	EM_960           Machine = 19  /* Intel 80960. */219	EM_PPC           Machine = 20  /* PowerPC 32-bit. */220	EM_PPC64         Machine = 21  /* PowerPC 64-bit. */221	EM_S390          Machine = 22  /* IBM System/390. */222	EM_V800          Machine = 36  /* NEC V800. */223	EM_FR20          Machine = 37  /* Fujitsu FR20. */224	EM_RH32          Machine = 38  /* TRW RH-32. */225	EM_RCE           Machine = 39  /* Motorola RCE. */226	EM_ARM           Machine = 40  /* ARM. */227	EM_SH            Machine = 42  /* Hitachi SH. */228	EM_SPARCV9       Machine = 43  /* SPARC v9 64-bit. */229	EM_TRICORE       Machine = 44  /* Siemens TriCore embedded processor. */230	EM_ARC           Machine = 45  /* Argonaut RISC Core. */231	EM_H8_300        Machine = 46  /* Hitachi H8/300. */232	EM_H8_300H       Machine = 47  /* Hitachi H8/300H. */233	EM_H8S           Machine = 48  /* Hitachi H8S. */234	EM_H8_500        Machine = 49  /* Hitachi H8/500. */235	EM_IA_64         Machine = 50  /* Intel IA-64 Processor. */236	EM_MIPS_X        Machine = 51  /* Stanford MIPS-X. */237	EM_COLDFIRE      Machine = 52  /* Motorola ColdFire. */238	EM_68HC12        Machine = 53  /* Motorola M68HC12. */239	EM_MMA           Machine = 54  /* Fujitsu MMA. */240	EM_PCP           Machine = 55  /* Siemens PCP. */241	EM_NCPU          Machine = 56  /* Sony nCPU. */242	EM_NDR1          Machine = 57  /* Denso NDR1 microprocessor. */243	EM_STARCORE      Machine = 58  /* Motorola Star*Core processor. */244	EM_ME16          Machine = 59  /* Toyota ME16 processor. */245	EM_ST100         Machine = 60  /* STMicroelectronics ST100 processor. */246	EM_TINYJ         Machine = 61  /* Advanced Logic Corp. TinyJ processor. */247	EM_X86_64        Machine = 62  /* Advanced Micro Devices x86-64 */248	EM_PDSP          Machine = 63  /* Sony DSP Processor */249	EM_PDP10         Machine = 64  /* Digital Equipment Corp. PDP-10 */250	EM_PDP11         Machine = 65  /* Digital Equipment Corp. PDP-11 */251	EM_FX66          Machine = 66  /* Siemens FX66 microcontroller */252	EM_ST9PLUS       Machine = 67  /* STMicroelectronics ST9+ 8/16 bit microcontroller */253	EM_ST7           Machine = 68  /* STMicroelectronics ST7 8-bit microcontroller */254	EM_68HC16        Machine = 69  /* Motorola MC68HC16 Microcontroller */255	EM_68HC11        Machine = 70  /* Motorola MC68HC11 Microcontroller */256	EM_68HC08        Machine = 71  /* Motorola MC68HC08 Microcontroller */257	EM_68HC05        Machine = 72  /* Motorola MC68HC05 Microcontroller */258	EM_SVX           Machine = 73  /* Silicon Graphics SVx */259	EM_ST19          Machine = 74  /* STMicroelectronics ST19 8-bit microcontroller */260	EM_VAX           Machine = 75  /* Digital VAX */261	EM_CRIS          Machine = 76  /* Axis Communications 32-bit embedded processor */262	EM_JAVELIN       Machine = 77  /* Infineon Technologies 32-bit embedded processor */263	EM_FIREPATH      Machine = 78  /* Element 14 64-bit DSP Processor */264	EM_ZSP           Machine = 79  /* LSI Logic 16-bit DSP Processor */265	EM_MMIX          Machine = 80  /* Donald Knuth's educational 64-bit processor */266	EM_HUANY         Machine = 81  /* Harvard University machine-independent object files */267	EM_PRISM         Machine = 82  /* SiTera Prism */268	EM_AVR           Machine = 83  /* Atmel AVR 8-bit microcontroller */269	EM_FR30          Machine = 84  /* Fujitsu FR30 */270	EM_D10V          Machine = 85  /* Mitsubishi D10V */271	EM_D30V          Machine = 86  /* Mitsubishi D30V */272	EM_V850          Machine = 87  /* NEC v850 */273	EM_M32R          Machine = 88  /* Mitsubishi M32R */274	EM_MN10300       Machine = 89  /* Matsushita MN10300 */275	EM_MN10200       Machine = 90  /* Matsushita MN10200 */276	EM_PJ            Machine = 91  /* picoJava */277	EM_OPENRISC      Machine = 92  /* OpenRISC 32-bit embedded processor */278	EM_ARC_COMPACT   Machine = 93  /* ARC International ARCompact processor (old spelling/synonym: EM_ARC_A5) */279	EM_XTENSA        Machine = 94  /* Tensilica Xtensa Architecture */280	EM_VIDEOCORE     Machine = 95  /* Alphamosaic VideoCore processor */281	EM_TMM_GPP       Machine = 96  /* Thompson Multimedia General Purpose Processor */282	EM_NS32K         Machine = 97  /* National Semiconductor 32000 series */283	EM_TPC           Machine = 98  /* Tenor Network TPC processor */284	EM_SNP1K         Machine = 99  /* Trebia SNP 1000 processor */285	EM_ST200         Machine = 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */286	EM_IP2K          Machine = 101 /* Ubicom IP2xxx microcontroller family */287	EM_MAX           Machine = 102 /* MAX Processor */288	EM_CR            Machine = 103 /* National Semiconductor CompactRISC microprocessor */289	EM_F2MC16        Machine = 104 /* Fujitsu F2MC16 */290	EM_MSP430        Machine = 105 /* Texas Instruments embedded microcontroller msp430 */291	EM_BLACKFIN      Machine = 106 /* Analog Devices Blackfin (DSP) processor */292	EM_SE_C33        Machine = 107 /* S1C33 Family of Seiko Epson processors */293	EM_SEP           Machine = 108 /* Sharp embedded microprocessor */294	EM_ARCA          Machine = 109 /* Arca RISC Microprocessor */295	EM_UNICORE       Machine = 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */296	EM_EXCESS        Machine = 111 /* eXcess: 16/32/64-bit configurable embedded CPU */297	EM_DXP           Machine = 112 /* Icera Semiconductor Inc. Deep Execution Processor */298	EM_ALTERA_NIOS2  Machine = 113 /* Altera Nios II soft-core processor */299	EM_CRX           Machine = 114 /* National Semiconductor CompactRISC CRX microprocessor */300	EM_XGATE         Machine = 115 /* Motorola XGATE embedded processor */301	EM_C166          Machine = 116 /* Infineon C16x/XC16x processor */302	EM_M16C          Machine = 117 /* Renesas M16C series microprocessors */303	EM_DSPIC30F      Machine = 118 /* Microchip Technology dsPIC30F Digital Signal Controller */304	EM_CE            Machine = 119 /* Freescale Communication Engine RISC core */305	EM_M32C          Machine = 120 /* Renesas M32C series microprocessors */306	EM_TSK3000       Machine = 131 /* Altium TSK3000 core */307	EM_RS08          Machine = 132 /* Freescale RS08 embedded processor */308	EM_SHARC         Machine = 133 /* Analog Devices SHARC family of 32-bit DSP processors */309	EM_ECOG2         Machine = 134 /* Cyan Technology eCOG2 microprocessor */310	EM_SCORE7        Machine = 135 /* Sunplus S+core7 RISC processor */311	EM_DSP24         Machine = 136 /* New Japan Radio (NJR) 24-bit DSP Processor */312	EM_VIDEOCORE3    Machine = 137 /* Broadcom VideoCore III processor */313	EM_LATTICEMICO32 Machine = 138 /* RISC processor for Lattice FPGA architecture */314	EM_SE_C17        Machine = 139 /* Seiko Epson C17 family */315	EM_TI_C6000      Machine = 140 /* The Texas Instruments TMS320C6000 DSP family */316	EM_TI_C2000      Machine = 141 /* The Texas Instruments TMS320C2000 DSP family */317	EM_TI_C5500      Machine = 142 /* The Texas Instruments TMS320C55x DSP family */318	EM_TI_ARP32      Machine = 143 /* Texas Instruments Application Specific RISC Processor, 32bit fetch */319	EM_TI_PRU        Machine = 144 /* Texas Instruments Programmable Realtime Unit */320	EM_MMDSP_PLUS    Machine = 160 /* STMicroelectronics 64bit VLIW Data Signal Processor */321	EM_CYPRESS_M8C   Machine = 161 /* Cypress M8C microprocessor */322	EM_R32C          Machine = 162 /* Renesas R32C series microprocessors */323	EM_TRIMEDIA      Machine = 163 /* NXP Semiconductors TriMedia architecture family */324	EM_QDSP6         Machine = 164 /* QUALCOMM DSP6 Processor */325	EM_8051          Machine = 165 /* Intel 8051 and variants */326	EM_STXP7X        Machine = 166 /* STMicroelectronics STxP7x family of configurable and extensible RISC processors */327	EM_NDS32         Machine = 167 /* Andes Technology compact code size embedded RISC processor family */328	EM_ECOG1         Machine = 168 /* Cyan Technology eCOG1X family */329	EM_ECOG1X        Machine = 168 /* Cyan Technology eCOG1X family */330	EM_MAXQ30        Machine = 169 /* Dallas Semiconductor MAXQ30 Core Micro-controllers */331	EM_XIMO16        Machine = 170 /* New Japan Radio (NJR) 16-bit DSP Processor */332	EM_MANIK         Machine = 171 /* M2000 Reconfigurable RISC Microprocessor */333	EM_CRAYNV2       Machine = 172 /* Cray Inc. NV2 vector architecture */334	EM_RX            Machine = 173 /* Renesas RX family */335	EM_METAG         Machine = 174 /* Imagination Technologies META processor architecture */336	EM_MCST_ELBRUS   Machine = 175 /* MCST Elbrus general purpose hardware architecture */337	EM_ECOG16        Machine = 176 /* Cyan Technology eCOG16 family */338	EM_CR16          Machine = 177 /* National Semiconductor CompactRISC CR16 16-bit microprocessor */339	EM_ETPU          Machine = 178 /* Freescale Extended Time Processing Unit */340	EM_SLE9X         Machine = 179 /* Infineon Technologies SLE9X core */341	EM_L10M          Machine = 180 /* Intel L10M */342	EM_K10M          Machine = 181 /* Intel K10M */343	EM_AARCH64       Machine = 183 /* ARM 64-bit Architecture (AArch64) */344	EM_AVR32         Machine = 185 /* Atmel Corporation 32-bit microprocessor family */345	EM_STM8          Machine = 186 /* STMicroeletronics STM8 8-bit microcontroller */346	EM_TILE64        Machine = 187 /* Tilera TILE64 multicore architecture family */347	EM_TILEPRO       Machine = 188 /* Tilera TILEPro multicore architecture family */348	EM_MICROBLAZE    Machine = 189 /* Xilinx MicroBlaze 32-bit RISC soft processor core */349	EM_CUDA          Machine = 190 /* NVIDIA CUDA architecture */350	EM_TILEGX        Machine = 191 /* Tilera TILE-Gx multicore architecture family */351	EM_CLOUDSHIELD   Machine = 192 /* CloudShield architecture family */352	EM_COREA_1ST     Machine = 193 /* KIPO-KAIST Core-A 1st generation processor family */353	EM_COREA_2ND     Machine = 194 /* KIPO-KAIST Core-A 2nd generation processor family */354	EM_ARC_COMPACT2  Machine = 195 /* Synopsys ARCompact V2 */355	EM_OPEN8         Machine = 196 /* Open8 8-bit RISC soft processor core */356	EM_RL78          Machine = 197 /* Renesas RL78 family */357	EM_VIDEOCORE5    Machine = 198 /* Broadcom VideoCore V processor */358	EM_78KOR         Machine = 199 /* Renesas 78KOR family */359	EM_56800EX       Machine = 200 /* Freescale 56800EX Digital Signal Controller (DSC) */360	EM_BA1           Machine = 201 /* Beyond BA1 CPU architecture */361	EM_BA2           Machine = 202 /* Beyond BA2 CPU architecture */362	EM_XCORE         Machine = 203 /* XMOS xCORE processor family */363	EM_MCHP_PIC      Machine = 204 /* Microchip 8-bit PIC(r) family */364	EM_INTEL205      Machine = 205 /* Reserved by Intel */365	EM_INTEL206      Machine = 206 /* Reserved by Intel */366	EM_INTEL207      Machine = 207 /* Reserved by Intel */367	EM_INTEL208      Machine = 208 /* Reserved by Intel */368	EM_INTEL209      Machine = 209 /* Reserved by Intel */369	EM_KM32          Machine = 210 /* KM211 KM32 32-bit processor */370	EM_KMX32         Machine = 211 /* KM211 KMX32 32-bit processor */371	EM_KMX16         Machine = 212 /* KM211 KMX16 16-bit processor */372	EM_KMX8          Machine = 213 /* KM211 KMX8 8-bit processor */373	EM_KVARC         Machine = 214 /* KM211 KVARC processor */374	EM_CDP           Machine = 215 /* Paneve CDP architecture family */375	EM_COGE          Machine = 216 /* Cognitive Smart Memory Processor */376	EM_COOL          Machine = 217 /* Bluechip Systems CoolEngine */377	EM_NORC          Machine = 218 /* Nanoradio Optimized RISC */378	EM_CSR_KALIMBA   Machine = 219 /* CSR Kalimba architecture family */379	EM_Z80           Machine = 220 /* Zilog Z80 */380	EM_VISIUM        Machine = 221 /* Controls and Data Services VISIUMcore processor */381	EM_FT32          Machine = 222 /* FTDI Chip FT32 high performance 32-bit RISC architecture */382	EM_MOXIE         Machine = 223 /* Moxie processor family */383	EM_AMDGPU        Machine = 224 /* AMD GPU architecture */384	EM_RISCV         Machine = 243 /* RISC-V */385	EM_LANAI         Machine = 244 /* Lanai 32-bit processor */386	EM_BPF           Machine = 247 /* Linux BPF – in-kernel virtual machine */387	EM_LOONGARCH     Machine = 258 /* LoongArch */388389	/* Non-standard or deprecated. */390	EM_486         Machine = 6      /* Intel i486. */391	EM_MIPS_RS4_BE Machine = 10     /* MIPS R4000 Big-Endian */392	EM_ALPHA_STD   Machine = 41     /* Digital Alpha (standard value). */393	EM_ALPHA       Machine = 0x9026 /* Alpha (written in the absence of an ABI) */394)395396var machineStrings = []intName{397	{0, "EM_NONE"},398	{1, "EM_M32"},399	{2, "EM_SPARC"},400	{3, "EM_386"},401	{4, "EM_68K"},402	{5, "EM_88K"},403	{7, "EM_860"},404	{8, "EM_MIPS"},405	{9, "EM_S370"},406	{10, "EM_MIPS_RS3_LE"},407	{15, "EM_PARISC"},408	{17, "EM_VPP500"},409	{18, "EM_SPARC32PLUS"},410	{19, "EM_960"},411	{20, "EM_PPC"},412	{21, "EM_PPC64"},413	{22, "EM_S390"},414	{36, "EM_V800"},415	{37, "EM_FR20"},416	{38, "EM_RH32"},417	{39, "EM_RCE"},418	{40, "EM_ARM"},419	{42, "EM_SH"},420	{43, "EM_SPARCV9"},421	{44, "EM_TRICORE"},422	{45, "EM_ARC"},423	{46, "EM_H8_300"},424	{47, "EM_H8_300H"},425	{48, "EM_H8S"},426	{49, "EM_H8_500"},427	{50, "EM_IA_64"},428	{51, "EM_MIPS_X"},429	{52, "EM_COLDFIRE"},430	{53, "EM_68HC12"},431	{54, "EM_MMA"},432	{55, "EM_PCP"},433	{56, "EM_NCPU"},434	{57, "EM_NDR1"},435	{58, "EM_STARCORE"},436	{59, "EM_ME16"},437	{60, "EM_ST100"},438	{61, "EM_TINYJ"},439	{62, "EM_X86_64"},440	{63, "EM_PDSP"},441	{64, "EM_PDP10"},442	{65, "EM_PDP11"},443	{66, "EM_FX66"},444	{67, "EM_ST9PLUS"},445	{68, "EM_ST7"},446	{69, "EM_68HC16"},447	{70, "EM_68HC11"},448	{71, "EM_68HC08"},449	{72, "EM_68HC05"},450	{73, "EM_SVX"},451	{74, "EM_ST19"},452	{75, "EM_VAX"},453	{76, "EM_CRIS"},454	{77, "EM_JAVELIN"},455	{78, "EM_FIREPATH"},456	{79, "EM_ZSP"},457	{80, "EM_MMIX"},458	{81, "EM_HUANY"},459	{82, "EM_PRISM"},460	{83, "EM_AVR"},461	{84, "EM_FR30"},462	{85, "EM_D10V"},463	{86, "EM_D30V"},464	{87, "EM_V850"},465	{88, "EM_M32R"},466	{89, "EM_MN10300"},467	{90, "EM_MN10200"},468	{91, "EM_PJ"},469	{92, "EM_OPENRISC"},470	{93, "EM_ARC_COMPACT"},471	{94, "EM_XTENSA"},472	{95, "EM_VIDEOCORE"},473	{96, "EM_TMM_GPP"},474	{97, "EM_NS32K"},475	{98, "EM_TPC"},476	{99, "EM_SNP1K"},477	{100, "EM_ST200"},478	{101, "EM_IP2K"},479	{102, "EM_MAX"},480	{103, "EM_CR"},481	{104, "EM_F2MC16"},482	{105, "EM_MSP430"},483	{106, "EM_BLACKFIN"},484	{107, "EM_SE_C33"},485	{108, "EM_SEP"},486	{109, "EM_ARCA"},487	{110, "EM_UNICORE"},488	{111, "EM_EXCESS"},489	{112, "EM_DXP"},490	{113, "EM_ALTERA_NIOS2"},491	{114, "EM_CRX"},492	{115, "EM_XGATE"},493	{116, "EM_C166"},494	{117, "EM_M16C"},495	{118, "EM_DSPIC30F"},496	{119, "EM_CE"},497	{120, "EM_M32C"},498	{131, "EM_TSK3000"},499	{132, "EM_RS08"},500	{133, "EM_SHARC"},501	{134, "EM_ECOG2"},502	{135, "EM_SCORE7"},503	{136, "EM_DSP24"},504	{137, "EM_VIDEOCORE3"},505	{138, "EM_LATTICEMICO32"},506	{139, "EM_SE_C17"},507	{140, "EM_TI_C6000"},508	{141, "EM_TI_C2000"},509	{142, "EM_TI_C5500"},510	{143, "EM_TI_ARP32"},511	{144, "EM_TI_PRU"},512	{160, "EM_MMDSP_PLUS"},513	{161, "EM_CYPRESS_M8C"},514	{162, "EM_R32C"},515	{163, "EM_TRIMEDIA"},516	{164, "EM_QDSP6"},517	{165, "EM_8051"},518	{166, "EM_STXP7X"},519	{167, "EM_NDS32"},520	{168, "EM_ECOG1"},521	{168, "EM_ECOG1X"},522	{169, "EM_MAXQ30"},523	{170, "EM_XIMO16"},524	{171, "EM_MANIK"},525	{172, "EM_CRAYNV2"},526	{173, "EM_RX"},527	{174, "EM_METAG"},528	{175, "EM_MCST_ELBRUS"},529	{176, "EM_ECOG16"},530	{177, "EM_CR16"},531	{178, "EM_ETPU"},532	{179, "EM_SLE9X"},533	{180, "EM_L10M"},534	{181, "EM_K10M"},535	{183, "EM_AARCH64"},536	{185, "EM_AVR32"},537	{186, "EM_STM8"},538	{187, "EM_TILE64"},539	{188, "EM_TILEPRO"},540	{189, "EM_MICROBLAZE"},541	{190, "EM_CUDA"},542	{191, "EM_TILEGX"},543	{192, "EM_CLOUDSHIELD"},544	{193, "EM_COREA_1ST"},545	{194, "EM_COREA_2ND"},546	{195, "EM_ARC_COMPACT2"},547	{196, "EM_OPEN8"},548	{197, "EM_RL78"},549	{198, "EM_VIDEOCORE5"},550	{199, "EM_78KOR"},551	{200, "EM_56800EX"},552	{201, "EM_BA1"},553	{202, "EM_BA2"},554	{203, "EM_XCORE"},555	{204, "EM_MCHP_PIC"},556	{205, "EM_INTEL205"},557	{206, "EM_INTEL206"},558	{207, "EM_INTEL207"},559	{208, "EM_INTEL208"},560	{209, "EM_INTEL209"},561	{210, "EM_KM32"},562	{211, "EM_KMX32"},563	{212, "EM_KMX16"},564	{213, "EM_KMX8"},565	{214, "EM_KVARC"},566	{215, "EM_CDP"},567	{216, "EM_COGE"},568	{217, "EM_COOL"},569	{218, "EM_NORC"},570	{219, "EM_CSR_KALIMBA "},571	{220, "EM_Z80 "},572	{221, "EM_VISIUM "},573	{222, "EM_FT32 "},574	{223, "EM_MOXIE"},575	{224, "EM_AMDGPU"},576	{243, "EM_RISCV"},577	{244, "EM_LANAI"},578	{247, "EM_BPF"},579	{258, "EM_LOONGARCH"},580581	/* Non-standard or deprecated. */582	{6, "EM_486"},583	{10, "EM_MIPS_RS4_BE"},584	{41, "EM_ALPHA_STD"},585	{0x9026, "EM_ALPHA"},586}587588func (i Machine) String() string   { return stringName(uint32(i), machineStrings, false) }589func (i Machine) GoString() string { return stringName(uint32(i), machineStrings, true) }590591// Special section indices.592type SectionIndex int593594const (595	SHN_UNDEF     SectionIndex = 0      /* Undefined, missing, irrelevant. */596	SHN_LORESERVE SectionIndex = 0xff00 /* First of reserved range. */597	SHN_LOPROC    SectionIndex = 0xff00 /* First processor-specific. */598	SHN_HIPROC    SectionIndex = 0xff1f /* Last processor-specific. */599	SHN_LOOS      SectionIndex = 0xff20 /* First operating system-specific. */600	SHN_HIOS      SectionIndex = 0xff3f /* Last operating system-specific. */601	SHN_ABS       SectionIndex = 0xfff1 /* Absolute values. */602	SHN_COMMON    SectionIndex = 0xfff2 /* Common data. */603	SHN_XINDEX    SectionIndex = 0xffff /* Escape; index stored elsewhere. */604	SHN_HIRESERVE SectionIndex = 0xffff /* Last of reserved range. */605)606607var shnStrings = []intName{608	{0, "SHN_UNDEF"},609	{0xff00, "SHN_LOPROC"},610	{0xff20, "SHN_LOOS"},611	{0xfff1, "SHN_ABS"},612	{0xfff2, "SHN_COMMON"},613	{0xffff, "SHN_XINDEX"},614}615616func (i SectionIndex) String() string   { return stringName(uint32(i), shnStrings, false) }617func (i SectionIndex) GoString() string { return stringName(uint32(i), shnStrings, true) }618619// Section type.620type SectionType uint32621622const (623	SHT_NULL             SectionType = 0          /* inactive */624	SHT_PROGBITS         SectionType = 1          /* program defined information */625	SHT_SYMTAB           SectionType = 2          /* symbol table section */626	SHT_STRTAB           SectionType = 3          /* string table section */627	SHT_RELA             SectionType = 4          /* relocation section with addends */628	SHT_HASH             SectionType = 5          /* symbol hash table section */629	SHT_DYNAMIC          SectionType = 6          /* dynamic section */630	SHT_NOTE             SectionType = 7          /* note section */631	SHT_NOBITS           SectionType = 8          /* no space section */632	SHT_REL              SectionType = 9          /* relocation section - no addends */633	SHT_SHLIB            SectionType = 10         /* reserved - purpose unknown */634	SHT_DYNSYM           SectionType = 11         /* dynamic symbol table section */635	SHT_INIT_ARRAY       SectionType = 14         /* Initialization function pointers. */636	SHT_FINI_ARRAY       SectionType = 15         /* Termination function pointers. */637	SHT_PREINIT_ARRAY    SectionType = 16         /* Pre-initialization function ptrs. */638	SHT_GROUP            SectionType = 17         /* Section group. */639	SHT_SYMTAB_SHNDX     SectionType = 18         /* Section indexes (see SHN_XINDEX). */640	SHT_LOOS             SectionType = 0x60000000 /* First of OS specific semantics */641	SHT_GNU_ATTRIBUTES   SectionType = 0x6ffffff5 /* GNU object attributes */642	SHT_GNU_HASH         SectionType = 0x6ffffff6 /* GNU hash table */643	SHT_GNU_LIBLIST      SectionType = 0x6ffffff7 /* GNU prelink library list */644	SHT_GNU_VERDEF       SectionType = 0x6ffffffd /* GNU version definition section */645	SHT_GNU_VERNEED      SectionType = 0x6ffffffe /* GNU version needs section */646	SHT_GNU_VERSYM       SectionType = 0x6fffffff /* GNU version symbol table */647	SHT_HIOS             SectionType = 0x6fffffff /* Last of OS specific semantics */648	SHT_LOPROC           SectionType = 0x70000000 /* reserved range for processor */649	SHT_RISCV_ATTRIBUTES SectionType = 0x70000003 /* RISCV object attributes */650	SHT_MIPS_ABIFLAGS    SectionType = 0x7000002a /* .MIPS.abiflags */651	SHT_HIPROC           SectionType = 0x7fffffff /* specific section header types */652	SHT_LOUSER           SectionType = 0x80000000 /* reserved range for application */653	SHT_HIUSER           SectionType = 0xffffffff /* specific indexes */654)655656var shtStrings = []intName{657	{0, "SHT_NULL"},658	{1, "SHT_PROGBITS"},659	{2, "SHT_SYMTAB"},660	{3, "SHT_STRTAB"},661	{4, "SHT_RELA"},662	{5, "SHT_HASH"},663	{6, "SHT_DYNAMIC"},664	{7, "SHT_NOTE"},665	{8, "SHT_NOBITS"},666	{9, "SHT_REL"},667	{10, "SHT_SHLIB"},668	{11, "SHT_DYNSYM"},669	{14, "SHT_INIT_ARRAY"},670	{15, "SHT_FINI_ARRAY"},671	{16, "SHT_PREINIT_ARRAY"},672	{17, "SHT_GROUP"},673	{18, "SHT_SYMTAB_SHNDX"},674	{0x60000000, "SHT_LOOS"},675	{0x6ffffff5, "SHT_GNU_ATTRIBUTES"},676	{0x6ffffff6, "SHT_GNU_HASH"},677	{0x6ffffff7, "SHT_GNU_LIBLIST"},678	{0x6ffffffd, "SHT_GNU_VERDEF"},679	{0x6ffffffe, "SHT_GNU_VERNEED"},680	{0x6fffffff, "SHT_GNU_VERSYM"},681	{0x70000000, "SHT_LOPROC"},682	// We don't list the processor-dependent SectionType,683	// as the values overlap.684	{0x7000002a, "SHT_MIPS_ABIFLAGS"},685	{0x7fffffff, "SHT_HIPROC"},686	{0x80000000, "SHT_LOUSER"},687	{0xffffffff, "SHT_HIUSER"},688}689690func (i SectionType) String() string   { return stringName(uint32(i), shtStrings, false) }691func (i SectionType) GoString() string { return stringName(uint32(i), shtStrings, true) }692693// Section flags.694type SectionFlag uint32695696const (697	SHF_WRITE            SectionFlag = 0x1        /* Section contains writable data. */698	SHF_ALLOC            SectionFlag = 0x2        /* Section occupies memory. */699	SHF_EXECINSTR        SectionFlag = 0x4        /* Section contains instructions. */700	SHF_MERGE            SectionFlag = 0x10       /* Section may be merged. */701	SHF_STRINGS          SectionFlag = 0x20       /* Section contains strings. */702	SHF_INFO_LINK        SectionFlag = 0x40       /* sh_info holds section index. */703	SHF_LINK_ORDER       SectionFlag = 0x80       /* Special ordering requirements. */704	SHF_OS_NONCONFORMING SectionFlag = 0x100      /* OS-specific processing required. */705	SHF_GROUP            SectionFlag = 0x200      /* Member of section group. */706	SHF_TLS              SectionFlag = 0x400      /* Section contains TLS data. */707	SHF_COMPRESSED       SectionFlag = 0x800      /* Section is compressed. */708	SHF_MASKOS           SectionFlag = 0x0ff00000 /* OS-specific semantics. */709	SHF_MASKPROC         SectionFlag = 0xf0000000 /* Processor-specific semantics. */710)711712var shfStrings = []intName{713	{0x1, "SHF_WRITE"},714	{0x2, "SHF_ALLOC"},715	{0x4, "SHF_EXECINSTR"},716	{0x10, "SHF_MERGE"},717	{0x20, "SHF_STRINGS"},718	{0x40, "SHF_INFO_LINK"},719	{0x80, "SHF_LINK_ORDER"},720	{0x100, "SHF_OS_NONCONFORMING"},721	{0x200, "SHF_GROUP"},722	{0x400, "SHF_TLS"},723	{0x800, "SHF_COMPRESSED"},724}725726func (i SectionFlag) String() string   { return flagName(uint32(i), shfStrings, false) }727func (i SectionFlag) GoString() string { return flagName(uint32(i), shfStrings, true) }728729// Section compression type.730type CompressionType int731732const (733	COMPRESS_ZLIB   CompressionType = 1          /* ZLIB compression. */734	COMPRESS_ZSTD   CompressionType = 2          /* ZSTD compression. */735	COMPRESS_LOOS   CompressionType = 0x60000000 /* First OS-specific. */736	COMPRESS_HIOS   CompressionType = 0x6fffffff /* Last OS-specific. */737	COMPRESS_LOPROC CompressionType = 0x70000000 /* First processor-specific type. */738	COMPRESS_HIPROC CompressionType = 0x7fffffff /* Last processor-specific type. */739)740741var compressionStrings = []intName{742	{1, "COMPRESS_ZLIB"},743	{2, "COMPRESS_ZSTD"},744	{0x60000000, "COMPRESS_LOOS"},745	{0x6fffffff, "COMPRESS_HIOS"},746	{0x70000000, "COMPRESS_LOPROC"},747	{0x7fffffff, "COMPRESS_HIPROC"},748}749750func (i CompressionType) String() string   { return stringName(uint32(i), compressionStrings, false) }751func (i CompressionType) GoString() string { return stringName(uint32(i), compressionStrings, true) }752753// Prog.Type754type ProgType int755756const (757	PT_NULL    ProgType = 0 /* Unused entry. */758	PT_LOAD    ProgType = 1 /* Loadable segment. */759	PT_DYNAMIC ProgType = 2 /* Dynamic linking information segment. */760	PT_INTERP  ProgType = 3 /* Pathname of interpreter. */761	PT_NOTE    ProgType = 4 /* Auxiliary information. */762	PT_SHLIB   ProgType = 5 /* Reserved (not used). */763	PT_PHDR    ProgType = 6 /* Location of program header itself. */764	PT_TLS     ProgType = 7 /* Thread local storage segment */765766	PT_LOOS ProgType = 0x60000000 /* First OS-specific. */767768	PT_GNU_EH_FRAME ProgType = 0x6474e550 /* Frame unwind information */769	PT_GNU_STACK    ProgType = 0x6474e551 /* Stack flags */770	PT_GNU_RELRO    ProgType = 0x6474e552 /* Read only after relocs */771	PT_GNU_PROPERTY ProgType = 0x6474e553 /* GNU property */772	PT_GNU_MBIND_LO ProgType = 0x6474e555 /* Mbind segments start */773	PT_GNU_MBIND_HI ProgType = 0x6474f554 /* Mbind segments finish */774775	PT_PAX_FLAGS ProgType = 0x65041580 /* PAX flags */776777	PT_OPENBSD_RANDOMIZE ProgType = 0x65a3dbe6 /* Random data */778	PT_OPENBSD_WXNEEDED  ProgType = 0x65a3dbe7 /* W^X violations */779	PT_OPENBSD_NOBTCFI   ProgType = 0x65a3dbe8 /* No branch target CFI */780	PT_OPENBSD_BOOTDATA  ProgType = 0x65a41be6 /* Boot arguments */781782	PT_SUNW_EH_FRAME ProgType = 0x6474e550 /* Frame unwind information */783	PT_SUNWSTACK     ProgType = 0x6ffffffb /* Stack segment */784785	PT_HIOS ProgType = 0x6fffffff /* Last OS-specific. */786787	PT_LOPROC ProgType = 0x70000000 /* First processor-specific type. */788789	PT_ARM_ARCHEXT ProgType = 0x70000000 /* Architecture compatibility */790	PT_ARM_EXIDX   ProgType = 0x70000001 /* Exception unwind tables */791792	PT_AARCH64_ARCHEXT ProgType = 0x70000000 /* Architecture compatibility */793	PT_AARCH64_UNWIND  ProgType = 0x70000001 /* Exception unwind tables */794795	PT_MIPS_REGINFO  ProgType = 0x70000000 /* Register usage */796	PT_MIPS_RTPROC   ProgType = 0x70000001 /* Runtime procedures */797	PT_MIPS_OPTIONS  ProgType = 0x70000002 /* Options */798	PT_MIPS_ABIFLAGS ProgType = 0x70000003 /* ABI flags */799800	PT_RISCV_ATTRIBUTES ProgType = 0x70000003 /* RISC-V ELF attribute section. */801802	PT_S390_PGSTE ProgType = 0x70000000 /* 4k page table size */803804	PT_HIPROC ProgType = 0x7fffffff /* Last processor-specific type. */805)806807var ptStrings = []intName{808	{0, "PT_NULL"},809	{1, "PT_LOAD"},810	{2, "PT_DYNAMIC"},811	{3, "PT_INTERP"},812	{4, "PT_NOTE"},813	{5, "PT_SHLIB"},814	{6, "PT_PHDR"},815	{7, "PT_TLS"},816	{0x60000000, "PT_LOOS"},817	{0x6474e550, "PT_GNU_EH_FRAME"},818	{0x6474e551, "PT_GNU_STACK"},819	{0x6474e552, "PT_GNU_RELRO"},820	{0x6474e553, "PT_GNU_PROPERTY"},821	{0x65041580, "PT_PAX_FLAGS"},822	{0x65a3dbe6, "PT_OPENBSD_RANDOMIZE"},823	{0x65a3dbe7, "PT_OPENBSD_WXNEEDED"},824	{0x65a41be6, "PT_OPENBSD_BOOTDATA"},825	{0x6ffffffb, "PT_SUNWSTACK"},826	{0x6fffffff, "PT_HIOS"},827	{0x70000000, "PT_LOPROC"},828	// We don't list the processor-dependent ProgTypes,829	// as the values overlap.830	{0x7fffffff, "PT_HIPROC"},831}832833func (i ProgType) String() string   { return stringName(uint32(i), ptStrings, false) }834func (i ProgType) GoString() string { return stringName(uint32(i), ptStrings, true) }835836// Prog.Flag837type ProgFlag uint32838839const (840	PF_X        ProgFlag = 0x1        /* Executable. */841	PF_W        ProgFlag = 0x2        /* Writable. */842	PF_R        ProgFlag = 0x4        /* Readable. */843	PF_MASKOS   ProgFlag = 0x0ff00000 /* Operating system-specific. */844	PF_MASKPROC ProgFlag = 0xf0000000 /* Processor-specific. */845)846847var pfStrings = []intName{848	{0x1, "PF_X"},849	{0x2, "PF_W"},850	{0x4, "PF_R"},851}852853func (i ProgFlag) String() string   { return flagName(uint32(i), pfStrings, false) }854func (i ProgFlag) GoString() string { return flagName(uint32(i), pfStrings, true) }855856// Dyn.Tag857type DynTag int858859const (860	DT_NULL         DynTag = 0  /* Terminating entry. */861	DT_NEEDED       DynTag = 1  /* String table offset of a needed shared library. */862	DT_PLTRELSZ     DynTag = 2  /* Total size in bytes of PLT relocations. */863	DT_PLTGOT       DynTag = 3  /* Processor-dependent address. */864	DT_HASH         DynTag = 4  /* Address of symbol hash table. */865	DT_STRTAB       DynTag = 5  /* Address of string table. */866	DT_SYMTAB       DynTag = 6  /* Address of symbol table. */867	DT_RELA         DynTag = 7  /* Address of ElfNN_Rela relocations. */868	DT_RELASZ       DynTag = 8  /* Total size of ElfNN_Rela relocations. */869	DT_RELAENT      DynTag = 9  /* Size of each ElfNN_Rela relocation entry. */870	DT_STRSZ        DynTag = 10 /* Size of string table. */871	DT_SYMENT       DynTag = 11 /* Size of each symbol table entry. */872	DT_INIT         DynTag = 12 /* Address of initialization function. */873	DT_FINI         DynTag = 13 /* Address of finalization function. */874	DT_SONAME       DynTag = 14 /* String table offset of shared object name. */875	DT_RPATH        DynTag = 15 /* String table offset of library path. [sup] */876	DT_SYMBOLIC     DynTag = 16 /* Indicates "symbolic" linking. [sup] */877	DT_REL          DynTag = 17 /* Address of ElfNN_Rel relocations. */878	DT_RELSZ        DynTag = 18 /* Total size of ElfNN_Rel relocations. */879	DT_RELENT       DynTag = 19 /* Size of each ElfNN_Rel relocation. */880	DT_PLTREL       DynTag = 20 /* Type of relocation used for PLT. */881	DT_DEBUG        DynTag = 21 /* Reserved (not used). */882	DT_TEXTREL      DynTag = 22 /* Indicates there may be relocations in non-writable segments. [sup] */883	DT_JMPREL       DynTag = 23 /* Address of PLT relocations. */884	DT_BIND_NOW     DynTag = 24 /* [sup] */885	DT_INIT_ARRAY   DynTag = 25 /* Address of the array of pointers to initialization functions */886	DT_FINI_ARRAY   DynTag = 26 /* Address of the array of pointers to termination functions */887	DT_INIT_ARRAYSZ DynTag = 27 /* Size in bytes of the array of initialization functions. */888	DT_FINI_ARRAYSZ DynTag = 28 /* Size in bytes of the array of termination functions. */889	DT_RUNPATH      DynTag = 29 /* String table offset of a null-terminated library search path string. */890	DT_FLAGS        DynTag = 30 /* Object specific flag values. */891	DT_ENCODING     DynTag = 32 /* Values greater than or equal to DT_ENCODING892	   and less than DT_LOOS follow the rules for893	   the interpretation of the d_un union894	   as follows: even == 'd_ptr', even == 'd_val'895	   or none */896	DT_PREINIT_ARRAY   DynTag = 32 /* Address of the array of pointers to pre-initialization functions. */897	DT_PREINIT_ARRAYSZ DynTag = 33 /* Size in bytes of the array of pre-initialization functions. */898	DT_SYMTAB_SHNDX    DynTag = 34 /* Address of SHT_SYMTAB_SHNDX section. */899900	DT_LOOS DynTag = 0x6000000d /* First OS-specific */901	DT_HIOS DynTag = 0x6ffff000 /* Last OS-specific */902903	DT_VALRNGLO       DynTag = 0x6ffffd00904	DT_GNU_PRELINKED  DynTag = 0x6ffffdf5905	DT_GNU_CONFLICTSZ DynTag = 0x6ffffdf6906	DT_GNU_LIBLISTSZ  DynTag = 0x6ffffdf7907	DT_CHECKSUM       DynTag = 0x6ffffdf8908	DT_PLTPADSZ       DynTag = 0x6ffffdf9909	DT_MOVEENT        DynTag = 0x6ffffdfa910	DT_MOVESZ         DynTag = 0x6ffffdfb911	DT_FEATURE        DynTag = 0x6ffffdfc912	DT_POSFLAG_1      DynTag = 0x6ffffdfd913	DT_SYMINSZ        DynTag = 0x6ffffdfe914	DT_SYMINENT       DynTag = 0x6ffffdff915	DT_VALRNGHI       DynTag = 0x6ffffdff916917	DT_ADDRRNGLO    DynTag = 0x6ffffe00918	DT_GNU_HASH     DynTag = 0x6ffffef5919	DT_TLSDESC_PLT  DynTag = 0x6ffffef6920	DT_TLSDESC_GOT  DynTag = 0x6ffffef7921	DT_GNU_CONFLICT DynTag = 0x6ffffef8922	DT_GNU_LIBLIST  DynTag = 0x6ffffef9923	DT_CONFIG       DynTag = 0x6ffffefa924	DT_DEPAUDIT     DynTag = 0x6ffffefb925	DT_AUDIT        DynTag = 0x6ffffefc926	DT_PLTPAD       DynTag = 0x6ffffefd927	DT_MOVETAB      DynTag = 0x6ffffefe928	DT_SYMINFO      DynTag = 0x6ffffeff929	DT_ADDRRNGHI    DynTag = 0x6ffffeff930931	DT_VERSYM     DynTag = 0x6ffffff0932	DT_RELACOUNT  DynTag = 0x6ffffff9933	DT_RELCOUNT   DynTag = 0x6ffffffa934	DT_FLAGS_1    DynTag = 0x6ffffffb935	DT_VERDEF     DynTag = 0x6ffffffc936	DT_VERDEFNUM  DynTag = 0x6ffffffd937	DT_VERNEED    DynTag = 0x6ffffffe938	DT_VERNEEDNUM DynTag = 0x6fffffff939940	DT_LOPROC DynTag = 0x70000000 /* First processor-specific type. */941942	DT_MIPS_RLD_VERSION           DynTag = 0x70000001943	DT_MIPS_TIME_STAMP            DynTag = 0x70000002944	DT_MIPS_ICHECKSUM             DynTag = 0x70000003945	DT_MIPS_IVERSION              DynTag = 0x70000004946	DT_MIPS_FLAGS                 DynTag = 0x70000005947	DT_MIPS_BASE_ADDRESS          DynTag = 0x70000006948	DT_MIPS_MSYM                  DynTag = 0x70000007949	DT_MIPS_CONFLICT              DynTag = 0x70000008950	DT_MIPS_LIBLIST               DynTag = 0x70000009951	DT_MIPS_LOCAL_GOTNO           DynTag = 0x7000000a952	DT_MIPS_CONFLICTNO            DynTag = 0x7000000b953	DT_MIPS_LIBLISTNO             DynTag = 0x70000010954	DT_MIPS_SYMTABNO              DynTag = 0x70000011955	DT_MIPS_UNREFEXTNO            DynTag = 0x70000012956	DT_MIPS_GOTSYM                DynTag = 0x70000013957	DT_MIPS_HIPAGENO              DynTag = 0x70000014958	DT_MIPS_RLD_MAP               DynTag = 0x70000016959	DT_MIPS_DELTA_CLASS           DynTag = 0x70000017960	DT_MIPS_DELTA_CLASS_NO        DynTag = 0x70000018961	DT_MIPS_DELTA_INSTANCE        DynTag = 0x70000019962	DT_MIPS_DELTA_INSTANCE_NO     DynTag = 0x7000001a963	DT_MIPS_DELTA_RELOC           DynTag = 0x7000001b964	DT_MIPS_DELTA_RELOC_NO        DynTag = 0x7000001c965	DT_MIPS_DELTA_SYM             DynTag = 0x7000001d966	DT_MIPS_DELTA_SYM_NO          DynTag = 0x7000001e967	DT_MIPS_DELTA_CLASSSYM        DynTag = 0x70000020968	DT_MIPS_DELTA_CLASSSYM_NO     DynTag = 0x70000021969	DT_MIPS_CXX_FLAGS             DynTag = 0x70000022970	DT_MIPS_PIXIE_INIT            DynTag = 0x70000023971	DT_MIPS_SYMBOL_LIB            DynTag = 0x70000024972	DT_MIPS_LOCALPAGE_GOTIDX      DynTag = 0x70000025973	DT_MIPS_LOCAL_GOTIDX          DynTag = 0x70000026974	DT_MIPS_HIDDEN_GOTIDX         DynTag = 0x70000027975	DT_MIPS_PROTECTED_GOTIDX      DynTag = 0x70000028976	DT_MIPS_OPTIONS               DynTag = 0x70000029977	DT_MIPS_INTERFACE             DynTag = 0x7000002a978	DT_MIPS_DYNSTR_ALIGN          DynTag = 0x7000002b979	DT_MIPS_INTERFACE_SIZE        DynTag = 0x7000002c980	DT_MIPS_RLD_TEXT_RESOLVE_ADDR DynTag = 0x7000002d981	DT_MIPS_PERF_SUFFIX           DynTag = 0x7000002e982	DT_MIPS_COMPACT_SIZE          DynTag = 0x7000002f983	DT_MIPS_GP_VALUE              DynTag = 0x70000030984	DT_MIPS_AUX_DYNAMIC           DynTag = 0x70000031985	DT_MIPS_PLTGOT                DynTag = 0x70000032986	DT_MIPS_RWPLT                 DynTag = 0x70000034987	DT_MIPS_RLD_MAP_REL           DynTag = 0x70000035988989	DT_PPC_GOT DynTag = 0x70000000990	DT_PPC_OPT DynTag = 0x70000001991992	DT_PPC64_GLINK DynTag = 0x70000000993	DT_PPC64_OPD   DynTag = 0x70000001994	DT_PPC64_OPDSZ DynTag = 0x70000002995	DT_PPC64_OPT   DynTag = 0x70000003996997	DT_SPARC_REGISTER DynTag = 0x70000001998999	DT_AUXILIARY DynTag = 0x7ffffffd1000	DT_USED      DynTag = 0x7ffffffe1001	DT_FILTER    DynTag = 0x7fffffff10021003	DT_HIPROC DynTag = 0x7fffffff /* Last processor-specific type. */1004)10051006var dtStrings = []intName{1007	{0, "DT_NULL"},1008	{1, "DT_NEEDED"},1009	{2, "DT_PLTRELSZ"},1010	{3, "DT_PLTGOT"},1011	{4, "DT_HASH"},1012	{5, "DT_STRTAB"},1013	{6, "DT_SYMTAB"},1014	{7, "DT_RELA"},1015	{8, "DT_RELASZ"},1016	{9, "DT_RELAENT"},1017	{10, "DT_STRSZ"},1018	{11, "DT_SYMENT"},1019	{12, "DT_INIT"},1020	{13, "DT_FINI"},1021	{14, "DT_SONAME"},1022	{15, "DT_RPATH"},1023	{16, "DT_SYMBOLIC"},1024	{17, "DT_REL"},1025	{18, "DT_RELSZ"},1026	{19, "DT_RELENT"},1027	{20, "DT_PLTREL"},1028	{21, "DT_DEBUG"},1029	{22, "DT_TEXTREL"},1030	{23, "DT_JMPREL"},1031	{24, "DT_BIND_NOW"},1032	{25, "DT_INIT_ARRAY"},1033	{26, "DT_FINI_ARRAY"},1034	{27, "DT_INIT_ARRAYSZ"},1035	{28, "DT_FINI_ARRAYSZ"},1036	{29, "DT_RUNPATH"},1037	{30, "DT_FLAGS"},1038	{32, "DT_ENCODING"},1039	{32, "DT_PREINIT_ARRAY"},1040	{33, "DT_PREINIT_ARRAYSZ"},1041	{34, "DT_SYMTAB_SHNDX"},1042	{0x6000000d, "DT_LOOS"},1043	{0x6ffff000, "DT_HIOS"},1044	{0x6ffffd00, "DT_VALRNGLO"},1045	{0x6ffffdf5, "DT_GNU_PRELINKED"},1046	{0x6ffffdf6, "DT_GNU_CONFLICTSZ"},1047	{0x6ffffdf7, "DT_GNU_LIBLISTSZ"},1048	{0x6ffffdf8, "DT_CHECKSUM"},1049	{0x6ffffdf9, "DT_PLTPADSZ"},1050	{0x6ffffdfa, "DT_MOVEENT"},1051	{0x6ffffdfb, "DT_MOVESZ"},1052	{0x6ffffdfc, "DT_FEATURE"},1053	{0x6ffffdfd, "DT_POSFLAG_1"},1054	{0x6ffffdfe, "DT_SYMINSZ"},1055	{0x6ffffdff, "DT_SYMINENT"},1056	{0x6ffffdff, "DT_VALRNGHI"},1057	{0x6ffffe00, "DT_ADDRRNGLO"},1058	{0x6ffffef5, "DT_GNU_HASH"},1059	{0x6ffffef6, "DT_TLSDESC_PLT"},1060	{0x6ffffef7, "DT_TLSDESC_GOT"},1061	{0x6ffffef8, "DT_GNU_CONFLICT"},1062	{0x6ffffef9, "DT_GNU_LIBLIST"},1063	{0x6ffffefa, "DT_CONFIG"},1064	{0x6ffffefb, "DT_DEPAUDIT"},1065	{0x6ffffefc, "DT_AUDIT"},1066	{0x6ffffefd, "DT_PLTPAD"},1067	{0x6ffffefe, "DT_MOVETAB"},1068	{0x6ffffeff, "DT_SYMINFO"},1069	{0x6ffffeff, "DT_ADDRRNGHI"},1070	{0x6ffffff0, "DT_VERSYM"},1071	{0x6ffffff9, "DT_RELACOUNT"},1072	{0x6ffffffa, "DT_RELCOUNT"},1073	{0x6ffffffb, "DT_FLAGS_1"},1074	{0x6ffffffc, "DT_VERDEF"},1075	{0x6ffffffd, "DT_VERDEFNUM"},1076	{0x6ffffffe, "DT_VERNEED"},1077	{0x6fffffff, "DT_VERNEEDNUM"},1078	{0x70000000, "DT_LOPROC"},1079	// We don't list the processor-dependent DynTags,1080	// as the values overlap.1081	{0x7ffffffd, "DT_AUXILIARY"},1082	{0x7ffffffe, "DT_USED"},1083	{0x7fffffff, "DT_FILTER"},1084}10851086func (i DynTag) String() string   { return stringName(uint32(i), dtStrings, false) }1087func (i DynTag) GoString() string { return stringName(uint32(i), dtStrings, true) }10881089// DT_FLAGS values.1090type DynFlag int10911092const (1093	DF_ORIGIN DynFlag = 0x0001 /* Indicates that the object being loaded may1094	   make reference to the1095	   $ORIGIN substitution string */1096	DF_SYMBOLIC DynFlag = 0x0002 /* Indicates "symbolic" linking. */1097	DF_TEXTREL  DynFlag = 0x0004 /* Indicates there may be relocations in non-writable segments. */1098	DF_BIND_NOW DynFlag = 0x0008 /* Indicates that the dynamic linker should1099	   process all relocations for the object1100	   containing this entry before transferring1101	   control to the program. */1102	DF_STATIC_TLS DynFlag = 0x0010 /* Indicates that the shared object or1103	   executable contains code using a static1104	   thread-local storage scheme. */1105)11061107var dflagStrings = []intName{1108	{0x0001, "DF_ORIGIN"},1109	{0x0002, "DF_SYMBOLIC"},1110	{0x0004, "DF_TEXTREL"},1111	{0x0008, "DF_BIND_NOW"},1112	{0x0010, "DF_STATIC_TLS"},1113}11141115func (i DynFlag) String() string   { return flagName(uint32(i), dflagStrings, false) }1116func (i DynFlag) GoString() string { return flagName(uint32(i), dflagStrings, true) }11171118// DT_FLAGS_1 values.1119type DynFlag1 uint3211201121const (1122	// Indicates that all relocations for this object must be processed before1123	// returning control to the program.1124	DF_1_NOW DynFlag1 = 0x000000011125	// Unused.1126	DF_1_GLOBAL DynFlag1 = 0x000000021127	// Indicates that the object is a member of a group.1128	DF_1_GROUP DynFlag1 = 0x000000041129	// Indicates that the object cannot be deleted from a process.1130	DF_1_NODELETE DynFlag1 = 0x000000081131	// Meaningful only for filters. Indicates that all associated filtees be1132	// processed immediately.1133	DF_1_LOADFLTR DynFlag1 = 0x000000101134	// Indicates that this object's initialization section be run before any other1135	// objects loaded.1136	DF_1_INITFIRST DynFlag1 = 0x000000201137	// Indicates that the object cannot be added to a running process with dlopen.1138	DF_1_NOOPEN DynFlag1 = 0x000000401139	// Indicates the object requires $ORIGIN processing.1140	DF_1_ORIGIN DynFlag1 = 0x000000801141	// Indicates that the object should use direct binding information.1142	DF_1_DIRECT DynFlag1 = 0x000001001143	// Unused.1144	DF_1_TRANS DynFlag1 = 0x000002001145	// Indicates that the objects symbol table is to interpose before all symbols1146	// except the primary load object, which is typically the executable.1147	DF_1_INTERPOSE DynFlag1 = 0x000004001148	// Indicates that the search for dependencies of this object ignores any1149	// default library search paths.1150	DF_1_NODEFLIB DynFlag1 = 0x000008001151	// Indicates that this object is not dumped by dldump. Candidates are objects1152	// with no relocations that might get included when generating alternative1153	// objects using.1154	DF_1_NODUMP DynFlag1 = 0x000010001155	// Identifies this object as a configuration alternative object generated by1156	// crle. Triggers the runtime linker to search for a configuration file $ORIGIN/ld.config.app-name.1157	DF_1_CONFALT DynFlag1 = 0x000020001158	// Meaningful only for filtees. Terminates a filters search for any1159	// further filtees.1160	DF_1_ENDFILTEE DynFlag1 = 0x000040001161	// Indicates that this object has displacement relocations applied.1162	DF_1_DISPRELDNE DynFlag1 = 0x000080001163	// Indicates that this object has displacement relocations pending.1164	DF_1_DISPRELPND DynFlag1 = 0x000100001165	// Indicates that this object contains symbols that cannot be directly1166	// bound to.1167	DF_1_NODIRECT DynFlag1 = 0x000200001168	// Reserved for internal use by the kernel runtime-linker.1169	DF_1_IGNMULDEF DynFlag1 = 0x000400001170	// Reserved for internal use by the kernel runtime-linker.1171	DF_1_NOKSYMS DynFlag1 = 0x000800001172	// Reserved for internal use by the kernel runtime-linker.1173	DF_1_NOHDR DynFlag1 = 0x001000001174	// Indicates that this object has been edited or has been modified since the1175	// objects original construction by the link-editor.1176	DF_1_EDITED DynFlag1 = 0x002000001177	// Reserved for internal use by the kernel runtime-linker.1178	DF_1_NORELOC DynFlag1 = 0x004000001179	// Indicates that the object contains individual symbols that should interpose1180	// before all symbols except the primary load object, which is typically the1181	// executable.1182	DF_1_SYMINTPOSE DynFlag1 = 0x008000001183	// Indicates that the executable requires global auditing.1184	DF_1_GLOBAUDIT DynFlag1 = 0x010000001185	// Indicates that the object defines, or makes reference to singleton symbols.1186	DF_1_SINGLETON DynFlag1 = 0x020000001187	// Indicates that the object is a stub.1188	DF_1_STUB DynFlag1 = 0x040000001189	// Indicates that the object is a position-independent executable.1190	DF_1_PIE DynFlag1 = 0x080000001191	// Indicates that the object is a kernel module.1192	DF_1_KMOD DynFlag1 = 0x100000001193	// Indicates that the object is a weak standard filter.1194	DF_1_WEAKFILTER DynFlag1 = 0x200000001195	// Unused.1196	DF_1_NOCOMMON DynFlag1 = 0x400000001197)11981199var dflag1Strings = []intName{1200	{0x00000001, "DF_1_NOW"},1201	{0x00000002, "DF_1_GLOBAL"},1202	{0x00000004, "DF_1_GROUP"},1203	{0x00000008, "DF_1_NODELETE"},1204	{0x00000010, "DF_1_LOADFLTR"},1205	{0x00000020, "DF_1_INITFIRST"},1206	{0x00000040, "DF_1_NOOPEN"},1207	{0x00000080, "DF_1_ORIGIN"},1208	{0x00000100, "DF_1_DIRECT"},1209	{0x00000200, "DF_1_TRANS"},1210	{0x00000400, "DF_1_INTERPOSE"},1211	{0x00000800, "DF_1_NODEFLIB"},1212	{0x00001000, "DF_1_NODUMP"},1213	{0x00002000, "DF_1_CONFALT"},1214	{0x00004000, "DF_1_ENDFILTEE"},1215	{0x00008000, "DF_1_DISPRELDNE"},1216	{0x00010000, "DF_1_DISPRELPND"},1217	{0x00020000, "DF_1_NODIRECT"},1218	{0x00040000, "DF_1_IGNMULDEF"},1219	{0x00080000, "DF_1_NOKSYMS"},1220	{0x00100000, "DF_1_NOHDR"},1221	{0x00200000, "DF_1_EDITED"},1222	{0x00400000, "DF_1_NORELOC"},1223	{0x00800000, "DF_1_SYMINTPOSE"},1224	{0x01000000, "DF_1_GLOBAUDIT"},1225	{0x02000000, "DF_1_SINGLETON"},1226	{0x04000000, "DF_1_STUB"},1227	{0x08000000, "DF_1_PIE"},1228	{0x10000000, "DF_1_KMOD"},1229	{0x20000000, "DF_1_WEAKFILTER"},1230	{0x40000000, "DF_1_NOCOMMON"},1231}12321233func (i DynFlag1) String() string   { return flagName(uint32(i), dflag1Strings, false) }1234func (i DynFlag1) GoString() string { return flagName(uint32(i), dflag1Strings, true) }12351236// NType values; used in core files.1237type NType int12381239const (1240	NT_PRSTATUS NType = 1 /* Process status. */1241	NT_FPREGSET NType = 2 /* Floating point registers. */1242	NT_PRPSINFO NType = 3 /* Process state info. */1243)12441245var ntypeStrings = []intName{1246	{1, "NT_PRSTATUS"},1247	{2, "NT_FPREGSET"},1248	{3, "NT_PRPSINFO"},1249}12501251func (i NType) String() string   { return stringName(uint32(i), ntypeStrings, false) }1252func (i NType) GoString() string { return stringName(uint32(i), ntypeStrings, true) }12531254/* Symbol Binding - ELFNN_ST_BIND - st_info */1255type SymBind int12561257const (1258	STB_LOCAL  SymBind = 0  /* Local symbol */1259	STB_GLOBAL SymBind = 1  /* Global symbol */1260	STB_WEAK   SymBind = 2  /* like global - lower precedence */1261	STB_LOOS   SymBind = 10 /* Reserved range for operating system */1262	STB_HIOS   SymBind = 12 /*   specific semantics. */1263	STB_LOPROC SymBind = 13 /* reserved range for processor */1264	STB_HIPROC SymBind = 15 /*   specific semantics. */1265)12661267var stbStrings = []intName{1268	{0, "STB_LOCAL"},1269	{1, "STB_GLOBAL"},1270	{2, "STB_WEAK"},1271	{10, "STB_LOOS"},1272	{12, "STB_HIOS"},1273	{13, "STB_LOPROC"},1274	{15, "STB_HIPROC"},1275}12761277func (i SymBind) String() string   { return stringName(uint32(i), stbStrings, false) }1278func (i SymBind) GoString() string { return stringName(uint32(i), stbStrings, true) }12791280/* Symbol type - ELFNN_ST_TYPE - st_info */1281type SymType int12821283const (1284	STT_NOTYPE  SymType = 0  /* Unspecified type. */1285	STT_OBJECT  SymType = 1  /* Data object. */1286	STT_FUNC    SymType = 2  /* Function. */1287	STT_SECTION SymType = 3  /* Section. */1288	STT_FILE    SymType = 4  /* Source file. */1289	STT_COMMON  SymType = 5  /* Uninitialized common block. */1290	STT_TLS     SymType = 6  /* TLS object. */1291	STT_LOOS    SymType = 10 /* Reserved range for operating system */1292	STT_HIOS    SymType = 12 /*   specific semantics. */1293	STT_LOPROC  SymType = 13 /* reserved range for processor */1294	STT_HIPROC  SymType = 15 /*   specific semantics. */12951296	/* Non-standard symbol types. */1297	STT_RELC      SymType = 8  /* Complex relocation expression. */1298	STT_SRELC     SymType = 9  /* Signed complex relocation expression. */1299	STT_GNU_IFUNC SymType = 10 /* Indirect code object. */1300)13011302var sttStrings = []intName{1303	{0, "STT_NOTYPE"},1304	{1, "STT_OBJECT"},1305	{2, "STT_FUNC"},1306	{3, "STT_SECTION"},1307	{4, "STT_FILE"},1308	{5, "STT_COMMON"},1309	{6, "STT_TLS"},1310	{8, "STT_RELC"},1311	{9, "STT_SRELC"},1312	{10, "STT_LOOS"},1313	{12, "STT_HIOS"},1314	{13, "STT_LOPROC"},1315	{15, "STT_HIPROC"},1316}13171318func (i SymType) String() string   { return stringName(uint32(i), sttStrings, false) }1319func (i SymType) GoString() string { return stringName(uint32(i), sttStrings, true) }13201321/* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */1322type SymVis int13231324const (1325	STV_DEFAULT   SymVis = 0x0 /* Default visibility (see binding). */1326	STV_INTERNAL  SymVis = 0x1 /* Special meaning in relocatable objects. */1327	STV_HIDDEN    SymVis = 0x2 /* Not visible. */1328	STV_PROTECTED SymVis = 0x3 /* Visible but not preemptible. */1329)13301331var stvStrings = []intName{1332	{0x0, "STV_DEFAULT"},1333	{0x1, "STV_INTERNAL"},1334	{0x2, "STV_HIDDEN"},1335	{0x3, "STV_PROTECTED"},1336}13371338func (i SymVis) String() string   { return stringName(uint32(i), stvStrings, false) }1339func (i SymVis) GoString() string { return stringName(uint32(i), stvStrings, true) }13401341/*1342 * Relocation types.1343 */13441345// Relocation types for x86-64.1346type R_X86_64 int13471348const (1349	R_X86_64_NONE            R_X86_64 = 0  /* No relocation. */1350	R_X86_64_64              R_X86_64 = 1  /* Add 64 bit symbol value. */1351	R_X86_64_PC32            R_X86_64 = 2  /* PC-relative 32 bit signed sym value. */1352	R_X86_64_GOT32           R_X86_64 = 3  /* PC-relative 32 bit GOT offset. */1353	R_X86_64_PLT32           R_X86_64 = 4  /* PC-relative 32 bit PLT offset. */1354	R_X86_64_COPY            R_X86_64 = 5  /* Copy data from shared object. */1355	R_X86_64_GLOB_DAT        R_X86_64 = 6  /* Set GOT entry to data address. */1356	R_X86_64_JMP_SLOT        R_X86_64 = 7  /* Set GOT entry to code address. */1357	R_X86_64_RELATIVE        R_X86_64 = 8  /* Add load address of shared object. */1358	R_X86_64_GOTPCREL        R_X86_64 = 9  /* Add 32 bit signed pcrel offset to GOT. */1359	R_X86_64_32              R_X86_64 = 10 /* Add 32 bit zero extended symbol value */1360	R_X86_64_32S             R_X86_64 = 11 /* Add 32 bit sign extended symbol value */1361	R_X86_64_16              R_X86_64 = 12 /* Add 16 bit zero extended symbol value */1362	R_X86_64_PC16            R_X86_64 = 13 /* Add 16 bit signed extended pc relative symbol value */1363	R_X86_64_8               R_X86_64 = 14 /* Add 8 bit zero extended symbol value */1364	R_X86_64_PC8             R_X86_64 = 15 /* Add 8 bit signed extended pc relative symbol value */1365	R_X86_64_DTPMOD64        R_X86_64 = 16 /* ID of module containing symbol */1366	R_X86_64_DTPOFF64        R_X86_64 = 17 /* Offset in TLS block */1367	R_X86_64_TPOFF64         R_X86_64 = 18 /* Offset in static TLS block */1368	R_X86_64_TLSGD           R_X86_64 = 19 /* PC relative offset to GD GOT entry */1369	R_X86_64_TLSLD           R_X86_64 = 20 /* PC relative offset to LD GOT entry */1370	R_X86_64_DTPOFF32        R_X86_64 = 21 /* Offset in TLS block */1371	R_X86_64_GOTTPOFF        R_X86_64 = 22 /* PC relative offset to IE GOT entry */1372	R_X86_64_TPOFF32         R_X86_64 = 23 /* Offset in static TLS block */1373	R_X86_64_PC64            R_X86_64 = 24 /* PC relative 64-bit sign extended symbol value. */1374	R_X86_64_GOTOFF64        R_X86_64 = 251375	R_X86_64_GOTPC32         R_X86_64 = 261376	R_X86_64_GOT64           R_X86_64 = 271377	R_X86_64_GOTPCREL64      R_X86_64 = 281378	R_X86_64_GOTPC64         R_X86_64 = 291379	R_X86_64_GOTPLT64        R_X86_64 = 301380	R_X86_64_PLTOFF64        R_X86_64 = 311381	R_X86_64_SIZE32          R_X86_64 = 321382	R_X86_64_SIZE64          R_X86_64 = 331383	R_X86_64_GOTPC32_TLSDESC R_X86_64 = 341384	R_X86_64_TLSDESC_CALL    R_X86_64 = 351385	R_X86_64_TLSDESC         R_X86_64 = 361386	R_X86_64_IRELATIVE       R_X86_64 = 371387	R_X86_64_RELATIVE64      R_X86_64 = 381388	R_X86_64_PC32_BND        R_X86_64 = 391389	R_X86_64_PLT32_BND       R_X86_64 = 401390	R_X86_64_GOTPCRELX       R_X86_64 = 411391	R_X86_64_REX_GOTPCRELX   R_X86_64 = 421392)13931394var rx86_64Strings = []intName{1395	{0, "R_X86_64_NONE"},1396	{1, "R_X86_64_64"},1397	{2, "R_X86_64_PC32"},1398	{3, "R_X86_64_GOT32"},1399	{4, "R_X86_64_PLT32"},1400	{5, "R_X86_64_COPY"},1401	{6, "R_X86_64_GLOB_DAT"},1402	{7, "R_X86_64_JMP_SLOT"},1403	{8, "R_X86_64_RELATIVE"},1404	{9, "R_X86_64_GOTPCREL"},1405	{10, "R_X86_64_32"},1406	{11, "R_X86_64_32S"},1407	{12, "R_X86_64_16"},1408	{13, "R_X86_64_PC16"},1409	{14, "R_X86_64_8"},1410	{15, "R_X86_64_PC8"},1411	{16, "R_X86_64_DTPMOD64"},1412	{17, "R_X86_64_DTPOFF64"},1413	{18, "R_X86_64_TPOFF64"},1414	{19, "R_X86_64_TLSGD"},1415	{20, "R_X86_64_TLSLD"},1416	{21, "R_X86_64_DTPOFF32"},1417	{22, "R_X86_64_GOTTPOFF"},1418	{23, "R_X86_64_TPOFF32"},1419	{24, "R_X86_64_PC64"},1420	{25, "R_X86_64_GOTOFF64"},1421	{26, "R_X86_64_GOTPC32"},1422	{27, "R_X86_64_GOT64"},1423	{28, "R_X86_64_GOTPCREL64"},1424	{29, "R_X86_64_GOTPC64"},1425	{30, "R_X86_64_GOTPLT64"},1426	{31, "R_X86_64_PLTOFF64"},1427	{32, "R_X86_64_SIZE32"},1428	{33, "R_X86_64_SIZE64"},1429	{34, "R_X86_64_GOTPC32_TLSDESC"},1430	{35, "R_X86_64_TLSDESC_CALL"},1431	{36, "R_X86_64_TLSDESC"},1432	{37, "R_X86_64_IRELATIVE"},1433	{38, "R_X86_64_RELATIVE64"},1434	{39, "R_X86_64_PC32_BND"},1435	{40, "R_X86_64_PLT32_BND"},1436	{41, "R_X86_64_GOTPCRELX"},1437	{42, "R_X86_64_REX_GOTPCRELX"},1438}14391440func (i R_X86_64) String() string   { return stringName(uint32(i), rx86_64Strings, false) }1441func (i R_X86_64) GoString() string { return stringName(uint32(i), rx86_64Strings, true) }14421443// Relocation types for AArch64 (aka arm64)1444type R_AARCH64 int14451446const (1447	R_AARCH64_NONE                            R_AARCH64 = 01448	R_AARCH64_P32_ABS32                       R_AARCH64 = 11449	R_AARCH64_P32_ABS16                       R_AARCH64 = 21450	R_AARCH64_P32_PREL32                      R_AARCH64 = 31451	R_AARCH64_P32_PREL16                      R_AARCH64 = 41452	R_AARCH64_P32_MOVW_UABS_G0                R_AARCH64 = 51453	R_AARCH64_P32_MOVW_UABS_G0_NC             R_AARCH64 = 61454	R_AARCH64_P32_MOVW_UABS_G1                R_AARCH64 = 71455	R_AARCH64_P32_MOVW_SABS_G0                R_AARCH64 = 81456	R_AARCH64_P32_LD_PREL_LO19                R_AARCH64 = 91457	R_AARCH64_P32_ADR_PREL_LO21               R_AARCH64 = 101458	R_AARCH64_P32_ADR_PREL_PG_HI21            R_AARCH64 = 111459	R_AARCH64_P32_ADD_ABS_LO12_NC             R_AARCH64 = 121460	R_AARCH64_P32_LDST8_ABS_LO12_NC           R_AARCH64 = 131461	R_AARCH64_P32_LDST16_ABS_LO12_NC          R_AARCH64 = 141462	R_AARCH64_P32_LDST32_ABS_LO12_NC          R_AARCH64 = 151463	R_AARCH64_P32_LDST64_ABS_LO12_NC          R_AARCH64 = 161464	R_AARCH64_P32_LDST128_ABS_LO12_NC         R_AARCH64 = 171465	R_AARCH64_P32_TSTBR14                     R_AARCH64 = 181466	R_AARCH64_P32_CONDBR19                    R_AARCH64 = 191467	R_AARCH64_P32_JUMP26                      R_AARCH64 = 201468	R_AARCH64_P32_CALL26                      R_AARCH64 = 211469	R_AARCH64_P32_GOT_LD_PREL19               R_AARCH64 = 251470	R_AARCH64_P32_ADR_GOT_PAGE                R_AARCH64 = 261471	R_AARCH64_P32_LD32_GOT_LO12_NC            R_AARCH64 = 271472	R_AARCH64_P32_TLSGD_ADR_PAGE21            R_AARCH64 = 811473	R_AARCH64_P32_TLSGD_ADD_LO12_NC           R_AARCH64 = 821474	R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21   R_AARCH64 = 1031475	R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC R_AARCH64 = 1041476	R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19    R_AARCH64 = 1051477	R_AARCH64_P32_TLSLE_MOVW_TPREL_G1         R_AARCH64 = 1061478	R_AARCH64_P32_TLSLE_MOVW_TPREL_G0         R_AARCH64 = 1071479	R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC      R_AARCH64 = 1081480	R_AARCH64_P32_TLSLE_ADD_TPREL_HI12        R_AARCH64 = 1091481	R_AARCH64_P32_TLSLE_ADD_TPREL_LO12        R_AARCH64 = 1101482	R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC     R_AARCH64 = 1111483	R_AARCH64_P32_TLSDESC_LD_PREL19           R_AARCH64 = 1221484	R_AARCH64_P32_TLSDESC_ADR_PREL21          R_AARCH64 = 1231485	R_AARCH64_P32_TLSDESC_ADR_PAGE21          R_AARCH64 = 1241486	R_AARCH64_P32_TLSDESC_LD32_LO12_NC        R_AARCH64 = 1251487	R_AARCH64_P32_TLSDESC_ADD_LO12_NC         R_AARCH64 = 1261488	R_AARCH64_P32_TLSDESC_CALL                R_AARCH64 = 1271489	R_AARCH64_P32_COPY                        R_AARCH64 = 1801490	R_AARCH64_P32_GLOB_DAT                    R_AARCH64 = 1811491	R_AARCH64_P32_JUMP_SLOT                   R_AARCH64 = 1821492	R_AARCH64_P32_RELATIVE                    R_AARCH64 = 1831493	R_AARCH64_P32_TLS_DTPMOD                  R_AARCH64 = 1841494	R_AARCH64_P32_TLS_DTPREL                  R_AARCH64 = 1851495	R_AARCH64_P32_TLS_TPREL                   R_AARCH64 = 1861496	R_AARCH64_P32_TLSDESC                     R_AARCH64 = 1871497	R_AARCH64_P32_IRELATIVE                   R_AARCH64 = 1881498	R_AARCH64_NULL                            R_AARCH64 = 2561499	R_AARCH64_ABS64                           R_AARCH64 = 2571500	R_AARCH64_ABS32                           R_AARCH64 = 2581501	R_AARCH64_ABS16                           R_AARCH64 = 2591502	R_AARCH64_PREL64                          R_AARCH64 = 2601503	R_AARCH64_PREL32                          R_AARCH64 = 2611504	R_AARCH64_PREL16                          R_AARCH64 = 2621505	R_AARCH64_MOVW_UABS_G0                    R_AARCH64 = 2631506	R_AARCH64_MOVW_UABS_G0_NC                 R_AARCH64 = 2641507	R_AARCH64_MOVW_UABS_G1                    R_AARCH64 = 2651508	R_AARCH64_MOVW_UABS_G1_NC                 R_AARCH64 = 2661509	R_AARCH64_MOVW_UABS_G2                    R_AARCH64 = 2671510	R_AARCH64_MOVW_UABS_G2_NC                 R_AARCH64 = 2681511	R_AARCH64_MOVW_UABS_G3                    R_AARCH64 = 2691512	R_AARCH64_MOVW_SABS_G0                    R_AARCH64 = 2701513	R_AARCH64_MOVW_SABS_G1                    R_AARCH64 = 2711514	R_AARCH64_MOVW_SABS_G2                    R_AARCH64 = 2721515	R_AARCH64_LD_PREL_LO19                    R_AARCH64 = 2731516	R_AARCH64_ADR_PREL_LO21                   R_AARCH64 = 2741517	R_AARCH64_ADR_PREL_PG_HI21                R_AARCH64 = 2751518	R_AARCH64_ADR_PREL_PG_HI21_NC             R_AARCH64 = 2761519	R_AARCH64_ADD_ABS_LO12_NC                 R_AARCH64 = 2771520	R_AARCH64_LDST8_ABS_LO12_NC               R_AARCH64 = 2781521	R_AARCH64_TSTBR14                         R_AARCH64 = 2791522	R_AARCH64_CONDBR19                        R_AARCH64 = 2801523	R_AARCH64_JUMP26                          R_AARCH64 = 2821524	R_AARCH64_CALL26                          R_AARCH64 = 2831525	R_AARCH64_LDST16_ABS_LO12_NC              R_AARCH64 = 2841526	R_AARCH64_LDST32_ABS_LO12_NC              R_AARCH64 = 2851527	R_AARCH64_LDST64_ABS_LO12_NC              R_AARCH64 = 2861528	R_AARCH64_LDST128_ABS_LO12_NC             R_AARCH64 = 2991529	R_AARCH64_GOT_LD_PREL19                   R_AARCH64 = 3091530	R_AARCH64_LD64_GOTOFF_LO15                R_AARCH64 = 3101531	R_AARCH64_ADR_GOT_PAGE                    R_AARCH64 = 3111532	R_AARCH64_LD64_GOT_LO12_NC                R_AARCH64 = 3121533	R_AARCH64_LD64_GOTPAGE_LO15               R_AARCH64 = 3131534	R_AARCH64_TLSGD_ADR_PREL21                R_AARCH64 = 5121535	R_AARCH64_TLSGD_ADR_PAGE21                R_AARCH64 = 5131536	R_AARCH64_TLSGD_ADD_LO12_NC               R_AARCH64 = 5141537	R_AARCH64_TLSGD_MOVW_G1                   R_AARCH64 = 5151538	R_AARCH64_TLSGD_MOVW_G0_NC                R_AARCH64 = 5161539	R_AARCH64_TLSLD_ADR_PREL21                R_AARCH64 = 5171540	R_AARCH64_TLSLD_ADR_PAGE21                R_AARCH64 = 5181541	R_AARCH64_TLSIE_MOVW_GOTTPREL_G1          R_AARCH64 = 5391542	R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC       R_AARCH64 = 5401543	R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21       R_AARCH64 = 5411544	R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC     R_AARCH64 = 5421545	R_AARCH64_TLSIE_LD_GOTTPREL_PREL19        R_AARCH64 = 5431546	R_AARCH64_TLSLE_MOVW_TPREL_G2             R_AARCH64 = 5441547	R_AARCH64_TLSLE_MOVW_TPREL_G1             R_AARCH64 = 5451548	R_AARCH64_TLSLE_MOVW_TPREL_G1_NC          R_AARCH64 = 5461549	R_AARCH64_TLSLE_MOVW_TPREL_G0             R_AARCH64 = 5471550	R_AARCH64_TLSLE_MOVW_TPREL_G0_NC          R_AARCH64 = 5481551	R_AARCH64_TLSLE_ADD_TPREL_HI12            R_AARCH64 = 5491552	R_AARCH64_TLSLE_ADD_TPREL_LO12            R_AARCH64 = 5501553	R_AARCH64_TLSLE_ADD_TPREL_LO12_NC         R_AARCH64 = 5511554	R_AARCH64_TLSDESC_LD_PREL19               R_AARCH64 = 5601555	R_AARCH64_TLSDESC_ADR_PREL21              R_AARCH64 = 5611556	R_AARCH64_TLSDESC_ADR_PAGE21              R_AARCH64 = 5621557	R_AARCH64_TLSDESC_LD64_LO12_NC            R_AARCH64 = 5631558	R_AARCH64_TLSDESC_ADD_LO12_NC             R_AARCH64 = 5641559	R_AARCH64_TLSDESC_OFF_G1                  R_AARCH64 = 5651560	R_AARCH64_TLSDESC_OFF_G0_NC               R_AARCH64 = 5661561	R_AARCH64_TLSDESC_LDR                     R_AARCH64 = 5671562	R_AARCH64_TLSDESC_ADD                     R_AARCH64 = 5681563	R_AARCH64_TLSDESC_CALL                    R_AARCH64 = 5691564	R_AARCH64_TLSLE_LDST128_TPREL_LO12        R_AARCH64 = 5701565	R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC     R_AARCH64 = 5711566	R_AARCH64_TLSLD_LDST128_DTPREL_LO12       R_AARCH64 = 5721567	R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC    R_AARCH64 = 5731568	R_AARCH64_COPY                            R_AARCH64 = 10241569	R_AARCH64_GLOB_DAT                        R_AARCH64 = 10251570	R_AARCH64_JUMP_SLOT                       R_AARCH64 = 10261571	R_AARCH64_RELATIVE                        R_AARCH64 = 10271572	R_AARCH64_TLS_DTPMOD64                    R_AARCH64 = 10281573	R_AARCH64_TLS_DTPREL64                    R_AARCH64 = 10291574	R_AARCH64_TLS_TPREL64                     R_AARCH64 = 10301575	R_AARCH64_TLSDESC                         R_AARCH64 = 10311576	R_AARCH64_IRELATIVE                       R_AARCH64 = 10321577)15781579var raarch64Strings = []intName{1580	{0, "R_AARCH64_NONE"},1581	{1, "R_AARCH64_P32_ABS32"},1582	{2, "R_AARCH64_P32_ABS16"},1583	{3, "R_AARCH64_P32_PREL32"},1584	{4, "R_AARCH64_P32_PREL16"},1585	{5, "R_AARCH64_P32_MOVW_UABS_G0"},1586	{6, "R_AARCH64_P32_MOVW_UABS_G0_NC"},1587	{7, "R_AARCH64_P32_MOVW_UABS_G1"},1588	{8, "R_AARCH64_P32_MOVW_SABS_G0"},1589	{9, "R_AARCH64_P32_LD_PREL_LO19"},1590	{10, "R_AARCH64_P32_ADR_PREL_LO21"},1591	{11, "R_AARCH64_P32_ADR_PREL_PG_HI21"},1592	{12, "R_AARCH64_P32_ADD_ABS_LO12_NC"},1593	{13, "R_AARCH64_P32_LDST8_ABS_LO12_NC"},1594	{14, "R_AARCH64_P32_LDST16_ABS_LO12_NC"},1595	{15, "R_AARCH64_P32_LDST32_ABS_LO12_NC"},1596	{16, "R_AARCH64_P32_LDST64_ABS_LO12_NC"},1597	{17, "R_AARCH64_P32_LDST128_ABS_LO12_NC"},1598	{18, "R_AARCH64_P32_TSTBR14"},1599	{19, "R_AARCH64_P32_CONDBR19"},1600	{20, "R_AARCH64_P32_JUMP26"},1601	{21, "R_AARCH64_P32_CALL26"},1602	{25, "R_AARCH64_P32_GOT_LD_PREL19"},1603	{26, "R_AARCH64_P32_ADR_GOT_PAGE"},1604	{27, "R_AARCH64_P32_LD32_GOT_LO12_NC"},1605	{81, "R_AARCH64_P32_TLSGD_ADR_PAGE21"},1606	{82, "R_AARCH64_P32_TLSGD_ADD_LO12_NC"},1607	{103, "R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21"},1608	{104, "R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC"},1609	{105, "R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19"},1610	{106, "R_AARCH64_P32_TLSLE_MOVW_TPREL_G1"},1611	{107, "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0"},1612	{108, "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC"},1613	{109, "R_AARCH64_P32_TLSLE_ADD_TPREL_HI12"},1614	{110, "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12"},1615	{111, "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC"},1616	{122, "R_AARCH64_P32_TLSDESC_LD_PREL19"},1617	{123, "R_AARCH64_P32_TLSDESC_ADR_PREL21"},1618	{124, "R_AARCH64_P32_TLSDESC_ADR_PAGE21"},1619	{125, "R_AARCH64_P32_TLSDESC_LD32_LO12_NC"},1620	{126, "R_AARCH64_P32_TLSDESC_ADD_LO12_NC"},1621	{127, "R_AARCH64_P32_TLSDESC_CALL"},1622	{180, "R_AARCH64_P32_COPY"},1623	{181, "R_AARCH64_P32_GLOB_DAT"},1624	{182, "R_AARCH64_P32_JUMP_SLOT"},1625	{183, "R_AARCH64_P32_RELATIVE"},1626	{184, "R_AARCH64_P32_TLS_DTPMOD"},1627	{185, "R_AARCH64_P32_TLS_DTPREL"},1628	{186, "R_AARCH64_P32_TLS_TPREL"},1629	{187, "R_AARCH64_P32_TLSDESC"},1630	{188, "R_AARCH64_P32_IRELATIVE"},1631	{256, "R_AARCH64_NULL"},1632	{257, "R_AARCH64_ABS64"},1633	{258, "R_AARCH64_ABS32"},1634	{259, "R_AARCH64_ABS16"},1635	{260, "R_AARCH64_PREL64"},1636	{261, "R_AARCH64_PREL32"},1637	{262, "R_AARCH64_PREL16"},1638	{263, "R_AARCH64_MOVW_UABS_G0"},1639	{264, "R_AARCH64_MOVW_UABS_G0_NC"},1640	{265, "R_AARCH64_MOVW_UABS_G1"},1641	{266, "R_AARCH64_MOVW_UABS_G1_NC"},1642	{267, "R_AARCH64_MOVW_UABS_G2"},1643	{268, "R_AARCH64_MOVW_UABS_G2_NC"},1644	{269, "R_AARCH64_MOVW_UABS_G3"},1645	{270, "R_AARCH64_MOVW_SABS_G0"},1646	{271, "R_AARCH64_MOVW_SABS_G1"},1647	{272, "R_AARCH64_MOVW_SABS_G2"},1648	{273, "R_AARCH64_LD_PREL_LO19"},1649	{274, "R_AARCH64_ADR_PREL_LO21"},1650	{275, "R_AARCH64_ADR_PREL_PG_HI21"},1651	{276, "R_AARCH64_ADR_PREL_PG_HI21_NC"},1652	{277, "R_AARCH64_ADD_ABS_LO12_NC"},1653	{278, "R_AARCH64_LDST8_ABS_LO12_NC"},1654	{279, "R_AARCH64_TSTBR14"},1655	{280, "R_AARCH64_CONDBR19"},1656	{282, "R_AARCH64_JUMP26"},1657	{283, "R_AARCH64_CALL26"},1658	{284, "R_AARCH64_LDST16_ABS_LO12_NC"},1659	{285, "R_AARCH64_LDST32_ABS_LO12_NC"},1660	{286, "R_AARCH64_LDST64_ABS_LO12_NC"},1661	{299, "R_AARCH64_LDST128_ABS_LO12_NC"},1662	{309, "R_AARCH64_GOT_LD_PREL19"},1663	{310, "R_AARCH64_LD64_GOTOFF_LO15"},1664	{311, "R_AARCH64_ADR_GOT_PAGE"},1665	{312, "R_AARCH64_LD64_GOT_LO12_NC"},1666	{313, "R_AARCH64_LD64_GOTPAGE_LO15"},1667	{512, "R_AARCH64_TLSGD_ADR_PREL21"},1668	{513, "R_AARCH64_TLSGD_ADR_PAGE21"},1669	{514, "R_AARCH64_TLSGD_ADD_LO12_NC"},1670	{515, "R_AARCH64_TLSGD_MOVW_G1"},1671	{516, "R_AARCH64_TLSGD_MOVW_G0_NC"},1672	{517, "R_AARCH64_TLSLD_ADR_PREL21"},1673	{518, "R_AARCH64_TLSLD_ADR_PAGE21"},1674	{539, "R_AARCH64_TLSIE_MOVW_GOTTPREL_G1"},1675	{540, "R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC"},1676	{541, "R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21"},1677	{542, "R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC"},1678	{543, "R_AARCH64_TLSIE_LD_GOTTPREL_PREL19"},1679	{544, "R_AARCH64_TLSLE_MOVW_TPREL_G2"},1680	{545, "R_AARCH64_TLSLE_MOVW_TPREL_G1"},1681	{546, "R_AARCH64_TLSLE_MOVW_TPREL_G1_NC"},1682	{547, "R_AARCH64_TLSLE_MOVW_TPREL_G0"},1683	{548, "R_AARCH64_TLSLE_MOVW_TPREL_G0_NC"},1684	{549, "R_AARCH64_TLSLE_ADD_TPREL_HI12"},1685	{550, "R_AARCH64_TLSLE_ADD_TPREL_LO12"},1686	{551, "R_AARCH64_TLSLE_ADD_TPREL_LO12_NC"},1687	{560, "R_AARCH64_TLSDESC_LD_PREL19"},1688	{561, "R_AARCH64_TLSDESC_ADR_PREL21"},1689	{562, "R_AARCH64_TLSDESC_ADR_PAGE21"},1690	{563, "R_AARCH64_TLSDESC_LD64_LO12_NC"},1691	{564, "R_AARCH64_TLSDESC_ADD_LO12_NC"},1692	{565, "R_AARCH64_TLSDESC_OFF_G1"},1693	{566, "R_AARCH64_TLSDESC_OFF_G0_NC"},1694	{567, "R_AARCH64_TLSDESC_LDR"},1695	{568, "R_AARCH64_TLSDESC_ADD"},1696	{569, "R_AARCH64_TLSDESC_CALL"},1697	{570, "R_AARCH64_TLSLE_LDST128_TPREL_LO12"},1698	{571, "R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC"},1699	{572, "R_AARCH64_TLSLD_LDST128_DTPREL_LO12"},1700	{573, "R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC"},1701	{1024, "R_AARCH64_COPY"},1702	{1025, "R_AARCH64_GLOB_DAT"},1703	{1026, "R_AARCH64_JUMP_SLOT"},1704	{1027, "R_AARCH64_RELATIVE"},1705	{1028, "R_AARCH64_TLS_DTPMOD64"},1706	{1029, "R_AARCH64_TLS_DTPREL64"},1707	{1030, "R_AARCH64_TLS_TPREL64"},1708	{1031, "R_AARCH64_TLSDESC"},1709	{1032, "R_AARCH64_IRELATIVE"},1710}17111712func (i R_AARCH64) String() string   { return stringName(uint32(i), raarch64Strings, false) }1713func (i R_AARCH64) GoString() string { return stringName(uint32(i), raarch64Strings, true) }17141715// Relocation types for Alpha.1716type R_ALPHA int17171718const (1719	R_ALPHA_NONE           R_ALPHA = 0  /* No reloc */1720	R_ALPHA_REFLONG        R_ALPHA = 1  /* Direct 32 bit */1721	R_ALPHA_REFQUAD        R_ALPHA = 2  /* Direct 64 bit */1722	R_ALPHA_GPREL32        R_ALPHA = 3  /* GP relative 32 bit */1723	R_ALPHA_LITERAL        R_ALPHA = 4  /* GP relative 16 bit w/optimization */1724	R_ALPHA_LITUSE         R_ALPHA = 5  /* Optimization hint for LITERAL */1725	R_ALPHA_GPDISP         R_ALPHA = 6  /* Add displacement to GP */1726	R_ALPHA_BRADDR         R_ALPHA = 7  /* PC+4 relative 23 bit shifted */1727	R_ALPHA_HINT           R_ALPHA = 8  /* PC+4 relative 16 bit shifted */1728	R_ALPHA_SREL16         R_ALPHA = 9  /* PC relative 16 bit */1729	R_ALPHA_SREL32         R_ALPHA = 10 /* PC relative 32 bit */1730	R_ALPHA_SREL64         R_ALPHA = 11 /* PC relative 64 bit */1731	R_ALPHA_OP_PUSH        R_ALPHA = 12 /* OP stack push */1732	R_ALPHA_OP_STORE       R_ALPHA = 13 /* OP stack pop and store */1733	R_ALPHA_OP_PSUB        R_ALPHA = 14 /* OP stack subtract */1734	R_ALPHA_OP_PRSHIFT     R_ALPHA = 15 /* OP stack right shift */1735	R_ALPHA_GPVALUE        R_ALPHA = 161736	R_ALPHA_GPRELHIGH      R_ALPHA = 171737	R_ALPHA_GPRELLOW       R_ALPHA = 181738	R_ALPHA_IMMED_GP_16    R_ALPHA = 191739	R_ALPHA_IMMED_GP_HI32  R_ALPHA = 201740	R_ALPHA_IMMED_SCN_HI32 R_ALPHA = 211741	R_ALPHA_IMMED_BR_HI32  R_ALPHA = 221742	R_ALPHA_IMMED_LO32     R_ALPHA = 231743	R_ALPHA_COPY           R_ALPHA = 24 /* Copy symbol at runtime */1744	R_ALPHA_GLOB_DAT       R_ALPHA = 25 /* Create GOT entry */1745	R_ALPHA_JMP_SLOT       R_ALPHA = 26 /* Create PLT entry */1746	R_ALPHA_RELATIVE       R_ALPHA = 27 /* Adjust by program base */1747)17481749var ralphaStrings = []intName{1750	{0, "R_ALPHA_NONE"},1751	{1, "R_ALPHA_REFLONG"},1752	{2, "R_ALPHA_REFQUAD"},1753	{3, "R_ALPHA_GPREL32"},1754	{4, "R_ALPHA_LITERAL"},1755	{5, "R_ALPHA_LITUSE"},1756	{6, "R_ALPHA_GPDISP"},1757	{7, "R_ALPHA_BRADDR"},1758	{8, "R_ALPHA_HINT"},1759	{9, "R_ALPHA_SREL16"},1760	{10, "R_ALPHA_SREL32"},1761	{11, "R_ALPHA_SREL64"},1762	{12, "R_ALPHA_OP_PUSH"},1763	{13, "R_ALPHA_OP_STORE"},1764	{14, "R_ALPHA_OP_PSUB"},1765	{15, "R_ALPHA_OP_PRSHIFT"},1766	{16, "R_ALPHA_GPVALUE"},1767	{17, "R_ALPHA_GPRELHIGH"},1768	{18, "R_ALPHA_GPRELLOW"},1769	{19, "R_ALPHA_IMMED_GP_16"},1770	{20, "R_ALPHA_IMMED_GP_HI32"},1771	{21, "R_ALPHA_IMMED_SCN_HI32"},1772	{22, "R_ALPHA_IMMED_BR_HI32"},1773	{23, "R_ALPHA_IMMED_LO32"},1774	{24, "R_ALPHA_COPY"},1775	{25, "R_ALPHA_GLOB_DAT"},1776	{26, "R_ALPHA_JMP_SLOT"},1777	{27, "R_ALPHA_RELATIVE"},1778}17791780func (i R_ALPHA) String() string   { return stringName(uint32(i), ralphaStrings, false) }1781func (i R_ALPHA) GoString() string { return stringName(uint32(i), ralphaStrings, true) }17821783// Relocation types for ARM.1784type R_ARM int17851786const (1787	R_ARM_NONE               R_ARM = 0 /* No relocation. */1788	R_ARM_PC24               R_ARM = 11789	R_ARM_ABS32              R_ARM = 21790	R_ARM_REL32              R_ARM = 31791	R_ARM_PC13               R_ARM = 41792	R_ARM_ABS16              R_ARM = 51793	R_ARM_ABS12              R_ARM = 61794	R_ARM_THM_ABS5           R_ARM = 71795	R_ARM_ABS8               R_ARM = 81796	R_ARM_SBREL32            R_ARM = 91797	R_ARM_THM_PC22           R_ARM = 101798	R_ARM_THM_PC8            R_ARM = 111799	R_ARM_AMP_VCALL9         R_ARM = 121800	R_ARM_SWI24              R_ARM = 131801	R_ARM_THM_SWI8           R_ARM = 141802	R_ARM_XPC25              R_ARM = 151803	R_ARM_THM_XPC22          R_ARM = 161804	R_ARM_TLS_DTPMOD32       R_ARM = 171805	R_ARM_TLS_DTPOFF32       R_ARM = 181806	R_ARM_TLS_TPOFF32        R_ARM = 191807	R_ARM_COPY               R_ARM = 20 /* Copy data from shared object. */1808	R_ARM_GLOB_DAT           R_ARM = 21 /* Set GOT entry to data address. */1809	R_ARM_JUMP_SLOT          R_ARM = 22 /* Set GOT entry to code address. */1810	R_ARM_RELATIVE           R_ARM = 23 /* Add load address of shared object. */1811	R_ARM_GOTOFF             R_ARM = 24 /* Add GOT-relative symbol address. */1812	R_ARM_GOTPC              R_ARM = 25 /* Add PC-relative GOT table address. */1813	R_ARM_GOT32              R_ARM = 26 /* Add PC-relative GOT offset. */1814	R_ARM_PLT32              R_ARM = 27 /* Add PC-relative PLT offset. */1815	R_ARM_CALL               R_ARM = 281816	R_ARM_JUMP24             R_ARM = 291817	R_ARM_THM_JUMP24         R_ARM = 301818	R_ARM_BASE_ABS           R_ARM = 311819	R_ARM_ALU_PCREL_7_0      R_ARM = 321820	R_ARM_ALU_PCREL_15_8     R_ARM = 331821	R_ARM_ALU_PCREL_23_15    R_ARM = 341822	R_ARM_LDR_SBREL_11_10_NC R_ARM = 351823	R_ARM_ALU_SBREL_19_12_NC R_ARM = 361824	R_ARM_ALU_SBREL_27_20_CK R_ARM = 371825	R_ARM_TARGET1            R_ARM = 381826	R_ARM_SBREL31            R_ARM = 391827	R_ARM_V4BX               R_ARM = 401828	R_ARM_TARGET2            R_ARM = 411829	R_ARM_PREL31             R_ARM = 421830	R_ARM_MOVW_ABS_NC        R_ARM = 431831	R_ARM_MOVT_ABS           R_ARM = 441832	R_ARM_MOVW_PREL_NC       R_ARM = 451833	R_ARM_MOVT_PREL          R_ARM = 461834	R_ARM_THM_MOVW_ABS_NC    R_ARM = 471835	R_ARM_THM_MOVT_ABS       R_ARM = 481836	R_ARM_THM_MOVW_PREL_NC   R_ARM = 491837	R_ARM_THM_MOVT_PREL      R_ARM = 501838	R_ARM_THM_JUMP19         R_ARM = 511839	R_ARM_THM_JUMP6          R_ARM = 521840	R_ARM_THM_ALU_PREL_11_0  R_ARM = 531841	R_ARM_THM_PC12           R_ARM = 541842	R_ARM_ABS32_NOI          R_ARM = 551843	R_ARM_REL32_NOI          R_ARM = 561844	R_ARM_ALU_PC_G0_NC       R_ARM = 571845	R_ARM_ALU_PC_G0          R_ARM = 581846	R_ARM_ALU_PC_G1_NC       R_ARM = 591847	R_ARM_ALU_PC_G1          R_ARM = 601848	R_ARM_ALU_PC_G2          R_ARM = 611849	R_ARM_LDR_PC_G1          R_ARM = 621850	R_ARM_LDR_PC_G2          R_ARM = 631851	R_ARM_LDRS_PC_G0         R_ARM = 641852	R_ARM_LDRS_PC_G1         R_ARM = 651853	R_ARM_LDRS_PC_G2         R_ARM = 661854	R_ARM_LDC_PC_G0          R_ARM = 671855	R_ARM_LDC_PC_G1          R_ARM = 681856	R_ARM_LDC_PC_G2          R_ARM = 691857	R_ARM_ALU_SB_G0_NC       R_ARM = 701858	R_ARM_ALU_SB_G0          R_ARM = 711859	R_ARM_ALU_SB_G1_NC       R_ARM = 721860	R_ARM_ALU_SB_G1          R_ARM = 731861	R_ARM_ALU_SB_G2          R_ARM = 741862	R_ARM_LDR_SB_G0          R_ARM = 751863	R_ARM_LDR_SB_G1          R_ARM = 761864	R_ARM_LDR_SB_G2          R_ARM = 771865	R_ARM_LDRS_SB_G0         R_ARM = 781866	R_ARM_LDRS_SB_G1         R_ARM = 791867	R_ARM_LDRS_SB_G2         R_ARM = 801868	R_ARM_LDC_SB_G0          R_ARM = 811869	R_ARM_LDC_SB_G1          R_ARM = 821870	R_ARM_LDC_SB_G2          R_ARM = 831871	R_ARM_MOVW_BREL_NC       R_ARM = 841872	R_ARM_MOVT_BREL          R_ARM = 851873	R_ARM_MOVW_BREL          R_ARM = 861874	R_ARM_THM_MOVW_BREL_NC   R_ARM = 871875	R_ARM_THM_MOVT_BREL      R_ARM = 881876	R_ARM_THM_MOVW_BREL      R_ARM = 891877	R_ARM_TLS_GOTDESC        R_ARM = 901878	R_ARM_TLS_CALL           R_ARM = 911879	R_ARM_TLS_DESCSEQ        R_ARM = 921880	R_ARM_THM_TLS_CALL       R_ARM = 931881	R_ARM_PLT32_ABS          R_ARM = 941882	R_ARM_GOT_ABS            R_ARM = 951883	R_ARM_GOT_PREL           R_ARM = 961884	R_ARM_GOT_BREL12         R_ARM = 971885	R_ARM_GOTOFF12           R_ARM = 981886	R_ARM_GOTRELAX           R_ARM = 991887	R_ARM_GNU_VTENTRY        R_ARM = 1001888	R_ARM_GNU_VTINHERIT      R_ARM = 1011889	R_ARM_THM_JUMP11         R_ARM = 1021890	R_ARM_THM_JUMP8          R_ARM = 1031891	R_ARM_TLS_GD32           R_ARM = 1041892	R_ARM_TLS_LDM32          R_ARM = 1051893	R_ARM_TLS_LDO32          R_ARM = 1061894	R_ARM_TLS_IE32           R_ARM = 1071895	R_ARM_TLS_LE32           R_ARM = 1081896	R_ARM_TLS_LDO12          R_ARM = 1091897	R_ARM_TLS_LE12           R_ARM = 1101898	R_ARM_TLS_IE12GP         R_ARM = 1111899	R_ARM_PRIVATE_0          R_ARM = 1121900	R_ARM_PRIVATE_1          R_ARM = 1131901	R_ARM_PRIVATE_2          R_ARM = 1141902	R_ARM_PRIVATE_3          R_ARM = 1151903	R_ARM_PRIVATE_4          R_ARM = 1161904	R_ARM_PRIVATE_5          R_ARM = 1171905	R_ARM_PRIVATE_6          R_ARM = 1181906	R_ARM_PRIVATE_7          R_ARM = 1191907	R_ARM_PRIVATE_8          R_ARM = 1201908	R_ARM_PRIVATE_9          R_ARM = 1211909	R_ARM_PRIVATE_10         R_ARM = 1221910	R_ARM_PRIVATE_11         R_ARM = 1231911	R_ARM_PRIVATE_12         R_ARM = 1241912	R_ARM_PRIVATE_13         R_ARM = 1251913	R_ARM_PRIVATE_14         R_ARM = 1261914	R_ARM_PRIVATE_15         R_ARM = 1271915	R_ARM_ME_TOO             R_ARM = 1281916	R_ARM_THM_TLS_DESCSEQ16  R_ARM = 1291917	R_ARM_THM_TLS_DESCSEQ32  R_ARM = 1301918	R_ARM_THM_GOT_BREL12     R_ARM = 1311919	R_ARM_THM_ALU_ABS_G0_NC  R_ARM = 1321920	R_ARM_THM_ALU_ABS_G1_NC  R_ARM = 1331921	R_ARM_THM_ALU_ABS_G2_NC  R_ARM = 1341922	R_ARM_THM_ALU_ABS_G3     R_ARM = 1351923	R_ARM_IRELATIVE          R_ARM = 1601924	R_ARM_RXPC25             R_ARM = 2491925	R_ARM_RSBREL32           R_ARM = 2501926	R_ARM_THM_RPC22          R_ARM = 2511927	R_ARM_RREL32             R_ARM = 2521928	R_ARM_RABS32             R_ARM = 2531929	R_ARM_RPC24              R_ARM = 2541930	R_ARM_RBASE              R_ARM = 2551931)19321933var rarmStrings = []intName{1934	{0, "R_ARM_NONE"},1935	{1, "R_ARM_PC24"},1936	{2, "R_ARM_ABS32"},1937	{3, "R_ARM_REL32"},1938	{4, "R_ARM_PC13"},1939	{5, "R_ARM_ABS16"},1940	{6, "R_ARM_ABS12"},1941	{7, "R_ARM_THM_ABS5"},1942	{8, "R_ARM_ABS8"},1943	{9, "R_ARM_SBREL32"},1944	{10, "R_ARM_THM_PC22"},1945	{11, "R_ARM_THM_PC8"},1946	{12, "R_ARM_AMP_VCALL9"},1947	{13, "R_ARM_SWI24"},1948	{14, "R_ARM_THM_SWI8"},1949	{15, "R_ARM_XPC25"},1950	{16, "R_ARM_THM_XPC22"},1951	{17, "R_ARM_TLS_DTPMOD32"},1952	{18, "R_ARM_TLS_DTPOFF32"},1953	{19, "R_ARM_TLS_TPOFF32"},1954	{20, "R_ARM_COPY"},1955	{21, "R_ARM_GLOB_DAT"},1956	{22, "R_ARM_JUMP_SLOT"},1957	{23, "R_ARM_RELATIVE"},1958	{24, "R_ARM_GOTOFF"},1959	{25, "R_ARM_GOTPC"},1960	{26, "R_ARM_GOT32"},1961	{27, "R_ARM_PLT32"},1962	{28, "R_ARM_CALL"},1963	{29, "R_ARM_JUMP24"},1964	{30, "R_ARM_THM_JUMP24"},1965	{31, "R_ARM_BASE_ABS"},1966	{32, "R_ARM_ALU_PCREL_7_0"},1967	{33, "R_ARM_ALU_PCREL_15_8"},1968	{34, "R_ARM_ALU_PCREL_23_15"},1969	{35, "R_ARM_LDR_SBREL_11_10_NC"},1970	{36, "R_ARM_ALU_SBREL_19_12_NC"},1971	{37, "R_ARM_ALU_SBREL_27_20_CK"},1972	{38, "R_ARM_TARGET1"},1973	{39, "R_ARM_SBREL31"},1974	{40, "R_ARM_V4BX"},1975	{41, "R_ARM_TARGET2"},1976	{42, "R_ARM_PREL31"},1977	{43, "R_ARM_MOVW_ABS_NC"},1978	{44, "R_ARM_MOVT_ABS"},1979	{45, "R_ARM_MOVW_PREL_NC"},1980	{46, "R_ARM_MOVT_PREL"},1981	{47, "R_ARM_THM_MOVW_ABS_NC"},1982	{48, "R_ARM_THM_MOVT_ABS"},1983	{49, "R_ARM_THM_MOVW_PREL_NC"},1984	{50, "R_ARM_THM_MOVT_PREL"},1985	{51, "R_ARM_THM_JUMP19"},1986	{52, "R_ARM_THM_JUMP6"},1987	{53, "R_ARM_THM_ALU_PREL_11_0"},1988	{54, "R_ARM_THM_PC12"},1989	{55, "R_ARM_ABS32_NOI"},1990	{56, "R_ARM_REL32_NOI"},1991	{57, "R_ARM_ALU_PC_G0_NC"},1992	{58, "R_ARM_ALU_PC_G0"},1993	{59, "R_ARM_ALU_PC_G1_NC"},1994	{60, "R_ARM_ALU_PC_G1"},1995	{61, "R_ARM_ALU_PC_G2"},1996	{62, "R_ARM_LDR_PC_G1"},1997	{63, "R_ARM_LDR_PC_G2"},1998	{64, "R_ARM_LDRS_PC_G0"},1999	{65, "R_ARM_LDRS_PC_G1"},2000	{66, "R_ARM_LDRS_PC_G2"},

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.