| 1 | /*- |
| 2 | * Copyright (c) 2010,2021,2024 Joseph Koshy |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions |
| 7 | * are met: |
| 8 | * 1. Redistributions of source code must retain the above copyright |
| 9 | * notice, this list of conditions and the following disclaimer. |
| 10 | * 2. Redistributions in binary form must reproduce the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer in the |
| 12 | * documentation and/or other materials provided with the distribution. |
| 13 | * |
| 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS `AS IS' AND |
| 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
| 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 24 | * SUCH DAMAGE. |
| 25 | */ |
| 26 | |
| 27 | /* |
| 28 | * WARNING: GENERATED FILE. DO NOT MODIFY. |
| 29 | * |
| 30 | * GENERATED FROM: Id: elfdefinitions.m4 4162 2025-02-04 18:52:12Z jkoshy |
| 31 | * GENERATED FROM: Id: elfconstants.m4 4172 2025-02-06 21:19:36Z jkoshy |
| 32 | */ |
| 33 | |
| 34 | /* |
| 35 | * These definitions are believed to be compatible with: |
| 36 | * |
| 37 | * - The public specification of the ELF format as defined in the |
| 38 | * October 2009 draft of System V ABI. |
| 39 | * http://www.sco.com/developers/gabi/latest/ch4.intro.html |
| 40 | * |
| 41 | * - The May 1998 (version 1.5) draft of "The ELF-64 object format". |
| 42 | * |
| 43 | * - The "Linkers and Libraries Guide", from Sun Microsystems. |
| 44 | * |
| 45 | * - Processor-specific ELF ABI definitions for the aarch64, arm, i386, |
| 46 | * ia_64, loongarch, mips, ppc, ppc64, riscv, s390, sparc, vax and |
| 47 | * x86_64 architectures: |
| 48 | * |
| 49 | * i386 :: |
| 50 | * System V Application Binary Interface |
| 51 | * Intel386 Architecture Processor Supplement Version 1.2 |
| 52 | * https://gitlab.com/x86-psABIs/i386-ABI/-/tree/hjl/x86/master |
| 53 | * |
| 54 | * aarch64 :: |
| 55 | * ELF for the Arm® 64-bit Architecture (AArch64) |
| 56 | * https://github.com/ARM-software/abi-aa/blob/main/aaelf64/aaelf64.rst |
| 57 | * |
| 58 | * arm :: |
| 59 | * ELF for the Arm® Architecture |
| 60 | * https://github.com/ARM-software/abi-aa/blob/main/aaelf32/aaelf32.rst |
| 61 | * |
| 62 | * ia_64 :: |
| 63 | * Intel® Itanium™ Processor-specific Application Binary Interface (ABI) |
| 64 | * Document Number: 245370-003 |
| 65 | * http://refspecs.linux-foundation.org/elf/IA64-SysV-psABI.pdf |
| 66 | * |
| 67 | * loongarch :: |
| 68 | * ELF for the LoongArch™ Architecture |
| 69 | * https://github.com/loongson/la-abi-specs/blob/release/laelf.adoc. |
| 70 | * |
| 71 | * mips :: |
| 72 | * SYSTEM V APPLICATION BINARY INTERFACE, MIPS RISC Processor Supplement, |
| 73 | * 3rd Edition, 1996. |
| 74 | * https://refspecs.linuxfoundation.org/elf/mipsabi.pdf |
| 75 | * |
| 76 | * ppc :: |
| 77 | * Power Architecture® 32-bit Application Binary Interface |
| 78 | * Supplement 1.0 - Linux® & Embedded |
| 79 | * (Archived link) https://web.archive.org/web/20120608002551/\ |
| 80 | * https://www.power.org/resources/downloads/\ |
| 81 | * Power-Arch-32-bit-ABI-supp-1.0-Unified.pdf |
| 82 | * |
| 83 | * ppc64 :: |
| 84 | * 64-bit ELF ABI Specification for OpenPOWER Architecture |
| 85 | * https://openpowerfoundation.org/specifications/64bitelfabi/ |
| 86 | * |
| 87 | * riscv :: |
| 88 | * RISC-V ELF Specification |
| 89 | * https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc |
| 90 | * |
| 91 | * s390 :: |
| 92 | * S/390 ELF Application Binary Interface Supplement |
| 93 | * https://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_zSeries.htm |
| 94 | * |
| 95 | * sparc :: |
| 96 | * Oracle Solaris Linkers and Libraries Guide |
| 97 | * November 2024, Document E36783-04. |
| 98 | * |
| 99 | * x86_64 :: |
| 100 | * ELF x86-64-ABI psABI |
| 101 | * https://gitlab.com/x86-psABIs/x86-64-ABI |
| 102 | */ |
| 103 | |
| 104 | #ifndef _SYS_ELFDEFINITIONS_H_ |
| 105 | #define _SYS_ELFDEFINITIONS_H_ |
| 106 | |
| 107 | /* |
| 108 | * Types of capabilities. |
| 109 | */ |
| 110 | |
| 111 | #define CA_SUNW_NULL	0 /* ignored */ |
| 112 | #define CA_SUNW_HW_1	1 /* hardware capability */ |
| 113 | #define CA_SUNW_SW_1	2 /* software capability */ |
| 114 | |
| 115 | /* |
| 116 | * Flags used with dynamic linking entries. |
| 117 | */ |
| 118 | |
| 119 | #define DF_ORIGIN	0x1 /* object being loaded may refer to $ORIGIN */ |
| 120 | #define DF_SYMBOLIC	0x2 /* search library for references before executable */ |
| 121 | #define DF_TEXTREL	0x4 /* relocation entries may modify text segment */ |
| 122 | #define DF_BIND_NOW	0x8 /* process relocation entries at load time */ |
| 123 | #define DF_STATIC_TLS	0x10 /* uses static thread-local storage */ |
| 124 | #define DF_1_BIND_NOW	0x1 /* process relocation entries at load time */ |
| 125 | #define DF_1_GLOBAL	0x2 /* unused */ |
| 126 | #define DF_1_GROUP	0x4 /* object is a member of a group */ |
| 127 | #define DF_1_NODELETE	0x8 /* object cannot be deleted from a process */ |
| 128 | #define DF_1_LOADFLTR	0x10 /* immediate load filtees */ |
| 129 | #define DF_1_INITFIRST	0x20 /* initialize object first */ |
| 130 | #define DF_1_NOOPEN	0x40 /* disallow dlopen() */ |
| 131 | #define DF_1_ORIGIN	0x80 /* object being loaded may refer to $ORIGIN */ |
| 132 | #define DF_1_DIRECT	0x100 /* direct bindings enabled */ |
| 133 | #define DF_1_INTERPOSE	0x400 /* object is interposer */ |
| 134 | #define DF_1_NODEFLIB	0x800 /* ignore default library search path */ |
| 135 | #define DF_1_NODUMP	0x1000 /* disallow dldump() */ |
| 136 | #define DF_1_CONFALT	0x2000 /* object is a configuration alternative */ |
| 137 | #define DF_1_ENDFILTEE	0x4000 /* filtee terminates filter search */ |
| 138 | #define DF_1_DISPRELDNE	0x8000 /* displacement relocation done */ |
| 139 | #define DF_1_DISPRELPND	0x10000 /* displacement relocation pending */ |
| 140 | |
| 141 | /* |
| 142 | * Dynamic linking entry types. |
| 143 | */ |
| 144 | |
| 145 | #define DT_NULL		0 /* end of array */ |
| 146 | #define DT_NEEDED	1 /* names a needed library */ |
| 147 | #define DT_PLTRELSZ	2 /* size in bytes of associated relocation entries */ |
| 148 | #define DT_PLTGOT	3 /* address associated with the procedure linkage table */ |
| 149 | #define DT_HASH		4 /* address of the symbol hash table */ |
| 150 | #define DT_STRTAB	5 /* address of the string table */ |
| 151 | #define DT_SYMTAB	6 /* address of the symbol table */ |
| 152 | #define DT_RELA		7 /* address of the relocation table */ |
| 153 | #define DT_RELASZ	8 /* size of the DT_RELA table */ |
| 154 | #define DT_RELAENT	9 /* size of each DT_RELA entry */ |
| 155 | #define DT_STRSZ	10 /* size of the string table */ |
| 156 | #define DT_SYMENT	11 /* size of a symbol table entry */ |
| 157 | #define DT_INIT		12 /* address of the initialization function */ |
| 158 | #define DT_FINI		13 /* address of the finalization function */ |
| 159 | #define DT_SONAME	14 /* names the shared object */ |
| 160 | #define DT_RPATH	15 /* runtime library search path */ |
| 161 | #define DT_SYMBOLIC	16 /* alter symbol resolution algorithm */ |
| 162 | #define DT_REL		17 /* address of the DT_REL table */ |
| 163 | #define DT_RELSZ	18 /* size of the DT_REL table */ |
| 164 | #define DT_RELENT	19 /* size of each DT_REL entry */ |
| 165 | #define DT_PLTREL	20 /* type of relocation entry in the procedure linkage table */ |
| 166 | #define DT_DEBUG	21 /* used for debugging */ |
| 167 | #define DT_TEXTREL	22 /* text segment may be written to during relocation */ |
| 168 | #define DT_JMPREL	23 /* address of relocation entries associated with the procedure linkage table */ |
| 169 | #define DT_BIND_NOW	24 /* bind symbols at loading time */ |
| 170 | #define DT_INIT_ARRAY	25 /* pointers to initialization functions */ |
| 171 | #define DT_FINI_ARRAY	26 /* pointers to termination functions */ |
| 172 | #define DT_INIT_ARRAYSZ	27 /* size of the DT_INIT_ARRAY */ |
| 173 | #define DT_FINI_ARRAYSZ	28 /* size of the DT_FINI_ARRAY */ |
| 174 | #define DT_RUNPATH	29 /* index of library search path string */ |
| 175 | #define DT_FLAGS	30 /* flags specific to the object being loaded */ |
| 176 | #define DT_ENCODING	32 /* standard semantics */ |
| 177 | #define DT_PREINIT_ARRAY 32 /* pointers to pre-initialization functions */ |
| 178 | #define DT_PREINIT_ARRAYSZ 33 /* size of pre-initialization array */ |
| 179 | #define DT_MAXPOSTAGS	34 /* the number of positive tags */ |
| 180 | #define DT_LOOS		0x6000000D /* start of OS-specific types */ |
| 181 | #define DT_SUNW_AUXILIARY 0x6000000D /* offset of string naming auxiliary filtees */ |
| 182 | #define DT_SUNW_RTLDINF	0x6000000E /* rtld internal use */ |
| 183 | #define DT_SUNW_FILTER	0x6000000F /* offset of string naming standard filtees */ |
| 184 | #define DT_SUNW_CAP	0x60000010 /* address of hardware capabilities section */ |
| 185 | #define DT_SUNW_ASLR	0x60000023 /* Address Space Layout Randomization flag */ |
| 186 | #define DT_HIOS		0x6FFFF000 /* end of OS-specific types */ |
| 187 | #define DT_VALRNGLO	0x6FFFFD00 /* start of range using the d_val field */ |
| 188 | #define DT_GNU_PRELINKED 0x6FFFFDF5 /* prelinking timestamp */ |
| 189 | #define DT_GNU_CONFLICTSZ 0x6FFFFDF6 /* size of conflict section */ |
| 190 | #define DT_GNU_LIBLISTSZ 0x6FFFFDF7 /* size of library list */ |
| 191 | #define DT_CHECKSUM	0x6FFFFDF8 /* checksum for the object */ |
| 192 | #define DT_PLTPADSZ	0x6FFFFDF9 /* size of PLT padding */ |
| 193 | #define DT_MOVEENT	0x6FFFFDFA /* size of DT_MOVETAB entries */ |
| 194 | #define DT_MOVESZ	0x6FFFFDFB /* total size of the MOVETAB table */ |
| 195 | #define DT_FEATURE	0x6FFFFDFC /* feature values */ |
| 196 | #define DT_POSFLAG_1	0x6FFFFDFD /* dynamic position flags */ |
| 197 | #define DT_SYMINSZ	0x6FFFFDFE /* size of the DT_SYMINFO table */ |
| 198 | #define DT_SYMINENT	0x6FFFFDFF /* size of a DT_SYMINFO entry */ |
| 199 | #define DT_VALRNGHI	0x6FFFFDFF /* end of range using the d_val field */ |
| 200 | #define DT_ADDRRNGLO	0x6FFFFE00 /* start of range using the d_ptr field */ |
| 201 | #define DT_GNU_HASH	0x6FFFFEF5 /* GNU style hash tables */ |
| 202 | #define DT_TLSDESC_PLT	0x6FFFFEF6 /* location of PLT entry for TLS descriptor resolver calls */ |
| 203 | #define DT_TLSDESC_GOT	0x6FFFFEF7 /* location of GOT entry used by TLS descriptor resolver PLT entry */ |
| 204 | #define DT_GNU_CONFLICT	0x6FFFFEF8 /* address of conflict section */ |
| 205 | #define DT_GNU_LIBLIST	0x6FFFFEF9 /* address of conflict section */ |
| 206 | #define DT_CONFIG	0x6FFFFEFA /* configuration file */ |
| 207 | #define DT_DEPAUDIT	0x6FFFFEFB /* string defining audit libraries */ |
| 208 | #define DT_AUDIT	0x6FFFFEFC /* string defining audit libraries */ |
| 209 | #define DT_PLTPAD	0x6FFFFEFD /* PLT padding */ |
| 210 | #define DT_MOVETAB	0x6FFFFEFE /* address of a move table */ |
| 211 | #define DT_SYMINFO	0x6FFFFEFF /* address of the symbol information table */ |
| 212 | #define DT_ADDRRNGHI	0x6FFFFEFF /* end of range using the d_ptr field */ |
| 213 | #define DT_VERSYM	0x6FFFFFF0 /* address of the version section */ |
| 214 | #define DT_RELACOUNT	0x6FFFFFF9 /* count of RELA relocations */ |
| 215 | #define DT_RELCOUNT	0x6FFFFFFA /* count of REL relocations */ |
| 216 | #define DT_FLAGS_1	0x6FFFFFFB /* flag values */ |
| 217 | #define DT_VERDEF	0x6FFFFFFC /* address of the version definition segment */ |
| 218 | #define DT_VERDEFNUM	0x6FFFFFFD /* the number of version definition entries */ |
| 219 | #define DT_VERNEED	0x6FFFFFFE /* address of section with needed versions */ |
| 220 | #define DT_VERNEEDNUM	0x6FFFFFFF /* the number of version needed entries */ |
| 221 | #define DT_LOPROC	0x70000000 /* start of processor-specific types */ |
| 222 | #define DT_ARM_SYMTABSZ	0x70000001 /* number of entries in the dynamic symbol table */ |
| 223 | #define DT_SPARC_REGISTER 0x70000001 /* index of an STT_SPARC_REGISTER symbol */ |
| 224 | #define DT_ARM_PREEMPTMAP 0x70000002 /* address of the preemption map */ |
| 225 | #define DT_MIPS_RLD_VERSION 0x70000001 /* version ID for runtime linker interface */ |
| 226 | #define DT_MIPS_TIME_STAMP 0x70000002 /* timestamp */ |
| 227 | #define DT_MIPS_ICHECKSUM 0x70000003 /* checksum of all external strings and common sizes */ |
| 228 | #define DT_MIPS_IVERSION 0x70000004 /* string table index of a version string */ |
| 229 | #define DT_MIPS_FLAGS	0x70000005 /* MIPS-specific flags */ |
| 230 | #define DT_MIPS_BASE_ADDRESS 0x70000006 /* base address for the executable/DSO */ |
| 231 | #define DT_MIPS_CONFLICT 0x70000008 /* address of .conflict section */ |
| 232 | #define DT_MIPS_LIBLIST	0x70000009 /* address of .liblist section */ |
| 233 | #define DT_MIPS_LOCAL_GOTNO 0x7000000A /* number of local GOT entries */ |
| 234 | #define DT_MIPS_CONFLICTNO 0x7000000B /* number of entries in the .conflict section */ |
| 235 | #define DT_MIPS_LIBLISTNO 0x70000010 /* number of entries in the .liblist section */ |
| 236 | #define DT_MIPS_SYMTABNO 0x70000011 /* number of entries in the .dynsym section */ |
| 237 | #define DT_MIPS_UNREFEXTNO 0x70000012 /* index of first external dynamic symbol not referenced locally */ |
| 238 | #define DT_MIPS_GOTSYM	0x70000013 /* index of first dynamic symbol corresponds to a GOT entry */ |
| 239 | #define DT_MIPS_HIPAGENO 0x70000014 /* number of page table entries in GOT */ |
| 240 | #define DT_MIPS_RLD_MAP	0x70000016 /* address of runtime linker map */ |
| 241 | #define DT_MIPS_DELTA_CLASS 0x70000017 /* Delta C++ class definition */ |
| 242 | #define DT_MIPS_DELTA_CLASS_NO 0x70000018 /* number of entries in DT_MIPS_DELTA_CLASS */ |
| 243 | #define DT_MIPS_DELTA_INSTANCE 0x70000019 /* Delta C++ class instances */ |
| 244 | #define DT_MIPS_DELTA_INSTANCE_NO 0x7000001A /* number of entries in DT_MIPS_DELTA_INSTANCE */ |
| 245 | #define DT_MIPS_DELTA_RELOC 0x7000001B /* Delta relocations */ |
| 246 | #define DT_MIPS_DELTA_RELOC_NO 0x7000001C /* number of entries in DT_MIPS_DELTA_RELOC */ |
| 247 | #define DT_MIPS_DELTA_SYM 0x7000001D /* Delta symbols referred by Delta relocations */ |
| 248 | #define DT_MIPS_DELTA_SYM_NO 0x7000001E /* number of entries in DT_MIPS_DELTA_SYM */ |
| 249 | #define DT_MIPS_DELTA_CLASSSYM 0x70000020 /* Delta symbols for class declarations */ |
| 250 | #define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 /* number of entries in DT_MIPS_DELTA_CLASSSYM */ |
| 251 | #define DT_MIPS_CXX_FLAGS 0x70000022 /* C++ flavor flags */ |
| 252 | #define DT_MIPS_PIXIE_INIT 0x70000023 /* address of an initialization routine created by pixie */ |
| 253 | #define DT_MIPS_SYMBOL_LIB 0x70000024 /* address of .MIPS.symlib section */ |
| 254 | #define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 /* GOT index of first page table entry for a segment */ |
| 255 | #define DT_MIPS_LOCAL_GOTIDX 0x70000026 /* GOT index of first page table entry for a local symbol */ |
| 256 | #define DT_MIPS_HIDDEN_GOTIDX 0x70000027 /* GOT index of first page table entry for a hidden symbol */ |
| 257 | #define DT_MIPS_PROTECTED_GOTIDX 0x70000028 /* GOT index of first page table entry for a protected symbol */ |
| 258 | #define DT_MIPS_OPTIONS	0x70000029 /* address of .MIPS.options section */ |
| 259 | #define DT_MIPS_INTERFACE 0x7000002A /* address of .MIPS.interface section */ |
| 260 | #define DT_MIPS_DYNSTR_ALIGN 0x7000002B /* ??? */ |
| 261 | #define DT_MIPS_INTERFACE_SIZE 0x7000002C /* size of .MIPS.interface section */ |
| 262 | #define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002D /* address of _rld_text_resolve in GOT */ |
| 263 | #define DT_MIPS_PERF_SUFFIX 0x7000002E /* default suffix of DSO to be appended by dlopen */ |
| 264 | #define DT_MIPS_COMPACT_SIZE 0x7000002F /* size of a ucode compact relocation record (o32) */ |
| 265 | #define DT_MIPS_GP_VALUE 0x70000030 /* GP value of a specified GP relative range */ |
| 266 | #define DT_MIPS_AUX_DYNAMIC 0x70000031 /* address of an auxiliary dynamic table */ |
| 267 | #define DT_MIPS_PLTGOT	0x70000032 /* address of the PLTGOT */ |
| 268 | #define DT_MIPS_RLD_OBJ_UPDATE 0x70000033 /* object list update callback */ |
| 269 | #define DT_MIPS_RWPLT	0x70000034 /* address of a writable PLT */ |
| 270 | #define DT_PPC_GOT	0x70000000 /* value of _GLOBAL_OFFSET_TABLE_ */ |
| 271 | #define DT_PPC_TLSOPT	0x70000001 /* TLS descriptor should be optimized */ |
| 272 | #define DT_PPC64_GLINK	0x70000000 /* address of .glink section */ |
| 273 | #define DT_PPC64_OPD	0x70000001 /* address of .opd section */ |
| 274 | #define DT_PPC64_OPDSZ	0x70000002 /* size of .opd section */ |
| 275 | #define DT_PPC64_TLSOPT	0x70000003 /* TLS descriptor should be optimized */ |
| 276 | #define DT_AUXILIARY	0x7FFFFFFD /* offset of string naming auxiliary filtees */ |
| 277 | #define DT_USED		0x7FFFFFFE /* ignored */ |
| 278 | #define DT_FILTER	0x7FFFFFFF /* index of string naming filtees */ |
| 279 | #define DT_HIPROC	0x7FFFFFFF /* end of processor-specific types */ |
| 280 | |
| 281 | |
| 282 | /* Aliases for dynamic linking entry symbols. */ |
| 283 | |
| 284 | #define DT_DEPRECATED_SPARC_REGISTER DT_SPARC_REGISTER |
| 285 | |
| 286 | |
| 287 | /* |
| 288 | * Flags used in the executable header (field: e_flags). |
| 289 | */ |
| 290 | |
| 291 | #define EF_ARM_RELEXEC	0x00000001U /* dynamic segment describes only how to relocate segments */ |
| 292 | #define EF_ARM_HASENTRY	0x00000002U /* e_entry contains a program entry point */ |
| 293 | #define EF_ARM_SYMSARESORTED 0x00000004U /* subsection of symbol table is sorted by symbol value */ |
| 294 | #define EF_ARM_DYNSYMSUSESEGIDX 0x00000008U /* dynamic symbol st_shndx = containing segment index + 1 */ |
| 295 | #define EF_ARM_MAPSYMSFIRST 0x00000010U /* mapping symbols precede other local symbols in symtab */ |
| 296 | #define EF_ARM_BE8	0x00800000U /* file contains BE-8 code */ |
| 297 | #define EF_ARM_LE8	0x00400000U /* file contains LE-8 code */ |
| 298 | #define EF_ARM_EABIMASK	0xFF000000U /* mask for ARM EABI version number (0 denotes GNU or unknown) */ |
| 299 | #define EF_ARM_EABI_UNKNOWN 0x00000000U /* Unknown or GNU ARM EABI version number */ |
| 300 | #define EF_ARM_EABI_VER1 0x01000000U /* ARM EABI version 1 */ |
| 301 | #define EF_ARM_EABI_VER2 0x02000000U /* ARM EABI version 2 */ |
| 302 | #define EF_ARM_EABI_VER3 0x03000000U /* ARM EABI version 3 */ |
| 303 | #define EF_ARM_EABI_VER4 0x04000000U /* ARM EABI version 4 */ |
| 304 | #define EF_ARM_EABI_VER5 0x05000000U /* ARM EABI version 5 */ |
| 305 | #define EF_ARM_INTERWORK 0x00000004U /* GNU EABI extension */ |
| 306 | #define EF_ARM_APCS_26	0x00000008U /* GNU EABI extension */ |
| 307 | #define EF_ARM_APCS_FLOAT 0x00000010U /* GNU EABI extension */ |
| 308 | #define EF_ARM_PIC	0x00000020U /* GNU EABI extension */ |
| 309 | #define EF_ARM_ALIGN8	0x00000040U /* GNU EABI extension */ |
| 310 | #define EF_ARM_NEW_ABI	0x00000080U /* GNU EABI extension */ |
| 311 | #define EF_ARM_OLD_ABI	0x00000100U /* GNU EABI extension */ |
| 312 | #define EF_ARM_SOFT_FLOAT 0x00000200U /* GNU EABI extension */ |
| 313 | #define EF_ARM_VFP_FLOAT 0x00000400U /* GNU EABI extension */ |
| 314 | #define EF_ARM_MAVERICK_FLOAT 0x00000800U /* GNU EABI extension */ |
| 315 | #define EF_LOONGARCH_ABI_SOFT_FLOAT 0x00000001U /* LoongArch software floating point emulation */ |
| 316 | #define EF_LOONGARCH_ABI_SINGLE_FLOAT 0x00000002U /* LoongArch 32-bit floating point registers */ |
| 317 | #define EF_LOONGARCH_ABI_DOUBLE_FLOAT 0x00000003U /* LoongArch 64-bit floating point registers */ |
| 318 | #define EF_LOONGARCH_ABI_MODIFIER_MASK 0x00000007U /* LoongArch floating point modifier mask */ |
| 319 | #define EF_LOONGARCH_OBJABI_V0 0x00000000U /* LoongArch object file ABI version 0 */ |
| 320 | #define EF_LOONGARCH_OBJABI_V1 0x00000040U /* LoongArch object file ABI version 1 */ |
| 321 | #define EF_LOONGARCH_OBJABI_MASK 0x000000C0U /* LoongArch object file ABI version mask */ |
| 322 | #define EF_MIPS_NOREORDER 0x00000001U /* at least one .noreorder directive appeared in the source */ |
| 323 | #define EF_MIPS_PIC	0x00000002U /* file contains position independent code */ |
| 324 | #define EF_MIPS_CPIC	0x00000004U /* file code uses standard conventions for calling PIC */ |
| 325 | #define EF_MIPS_UCODE	0x00000010U /* file contains UCODE (obsolete) */ |
| 326 | #define EF_MIPS_ABI	0x00007000U /* Application binary interface, see E_MIPS_* values */ |
| 327 | #define EF_MIPS_ABI2	0x00000020U /* file follows MIPS III 32-bit ABI */ |
| 328 | #define EF_MIPS_OPTIONS_FIRST 0x00000080U /* ld(1) should process .MIPS.options section first */ |
| 329 | #define EF_MIPS_ARCH_ASE 0x0F000000U /* file uses application-specific architectural extensions */ |
| 330 | #define EF_MIPS_ARCH_ASE_MDMX 0x08000000U /* file uses MDMX multimedia extensions */ |
| 331 | #define EF_MIPS_ARCH_ASE_M16 0x04000000U /* file uses MIPS-16 ISA extensions */ |
| 332 | #define EF_MIPS_ARCH_ASE_MICROMIPS 0x02000000U /* MicroMIPS architecture */ |
| 333 | #define EF_MIPS_ARCH	0xF0000000U /* 4-bit MIPS architecture field */ |
| 334 | #define EF_MIPS_ARCH_1	0x00000000U /* MIPS I instruction set */ |
| 335 | #define EF_MIPS_ARCH_2	0x10000000U /* MIPS II instruction set */ |
| 336 | #define EF_MIPS_ARCH_3	0x20000000U /* MIPS III instruction set */ |
| 337 | #define EF_MIPS_ARCH_4	0x30000000U /* MIPS IV instruction set */ |
| 338 | #define EF_MIPS_ARCH_5	0x40000000U /* Never introduced */ |
| 339 | #define EF_MIPS_ARCH_32	0x50000000U /* Mips32 Revision 1 */ |
| 340 | #define EF_MIPS_ARCH_64	0x60000000U /* Mips64 Revision 1 */ |
| 341 | #define EF_MIPS_ARCH_32R2 0x70000000U /* Mips32 Revision 2 */ |
| 342 | #define EF_MIPS_ARCH_64R2 0x80000000U /* Mips64 Revision 2 */ |
| 343 | #define EF_PPC_EMB	0x80000000U /* Embedded PowerPC flag */ |
| 344 | #define EF_PPC_RELOCATABLE 0x00010000U /* -mrelocatable flag */ |
| 345 | #define EF_PPC_RELOCATABLE_LIB 0x00008000U /* -mrelocatable-lib flag */ |
| 346 | #define EF_RISCV_RVC	0x00000001U /* Compressed instruction extension */ |
| 347 | #define EF_RISCV_FLOAT_ABI_MASK 0x00000006U /* Floating point ABI */ |
| 348 | #define EF_RISCV_FLOAT_ABI_SOFT 0x00000000U /* Software emulated floating point */ |
| 349 | #define EF_RISCV_FLOAT_ABI_SINGLE 0x00000002U /* Single precision floating point */ |
| 350 | #define EF_RISCV_FLOAT_ABI_DOUBLE 0x00000004U /* Double precision floating point */ |
| 351 | #define EF_RISCV_FLOAT_ABI_QUAD 0x00000006U /* Quad precision floating point */ |
| 352 | #define EF_RISCV_RVE	0x00000008U /* Compressed instruction ABI */ |
| 353 | #define EF_RISCV_TSO	0x00000010U /* RVTSO memory consistency model */ |
| 354 | #define EF_SPARC_EXT_MASK 0x00FFFF00U /* Vendor Extension mask */ |
| 355 | #define EF_SPARC_32PLUS	0x00000100U /* Generic V8+ features */ |
| 356 | #define EF_SPARC_SUN_US1 0x00000200U /* Sun UltraSPARCTM 1 Extensions */ |
| 357 | #define EF_SPARC_HAL_R1	0x00000400U /* HAL R1 Extensions */ |
| 358 | #define EF_SPARC_SUN_US3 0x00000800U /* Sun UltraSPARC 3 Extensions */ |
| 359 | #define EF_SPARCV9_MM	0x00000003U /* Mask for Memory Model */ |
| 360 | #define EF_SPARCV9_TSO	0x00000000U /* Total Store Ordering */ |
| 361 | #define EF_SPARCV9_PSO	0x00000001U /* Partial Store Ordering */ |
| 362 | #define EF_SPARCV9_RMO	0x00000002U /* Relaxed Memory Ordering */ |
| 363 | |
| 364 | |
| 365 | /* |
| 366 | * Offsets in the ei_ident[] field of an ELF executable header. |
| 367 | */ |
| 368 | |
| 369 | #define EI_MAG0		0 /* magic number */ |
| 370 | #define EI_MAG1		1 /* magic number */ |
| 371 | #define EI_MAG2		2 /* magic number */ |
| 372 | #define EI_MAG3		3 /* magic number */ |
| 373 | #define EI_CLASS	4 /* file class */ |
| 374 | #define EI_DATA		5 /* data encoding */ |
| 375 | #define EI_VERSION	6 /* file version */ |
| 376 | #define EI_OSABI	7 /* OS ABI kind */ |
| 377 | #define EI_ABIVERSION	8 /* OS ABI version */ |
| 378 | #define EI_PAD		9 /* padding start */ |
| 379 | #define EI_NIDENT	16 /* total size */ |
| 380 | |
| 381 | |
| 382 | /* |
| 383 | * The ELF class of an object. |
| 384 | */ |
| 385 | |
| 386 | #define ELFCLASSNONE	0U /* Unknown ELF class */ |
| 387 | #define ELFCLASS32	1U /* 32 bit objects */ |
| 388 | #define ELFCLASS64	2U /* 64 bit objects */ |
| 389 | |
| 390 | |
| 391 | /* |
| 392 | * Endianness of data in an ELF object. |
| 393 | */ |
| 394 | |
| 395 | #define ELFDATANONE	0U /* Unknown data endianness */ |
| 396 | #define ELFDATA2LSB	1U /* little endian */ |
| 397 | #define ELFDATA2MSB	2U /* big endian */ |
| 398 | |
| 399 | |
| 400 | /* |
| 401 | * The magic numbers used in the initial four bytes of an ELF object. |
| 402 | * |
| 403 | * These numbers are: 0x7F, 'E', 'L' and 'F'. |
| 404 | */ |
| 405 | |
| 406 | #define ELFMAG0		0x7FU |
| 407 | #define ELFMAG1		0x45U |
| 408 | #define ELFMAG2		0x4CU |
| 409 | #define ELFMAG3		0x46U |
| 410 | |
| 411 | /* Additional magic-related constants. */ |
| 412 | |
| 413 | #define ELFMAG		"\177ELF" |
| 414 | #define SELFMAG		4 |
| 415 | |
| 416 | |
| 417 | /* |
| 418 | * ELF OS ABI field. |
| 419 | */ |
| 420 | |
| 421 | #define ELFOSABI_NONE	0U /* No extensions or unspecified */ |
| 422 | #define ELFOSABI_SYSV	0U /* SYSV */ |
| 423 | #define ELFOSABI_HPUX	1U /* Hewlett-Packard HP-UX */ |
| 424 | #define ELFOSABI_NETBSD	2U /* NetBSD */ |
| 425 | #define ELFOSABI_GNU	3U /* GNU */ |
| 426 | #define ELFOSABI_HURD	4U /* GNU/HURD */ |
| 427 | #define ELFOSABI_86OPEN	5U /* 86Open Common ABI */ |
| 428 | #define ELFOSABI_SOLARIS 6U /* Sun Solaris */ |
| 429 | #define ELFOSABI_AIX	7U /* AIX */ |
| 430 | #define ELFOSABI_IRIX	8U /* IRIX */ |
| 431 | #define ELFOSABI_FREEBSD 9U /* FreeBSD */ |
| 432 | #define ELFOSABI_TRU64	10U /* Compaq TRU64 UNIX */ |
| 433 | #define ELFOSABI_MODESTO 11U /* Novell Modesto */ |
| 434 | #define ELFOSABI_OPENBSD 12U /* Open BSD */ |
| 435 | #define ELFOSABI_OPENVMS 13U /* Open VMS */ |
| 436 | #define ELFOSABI_NSK	14U /* Hewlett-Packard Non-Stop Kernel */ |
| 437 | #define ELFOSABI_AROS	15U /* Amiga Research OS */ |
| 438 | #define ELFOSABI_FENIXOS 16U /* The FenixOS highly scalable multi-core OS */ |
| 439 | #define ELFOSABI_CLOUDABI 17U /* Nuxi CloudABI */ |
| 440 | #define ELFOSABI_OPENVOS 18U /* Stratus Technologies OpenVOS */ |
| 441 | #define ELFOSABI_ARM_AEABI 64U /* ARM specific symbol versioning extensions */ |
| 442 | #define ELFOSABI_ARM	97U /* ARM ABI */ |
| 443 | #define ELFOSABI_STANDALONE 255U /* Standalone (embedded) application */ |
| 444 | |
| 445 | |
| 446 | /* OS ABI Aliases. */ |
| 447 | |
| 448 | #define ELFOSABI_LINUX	ELFOSABI_GNU |
| 449 | |
| 450 | |
| 451 | /* |
| 452 | * ELF Machine types: (EM_*). |
| 453 | */ |
| 454 | |
| 455 | #define EM_NONE		0U /* No machine */ |
| 456 | #define EM_M32		1U /* AT&T WE 32100 */ |
| 457 | #define EM_SPARC	2U /* SPARC */ |
| 458 | #define EM_386		3U /* Intel 80386 */ |
| 459 | #define EM_68K		4U /* Motorola 68000 */ |
| 460 | #define EM_88K		5U /* Motorola 88000 */ |
| 461 | #define EM_IAMCU	6U /* Intel MCU */ |
| 462 | #define EM_860		7U /* Intel 80860 */ |
| 463 | #define EM_MIPS		8U /* MIPS I Architecture */ |
| 464 | #define EM_S370		9U /* IBM System/370 Processor */ |
| 465 | #define EM_MIPS_RS3_LE	10U /* MIPS RS3000 Little-endian */ |
| 466 | #define EM_PARISC	15U /* Hewlett-Packard PA-RISC */ |
| 467 | #define EM_VPP500	17U /* Fujitsu VPP500 */ |
| 468 | #define EM_SPARC32PLUS	18U /* Enhanced instruction set SPARC */ |
| 469 | #define EM_960		19U /* Intel 80960 */ |
| 470 | #define EM_PPC		20U /* PowerPC */ |
| 471 | #define EM_PPC64	21U /* 64-bit PowerPC */ |
| 472 | #define EM_S390		22U /* IBM System/390 Processor */ |
| 473 | #define EM_SPU		23U /* IBM SPU/SPC */ |
| 474 | #define EM_V800		36U /* NEC V800 */ |
| 475 | #define EM_FR20		37U /* Fujitsu FR20 */ |
| 476 | #define EM_RH32		38U /* TRW RH-32 */ |
| 477 | #define EM_RCE		39U /* Motorola RCE */ |
| 478 | #define EM_ARM		40U /* Advanced RISC Machines ARM */ |
| 479 | #define EM_ALPHA	41U /* Digital Alpha */ |
| 480 | #define EM_SH		42U /* Hitachi SH */ |
| 481 | #define EM_SPARCV9	43U /* SPARC Version 9 */ |
| 482 | #define EM_TRICORE	44U /* Siemens TriCore embedded processor */ |
| 483 | #define EM_ARC		45U /* Argonaut RISC Core, Argonaut Technologies Inc. */ |
| 484 | #define EM_H8_300	46U /* Hitachi H8/300 */ |
| 485 | #define EM_H8_300H	47U /* Hitachi H8/300H */ |
| 486 | #define EM_H8S		48U /* Hitachi H8S */ |
| 487 | #define EM_H8_500	49U /* Hitachi H8/500 */ |
| 488 | #define EM_IA_64	50U /* Intel IA-64 processor architecture */ |
| 489 | #define EM_MIPS_X	51U /* Stanford MIPS-X */ |
| 490 | #define EM_COLDFIRE	52U /* Motorola ColdFire */ |
| 491 | #define EM_68HC12	53U /* Motorola M68HC12 */ |
| 492 | #define EM_MMA		54U /* Fujitsu MMA Multimedia Accelerator */ |
| 493 | #define EM_PCP		55U /* Siemens PCP */ |
| 494 | #define EM_NCPU		56U /* Sony nCPU embedded RISC processor */ |
| 495 | #define EM_NDR1		57U /* Denso NDR1 microprocessor */ |
| 496 | #define EM_STARCORE	58U /* Motorola Star*Core processor */ |
| 497 | #define EM_ME16		59U /* Toyota ME16 processor */ |
| 498 | #define EM_ST100	60U /* STMicroelectronics ST100 processor */ |
| 499 | #define EM_TINYJ	61U /* Advanced Logic Corp. TinyJ embedded processor family */ |
| 500 | #define EM_X86_64	62U /* AMD x86-64 architecture */ |
| 501 | #define EM_PDSP		63U /* Sony DSP Processor */ |
| 502 | #define EM_PDP10	64U /* Digital Equipment Corp. PDP-10 */ |
| 503 | #define EM_PDP11	65U /* Digital Equipment Corp. PDP-11 */ |
| 504 | #define EM_FX66		66U /* Siemens FX66 microcontroller */ |
| 505 | #define EM_ST9PLUS	67U /* STMicroelectronics ST9+ 8/16 bit microcontroller */ |
| 506 | #define EM_ST7		68U /* STMicroelectronics ST7 8-bit microcontroller */ |
| 507 | #define EM_68HC16	69U /* Motorola MC68HC16 Microcontroller */ |
| 508 | #define EM_68HC11	70U /* Motorola MC68HC11 Microcontroller */ |
| 509 | #define EM_68HC08	71U /* Motorola MC68HC08 Microcontroller */ |
| 510 | #define EM_68HC05	72U /* Motorola MC68HC05 Microcontroller */ |
| 511 | #define EM_SVX		73U /* Silicon Graphics SVx */ |
| 512 | #define EM_ST19		74U /* STMicroelectronics ST19 8-bit microcontroller */ |
| 513 | #define EM_VAX		75U /* Digital VAX */ |
| 514 | #define EM_CRIS		76U /* Axis Communications 32-bit embedded processor */ |
| 515 | #define EM_JAVELIN	77U /* Infineon Technologies 32-bit embedded processor */ |
| 516 | #define EM_FIREPATH	78U /* Element 14 64-bit DSP Processor */ |
| 517 | #define EM_ZSP		79U /* LSI Logic 16-bit DSP Processor */ |
| 518 | #define EM_MMIX		80U /* Educational 64-bit processor by Donald Knuth */ |
| 519 | #define EM_HUANY	81U /* Harvard University machine-independent object files */ |
| 520 | #define EM_PRISM	82U /* SiTera Prism */ |
| 521 | #define EM_AVR		83U /* Atmel AVR 8-bit microcontroller */ |
| 522 | #define EM_FR30		84U /* Fujitsu FR30 */ |
| 523 | #define EM_D10V		85U /* Mitsubishi D10V */ |
| 524 | #define EM_D30V		86U /* Mitsubishi D30V */ |
| 525 | #define EM_V850		87U /* NEC v850 */ |
| 526 | #define EM_M32R		88U /* Mitsubishi M32R */ |
| 527 | #define EM_MN10300	89U /* Matsushita MN10300 */ |
| 528 | #define EM_MN10200	90U /* Matsushita MN10200 */ |
| 529 | #define EM_PJ		91U /* picoJava */ |
| 530 | #define EM_OPENRISC	92U /* OpenRISC 32-bit embedded processor */ |
| 531 | #define EM_ARC_COMPACT	93U /* ARC International ARCompact processor */ |
| 532 | #define EM_XTENSA	94U /* Tensilica Xtensa Architecture */ |
| 533 | #define EM_VIDEOCORE	95U /* Alphamosaic VideoCore processor */ |
| 534 | #define EM_TMM_GPP	96U /* Thompson Multimedia General Purpose Processor */ |
| 535 | #define EM_NS32K	97U /* National Semiconductor 32000 series */ |
| 536 | #define EM_TPC		98U /* Tenor Network TPC processor */ |
| 537 | #define EM_SNP1K	99U /* Trebia SNP 1000 processor */ |
| 538 | #define EM_ST200	100U /* STMicroelectronics (www.st.com) ST200 microcontroller */ |
| 539 | #define EM_IP2K		101U /* Ubicom IP2xxx microcontroller family */ |
| 540 | #define EM_MAX		102U /* MAX Processor */ |
| 541 | #define EM_CR		103U /* National Semiconductor CompactRISC microprocessor */ |
| 542 | #define EM_F2MC16	104U /* Fujitsu F2MC16 */ |
| 543 | #define EM_MSP430	105U /* Texas Instruments embedded microcontroller msp430 */ |
| 544 | #define EM_BLACKFIN	106U /* Analog Devices Blackfin (DSP) processor */ |
| 545 | #define EM_SE_C33	107U /* S1C33 Family of Seiko Epson processors */ |
| 546 | #define EM_SEP		108U /* Sharp embedded microprocessor */ |
| 547 | #define EM_ARCA		109U /* Arca RISC Microprocessor */ |
| 548 | #define EM_UNICORE	110U /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */ |
| 549 | #define EM_EXCESS	111U /* eXcess: 16/32/64-bit configurable embedded CPU */ |
| 550 | #define EM_DXP		112U /* Icera Semiconductor Inc. Deep Execution Processor */ |
| 551 | #define EM_ALTERA_NIOS2	113U /* Altera Nios II soft-core processor */ |
| 552 | #define EM_CRX		114U /* National Semiconductor CompactRISC CRX microprocessor */ |
| 553 | #define EM_XGATE	115U /* Motorola XGATE embedded processor */ |
| 554 | #define EM_C166		116U /* Infineon C16x/XC16x processor */ |
| 555 | #define EM_M16C		117U /* Renesas M16C series microprocessors */ |
| 556 | #define EM_DSPIC30F	118U /* Microchip Technology dsPIC30F Digital Signal Controller */ |
| 557 | #define EM_CE		119U /* Freescale Communication Engine RISC core */ |
| 558 | #define EM_M32C		120U /* Renesas M32C series microprocessors */ |
| 559 | #define EM_TSK3000	131U /* Altium TSK3000 core */ |
| 560 | #define EM_RS08		132U /* Freescale RS08 embedded processor */ |
| 561 | #define EM_SHARC	133U /* Analog Devices SHARC family of 32-bit DSP processors */ |
| 562 | #define EM_ECOG2	134U /* Cyan Technology eCOG2 microprocessor */ |
| 563 | #define EM_SCORE7	135U /* Sunplus S+core7 RISC processor */ |
| 564 | #define EM_DSP24	136U /* New Japan Radio (NJR) 24-bit DSP Processor */ |
| 565 | #define EM_VIDEOCORE3	137U /* Broadcom VideoCore III processor */ |
| 566 | #define EM_LATTICEMICO32 138U /* RISC processor for Lattice FPGA architecture */ |
| 567 | #define EM_SE_C17	139U /* Seiko Epson C17 family */ |
| 568 | #define EM_TI_C6000	140U /* The Texas Instruments TMS320C6000 DSP family */ |
| 569 | #define EM_TI_C2000	141U /* The Texas Instruments TMS320C2000 DSP family */ |
| 570 | #define EM_TI_C5500	142U /* The Texas Instruments TMS320C55x DSP family */ |
| 571 | #define EM_TI_ARP32	143U /* Texas Instruments Application Specific RISC Processor, 32bit fetch */ |
| 572 | #define EM_TI_PRU	144U /* Texas Instruments Programmable Realtime Unit */ |
| 573 | #define EM_MMDSP_PLUS	160U /* STMicroelectronics 64bit VLIW Data Signal Processor */ |
| 574 | #define EM_CYPRESS_M8C	161U /* Cypress M8C microprocessor */ |
| 575 | #define EM_R32C		162U /* Renesas R32C series microprocessors */ |
| 576 | #define EM_TRIMEDIA	163U /* NXP Semiconductors TriMedia architecture family */ |
| 577 | #define EM_QDSP6	164U /* QUALCOMM DSP6 Processor */ |
| 578 | #define EM_8051		165U /* Intel 8051 and variants */ |
| 579 | #define EM_STXP7X	166U /* STMicroelectronics STxP7x family of configurable and extensible RISC processors */ |
| 580 | #define EM_NDS32	167U /* Andes Technology compact code size embedded RISC processor family */ |
| 581 | #define EM_ECOG1X	168U /* Cyan Technology eCOG1X family */ |
| 582 | #define EM_MAXQ30	169U /* Dallas Semiconductor MAXQ30 Core Micro-controllers */ |
| 583 | #define EM_XIMO16	170U /* New Japan Radio (NJR) 16-bit DSP Processor */ |
| 584 | #define EM_MANIK	171U /* M2000 Reconfigurable RISC Microprocessor */ |
| 585 | #define EM_CRAYNV2	172U /* Cray Inc. NV2 vector architecture */ |
| 586 | #define EM_RX		173U /* Renesas RX family */ |
| 587 | #define EM_METAG	174U /* Imagination Technologies META processor architecture */ |
| 588 | #define EM_MCST_ELBRUS	175U /* MCST Elbrus general purpose hardware architecture */ |
| 589 | #define EM_ECOG16	176U /* Cyan Technology eCOG16 family */ |
| 590 | #define EM_CR16		177U /* National Semiconductor CompactRISC CR16 16-bit microprocessor */ |
| 591 | #define EM_ETPU		178U /* Freescale Extended Time Processing Unit */ |
| 592 | #define EM_SLE9X	179U /* Infineon Technologies SLE9X core */ |
| 593 | #define EM_L10M		180U /* Intel L10M */ |
| 594 | #define EM_K10M		181U /* Intel K10M */ |
| 595 | #define EM_AARCH64	183U /* AArch64 (64-bit ARM) */ |
| 596 | #define EM_AVR32	185U /* Atmel Corporation 32-bit microprocessor family */ |
| 597 | #define EM_STM8		186U /* STMicroeletronics STM8 8-bit microcontroller */ |
| 598 | #define EM_TILE64	187U /* Tilera TILE64 multicore architecture family */ |
| 599 | #define EM_TILEPRO	188U /* Tilera TILEPro multicore architecture family */ |
| 600 | #define EM_MICROBLAZE	189U /* Xilinx MicroBlaze 32-bit RISC soft processor core */ |
| 601 | #define EM_CUDA		190U /* NVIDIA CUDA architecture */ |
| 602 | #define EM_TILEGX	191U /* Tilera TILE-Gx multicore architecture family */ |
| 603 | #define EM_CLOUDSHIELD	192U /* CloudShield architecture family */ |
| 604 | #define EM_COREA_1ST	193U /* KIPO-KAIST Core-A 1st generation processor family */ |
| 605 | #define EM_COREA_2ND	194U /* KIPO-KAIST Core-A 2nd generation processor family */ |
| 606 | #define EM_ARC_COMPACT2	195U /* Synopsys ARCompact V2 */ |
| 607 | #define EM_OPEN8	196U /* Open8 8-bit RISC soft processor core */ |
| 608 | #define EM_RL78		197U /* Renesas RL78 family */ |
| 609 | #define EM_VIDEOCORE5	198U /* Broadcom VideoCore V processor */ |
| 610 | #define EM_78KOR	199U /* Renesas 78KOR family */ |
| 611 | #define EM_56800EX	200U /* Freescale 56800EX Digital Signal Controller */ |
| 612 | #define EM_BA1		201U /* Beyond BA1 CPU architecture */ |
| 613 | #define EM_BA2		202U /* Beyond BA2 CPU architecture */ |
| 614 | #define EM_XCORE	203U /* XMOS xCORE processor family */ |
| 615 | #define EM_MCHP_PIC	204U /* Microchip 8-bit PIC(r) family */ |
| 616 | #define EM_INTEL205	205U /* Intel Graphics Technology */ |
| 617 | #define EM_INTEL206	206U /* Reserved by Intel */ |
| 618 | #define EM_INTEL207	207U /* Reserved by Intel */ |
| 619 | #define EM_INTEL208	208U /* Reserved by Intel */ |
| 620 | #define EM_INTEL209	209U /* Reserved by Intel */ |
| 621 | #define EM_KM32		210U /* KM211 KM32 32-bit processor */ |
| 622 | #define EM_KMX32	211U /* KM211 KMX32 32-bit processor */ |
| 623 | #define EM_KMX16	212U /* KM211 KMX16 16-bit processor */ |
| 624 | #define EM_KMX8		213U /* KM211 KMX8 8-bit processor */ |
| 625 | #define EM_KVARC	214U /* KM211 KMX32 KVARC processor */ |
| 626 | #define EM_CDP		215U /* Paneve CDP architecture family */ |
| 627 | #define EM_COGE		216U /* Cognitive Smart Memory Processor */ |
| 628 | #define EM_COOL		217U /* Bluechip Systems CoolEngine */ |
| 629 | #define EM_NORC		218U /* Nanoradio Optimized RISC */ |
| 630 | #define EM_CSR_KALIMBA	219U /* CSR Kalimba architecture family */ |
| 631 | #define EM_Z80		220U /* Zilog Z80 */ |
| 632 | #define EM_VISIUM	221U /* Controls and Data Services VISIUMcore processor */ |
| 633 | #define EM_FT32		222U /* FTDI Chip FT32 high performance 32-bit RISC architecture */ |
| 634 | #define EM_MOXIE	223U /* Moxie processor family */ |
| 635 | #define EM_AMDGPU	224U /* AMD GPU architecture */ |
| 636 | #define EM_RISCV	243U /* RISC-V */ |
| 637 | #define EM_LANAI	244U /* Lanai processor */ |
| 638 | #define EM_CEVA		245U /* CEVA Processor Architecture Family */ |
| 639 | #define EM_CEVA_X2	246U /* CEVA X2 Processor Family */ |
| 640 | #define EM_BPF		247U /* Linux BPF – in-kernel virtual machine */ |
| 641 | #define EM_GRAPHCORE_IPU 248U /* Graphcore Intelligent Processing Unit */ |
| 642 | #define EM_IMG1		249U /* Imagination Technologies */ |
| 643 | #define EM_NFP		250U /* Netronome Flow Processor (NFP) */ |
| 644 | #define EM_VE		251U /* NEC Vector Engine */ |
| 645 | #define EM_CSKY		252U /* C-SKY processor family */ |
| 646 | #define EM_ARC_COMPACT3_64 253U /* Synopsys ARCv2.3 64-bit */ |
| 647 | #define EM_MCS6502	254U /* MOS Technology MCS 6502 processor */ |
| 648 | #define EM_ARC_COMPACT3	255U /* Synopsys ARCv2.3 32-bit */ |
| 649 | #define EM_KVX		256U /* Kalray VLIW core of the MPPA processor family */ |
| 650 | #define EM_65816	257U /* WDC 65816/65C816 */ |
| 651 | #define EM_LOONGARCH	258U /* Loongson LoongArch */ |
| 652 | #define EM_KF32		259U /* ChipON KungFu 32 */ |
| 653 | #define EM_U16_U8CORE	260U /* LAPIS nX-U16/U8 */ |
| 654 | #define EM_TACHYUM	261U /* Reserved for Tachyum processor */ |
| 655 | #define EM_56800EF	262U /* NXP 56800EF Digital Signal Controller (DSC) */ |
| 656 | #define EM_SBF		263U /* Solana Bytecode Format */ |
| 657 | #define EM_AIENGINE	264U /* AMD/Xilinx AIEngine architecture */ |
| 658 | #define EM_SIMA_MLA	265U /* SiMa MLA */ |
| 659 | #define EM_BANG		266U /* Cambricon BANG */ |
| 660 | #define EM_LOONGGPU	267U /* Loongson LoongArch GPU */ |
| 661 | |
| 662 | /* Other synonyms. */ |
| 663 | |
| 664 | #define EM_AMD64	EM_X86_64 |
| 665 | #define EM_ARC_A5	EM_ARC_COMPACT |
| 666 | #define EM_ECOG1	EM_ECOG1X |
| 667 | #define EM_INTELGT	EM_INTEL205 |
| 668 | |
| 669 | |
| 670 | /* |
| 671 | * ELF file types: (ET_*). |
| 672 | */ |
| 673 | |
| 674 | #define ET_NONE		0U /* No file type */ |
| 675 | #define ET_REL		1U /* Relocatable object */ |
| 676 | #define ET_EXEC		2U /* Executable */ |
| 677 | #define ET_DYN		3U /* Shared object */ |
| 678 | #define ET_CORE		4U /* Core file */ |
| 679 | #define ET_LOOS		0xFE00U /* Begin OS-specific range */ |
| 680 | #define ET_HIOS		0xFEFFU /* End OS-specific range */ |
| 681 | #define ET_LOPROC	0xFF00U /* Begin processor-specific range */ |
| 682 | #define ET_HIPROC	0xFFFFU /* End processor-specific range */ |
| 683 | |
| 684 | |
| 685 | /* ELF file format version numbers. */ |
| 686 | |
| 687 | #define EV_NONE		0U |
| 688 | #define EV_CURRENT	1U |
| 689 | |
| 690 | |
| 691 | /* |
| 692 | * Flags for section groups. |
| 693 | */ |
| 694 | |
| 695 | #define GRP_COMDAT	0x1 /* COMDAT semantics */ |
| 696 | #define GRP_MASKOS	0x0ff00000 /* OS-specific flags */ |
| 697 | #define GRP_MASKPROC	0xf0000000 /* processor-specific flags */ |
| 698 | |
| 699 | |
| 700 | /* |
| 701 | * Flags / mask for .gnu.versym sections. |
| 702 | */ |
| 703 | |
| 704 | #define VERSYM_VERSION	0x7fff |
| 705 | #define VERSYM_HIDDEN	0x8000 |
| 706 | |
| 707 | |
| 708 | /* |
| 709 | * Flags used by program header table entries. |
| 710 | */ |
| 711 | |
| 712 | #define PF_X		0x1 /* Execute */ |
| 713 | #define PF_W		0x2 /* Write */ |
| 714 | #define PF_R		0x4 /* Read */ |
| 715 | #define PF_MASKOS	0x0ff00000 /* OS-specific flags */ |
| 716 | #define PF_MASKPROC	0xf0000000 /* Processor-specific flags */ |
| 717 | #define PF_ARM_SB	0x10000000 /* segment contains the location addressed by the static base */ |
| 718 | #define PF_ARM_PI	0x20000000 /* segment is position-independent */ |
| 719 | #define PF_ARM_ABS	0x40000000 /* segment must be loaded at its base address */ |
| 720 | |
| 721 | |
| 722 | /* |
| 723 | * Types of program header table entries. |
| 724 | */ |
| 725 | |
| 726 | #define PT_NULL		0U /* ignored entry */ |
| 727 | #define PT_LOAD		1U /* loadable segment */ |
| 728 | #define PT_DYNAMIC	2U /* contains dynamic linking information */ |
| 729 | #define PT_INTERP	3U /* names an interpreter */ |
| 730 | #define PT_NOTE		4U /* auxiliary information */ |
| 731 | #define PT_SHLIB	5U /* reserved */ |
| 732 | #define PT_PHDR		6U /* describes the program header itself */ |
| 733 | #define PT_TLS		7U /* thread local storage */ |
| 734 | #define PT_LOOS		0x60000000U /* start of OS-specific range */ |
| 735 | #define PT_SUNW_UNWIND	0x6464E550U /* Solaris/amd64 stack unwind tables */ |
| 736 | #define PT_GNU_EH_FRAME	0x6474E550U /* GCC generated .eh_frame_hdr segment */ |
| 737 | #define PT_GNU_STACK	0x6474E551U /* Stack flags */ |
| 738 | #define PT_GNU_RELRO	0x6474E552U /* Segment becomes read-only after relocation */ |
| 739 | #define PT_OPENBSD_RANDOMIZE 0x65A3DBE6U /* Segment filled with random data */ |
| 740 | #define PT_OPENBSD_WXNEEDED 0x65A3DBE7U /* Program violates W^X */ |
| 741 | #define PT_OPENBSD_BOOTDATA 0x65A41BE6U /* Boot data */ |
| 742 | #define PT_SUNWBSS	0x6FFFFFFAU /* A Solaris .SUNW_bss section */ |
| 743 | #define PT_SUNWSTACK	0x6FFFFFFBU /* A Solaris process stack */ |
| 744 | #define PT_SUNWDTRACE	0x6FFFFFFCU /* Used by dtrace(1) */ |
| 745 | #define PT_SUNWCAP	0x6FFFFFFDU /* Special hardware capability requirements */ |
| 746 | #define PT_HIOS		0x6FFFFFFFU /* end of OS-specific range */ |
| 747 | #define PT_LOPROC	0x70000000U /* start of processor-specific range */ |
| 748 | #define PT_AARCH64_ARCHEXT 0x70000000U /* platform architecture compatibility information */ |
| 749 | #define PT_AARCH64_UNWIND 0x70000001U /* exception unwinding tables */ |
| 750 | #define PT_AARCH64_MEMTAG_MTE 0x70000002U /* MTE memory tag data dumps in core files */ |
| 751 | #define PT_ARM_ARCHEXT	0x70000000U /* platform architecture compatibility information */ |
| 752 | #define PT_ARM_EXIDX	0x70000001U /* exception unwind tables */ |
| 753 | #define PT_MIPS_REGINFO	0x70000000U /* register usage information */ |
| 754 | #define PT_MIPS_RTPROC	0x70000001U /* runtime procedure table */ |
| 755 | #define PT_MIPS_OPTIONS	0x70000002U /* options segment */ |
| 756 | #define PT_HIPROC	0x7FFFFFFFU /* end of processor-specific range */ |
| 757 | |
| 758 | /* synonyms. */ |
| 759 | |
| 760 | #define PT_ARM_UNWIND	PT_ARM_EXIDX |
| 761 | #define PT_HISUNW	PT_HIOS |
| 762 | #define PT_LOSUNW	PT_SUNWBSS |
| 763 | |
| 764 | |
| 765 | /* |
| 766 | * Section flags. |
| 767 | */ |
| 768 | |
| 769 | #define SHF_WRITE	0x1U /* writable during program execution */ |
| 770 | #define SHF_ALLOC	0x2U /* occupies memory during program execution */ |
| 771 | #define SHF_EXECINSTR	0x4U /* executable instructions */ |
| 772 | #define SHF_MERGE	0x10U /* may be merged to prevent duplication */ |
| 773 | #define SHF_STRINGS	0x20U /* NUL-terminated character strings */ |
| 774 | #define SHF_INFO_LINK	0x40U /* the sh_info field holds a link */ |
| 775 | #define SHF_LINK_ORDER	0x80U /* special ordering requirements during linking */ |
| 776 | #define SHF_OS_NONCONFORMING 0x100U /* requires OS-specific processing during linking */ |
| 777 | #define SHF_GROUP	0x200U /* member of a section group */ |
| 778 | #define SHF_TLS		0x400U /* holds thread-local storage */ |
| 779 | #define SHF_COMPRESSED	0x800U /* holds compressed data */ |
| 780 | #define SHF_MASKOS	0x0FF00000U /* bits reserved for OS-specific semantics */ |
| 781 | #define SHF_AMD64_LARGE	0x10000000U /* section uses large code model */ |
| 782 | #define SHF_ENTRYSECT	0x10000000U /* section contains an entry point (ARM) */ |
| 783 | #define SHF_COMDEF	0x80000000U /* section may be multiply defined in input to link step (ARM) */ |
| 784 | #define SHF_MIPS_GPREL	0x10000000U /* section must be part of global data area */ |
| 785 | #define SHF_MIPS_MERGE	0x20000000U /* section data should be merged to eliminate duplication */ |
| 786 | #define SHF_MIPS_ADDR	0x40000000U /* section data is addressed by default */ |
| 787 | #define SHF_MIPS_STRING	0x80000000U /* section data is string data by default */ |
| 788 | #define SHF_MIPS_NOSTRIP 0x08000000U /* section data may not be stripped */ |
| 789 | #define SHF_MIPS_LOCAL	0x04000000U /* section data local to process */ |
| 790 | #define SHF_MIPS_NAMES	0x02000000U /* linker must generate implicit hidden weak names */ |
| 791 | #define SHF_MIPS_NODUPE	0x01000000U /* linker must retain only one copy */ |
| 792 | #define SHF_ORDERED	0x40000000U /* section is ordered with respect to other sections */ |
| 793 | #define SHF_EXCLUDE	0x80000000U /* section is excluded from executables and shared objects */ |
| 794 | #define SHF_MASKPROC	0xF0000000U /* bits reserved for processor-specific semantics */ |
| 795 | |
| 796 | |
| 797 | /* |
| 798 | * Special section indices. |
| 799 | */ |
| 800 | |
| 801 | #define SHN_UNDEF	0U /* undefined section */ |
| 802 | #define SHN_LORESERVE	0xFF00U /* start of reserved area */ |
| 803 | #define SHN_LOPROC	0xFF00U /* start of processor-specific range */ |
| 804 | #define SHN_BEFORE	0xFF00U /* used for section ordering */ |
| 805 | #define SHN_AFTER	0xFF01U /* used for section ordering */ |
| 806 | #define SHN_AMD64_LCOMMON 0xFF02U /* large common block label */ |
| 807 | #define SHN_MIPS_ACOMMON 0xFF00U /* allocated common symbols in a DSO */ |
| 808 | #define SHN_MIPS_TEXT	0xFF01U /* Reserved (obsolete) */ |
| 809 | #define SHN_MIPS_DATA	0xFF02U /* Reserved (obsolete) */ |
| 810 | #define SHN_MIPS_SCOMMON 0xFF03U /* gp-addressable common symbols */ |
| 811 | #define SHN_MIPS_SUNDEFINED 0xFF04U /* gp-addressable undefined symbols */ |
| 812 | #define SHN_MIPS_LCOMMON 0xFF05U /* local common symbols */ |
| 813 | #define SHN_MIPS_LUNDEFINED 0xFF06U /* local undefined symbols */ |
| 814 | #define SHN_HIPROC	0xFF1FU /* end of processor-specific range */ |
| 815 | #define SHN_LOOS	0xFF20U /* start of OS-specific range */ |
| 816 | #define SHN_SUNW_IGNORE	0xFF3FU /* used by dtrace */ |
| 817 | #define SHN_HIOS	0xFF3FU /* end of OS-specific range */ |
| 818 | #define SHN_ABS		0xFFF1U /* absolute references */ |
| 819 | #define SHN_COMMON	0xFFF2U /* references to COMMON areas */ |
| 820 | #define SHN_XINDEX	0xFFFFU /* extended index */ |
| 821 | #define SHN_HIRESERVE	0xFFFFU /* end of reserved area */ |
| 822 | |
| 823 | |
| 824 | /* |
| 825 | * Section types. |
| 826 | */ |
| 827 | |
| 828 | #define SHT_NULL	0U /* inactive header */ |
| 829 | #define SHT_PROGBITS	1U /* program defined information */ |
| 830 | #define SHT_SYMTAB	2U /* symbol table */ |
| 831 | #define SHT_STRTAB	3U /* string table */ |
| 832 | #define SHT_RELA	4U /* relocation entries with addends */ |
| 833 | #define SHT_HASH	5U /* symbol hash table */ |
| 834 | #define SHT_DYNAMIC	6U /* information for dynamic linking */ |
| 835 | #define SHT_NOTE	7U /* additional notes */ |
| 836 | #define SHT_NOBITS	8U /* section occupying no space */ |
| 837 | #define SHT_REL		9U /* relocation entries without addends */ |
| 838 | #define SHT_SHLIB	10U /* reserved */ |
| 839 | #define SHT_DYNSYM	11U /* symbol table */ |
| 840 | #define SHT_INIT_ARRAY	14U /* pointers to initialization functions */ |
| 841 | #define SHT_FINI_ARRAY	15U /* pointers to termination functions */ |
| 842 | #define SHT_PREINIT_ARRAY 16U /* pointers to functions called before initialization */ |
| 843 | #define SHT_GROUP	17U /* defines a section group */ |
| 844 | #define SHT_SYMTAB_SHNDX 18U /* used for extended section numbering */ |
| 845 | #define SHT_LOOS	0x60000000U /* start of OS-specific range */ |
| 846 | #define SHT_SUNW_dof	0x6FFFFFF4U /* used by dtrace */ |
| 847 | #define SHT_SUNW_cap	0x6FFFFFF5U /* capability requirements */ |
| 848 | #define SHT_GNU_ATTRIBUTES 0x6FFFFFF5U /* object attributes */ |
| 849 | #define SHT_SUNW_SIGNATURE 0x6FFFFFF6U /* module verification signature */ |
| 850 | #define SHT_GNU_HASH	0x6FFFFFF6U /* GNU Hash sections */ |
| 851 | #define SHT_GNU_LIBLIST	0x6FFFFFF7U /* List of libraries to be prelinked */ |
| 852 | #define SHT_SUNW_ANNOTATE 0x6FFFFFF7U /* special section where unresolved references are allowed */ |
| 853 | #define SHT_SUNW_DEBUGSTR 0x6FFFFFF8U /* debugging information */ |
| 854 | #define SHT_CHECKSUM	0x6FFFFFF8U /* checksum for dynamic shared objects */ |
| 855 | #define SHT_SUNW_DEBUG	0x6FFFFFF9U /* debugging information */ |
| 856 | #define SHT_SUNW_move	0x6FFFFFFAU /* information to handle partially initialized symbols */ |
| 857 | #define SHT_SUNW_COMDAT	0x6FFFFFFBU /* section supporting merging of multiple copies of data */ |
| 858 | #define SHT_SUNW_syminfo 0x6FFFFFFCU /* additional symbol information */ |
| 859 | #define SHT_SUNW_verdef	0x6FFFFFFDU /* symbol versioning information */ |
| 860 | #define SHT_SUNW_verneed 0x6FFFFFFEU /* symbol versioning requirements */ |
| 861 | #define SHT_SUNW_versym	0x6FFFFFFFU /* symbol versioning table */ |
| 862 | #define SHT_HIOS	0x6FFFFFFFU /* end of OS-specific range */ |
| 863 | #define SHT_LOPROC	0x70000000U /* start of processor-specific range */ |
| 864 | #define SHT_ARM_EXIDX	0x70000001U /* exception index table */ |
| 865 | #define SHT_ARM_PREEMPTMAP 0x70000002U /* BPABI DLL dynamic linking preemption map */ |
| 866 | #define SHT_ARM_ATTRIBUTES 0x70000003U /* object file compatibility attributes */ |
| 867 | #define SHT_ARM_DEBUGOVERLAY 0x70000004U /* overlay debug information */ |
| 868 | #define SHT_ARM_OVERLAYSECTION 0x70000005U /* overlay debug information */ |
| 869 | #define SHT_MIPS_LIBLIST 0x70000000U /* DSO library information used in link */ |
| 870 | #define SHT_MIPS_MSYM	0x70000001U /* MIPS symbol table extension */ |
| 871 | #define SHT_MIPS_CONFLICT 0x70000002U /* symbol conflicting with DSO-defined symbols */ |
| 872 | #define SHT_MIPS_GPTAB	0x70000003U /* global pointer table */ |
| 873 | #define SHT_MIPS_UCODE	0x70000004U /* reserved */ |
| 874 | #define SHT_MIPS_DEBUG	0x70000005U /* reserved (obsolete debug information) */ |
| 875 | #define SHT_MIPS_REGINFO 0x70000006U /* register usage information */ |
| 876 | #define SHT_MIPS_PACKAGE 0x70000007U /* OSF reserved */ |
| 877 | #define SHT_MIPS_PACKSYM 0x70000008U /* OSF reserved */ |
| 878 | #define SHT_MIPS_RELD	0x70000009U /* dynamic relocation */ |
| 879 | #define SHT_MIPS_IFACE	0x7000000BU /* subprogram interface information */ |
| 880 | #define SHT_MIPS_CONTENT 0x7000000CU /* section content classification */ |
| 881 | #define SHT_MIPS_OPTIONS 0x7000000DU /* general options */ |
| 882 | #define SHT_MIPS_DELTASYM 0x7000001BU /* Delta C++: symbol table */ |
| 883 | #define SHT_MIPS_DELTAINST 0x7000001CU /* Delta C++: instance table */ |
| 884 | #define SHT_MIPS_DELTACLASS 0x7000001DU /* Delta C++: class table */ |
| 885 | #define SHT_MIPS_DWARF	0x7000001EU /* DWARF debug information */ |
| 886 | #define SHT_MIPS_DELTADECL 0x7000001FU /* Delta C++: declarations */ |
| 887 | #define SHT_MIPS_SYMBOL_LIB 0x70000020U /* symbol-to-library mapping */ |
| 888 | #define SHT_MIPS_EVENTS	0x70000021U /* event locations */ |
| 889 | #define SHT_MIPS_TRANSLATE 0x70000022U /* ??? */ |
| 890 | #define SHT_MIPS_PIXIE	0x70000023U /* special pixie sections */ |
| 891 | #define SHT_MIPS_XLATE	0x70000024U /* address translation table */ |
| 892 | #define SHT_MIPS_XLATE_DEBUG 0x70000025U /* SGI internal address translation table */ |
| 893 | #define SHT_MIPS_WHIRL	0x70000026U /* intermediate code */ |
| 894 | #define SHT_MIPS_EH_REGION 0x70000027U /* C++ exception handling region info */ |
| 895 | #define SHT_MIPS_XLATE_OLD 0x70000028U /* obsolete */ |
| 896 | #define SHT_MIPS_PDR_EXCEPTION 0x70000029U /* runtime procedure descriptor table exception information */ |
| 897 | #define SHT_MIPS_ABIFLAGS 0x7000002AU /* ABI flags */ |
| 898 | #define SHT_SPARC_GOTDATA 0x70000000U /* SPARC-specific data */ |
| 899 | #define SHT_X86_64_UNWIND 0x70000001U /* unwind tables for the AMD64 */ |
| 900 | #define SHT_ORDERED	0x7FFFFFFFU /* sort entries in the section */ |
| 901 | #define SHT_HIPROC	0x7FFFFFFFU /* end of processor-specific range */ |
| 902 | #define SHT_LOUSER	0x80000000U /* start of application-specific range */ |
| 903 | #define SHT_HIUSER	0xFFFFFFFFU /* end of application-specific range */ |
| 904 | |
| 905 | /* Aliases for section types. */ |
| 906 | |
| 907 | #define SHT_AMD64_UNWIND SHT_X86_64_UNWIND |
| 908 | #define SHT_GNU_verdef	SHT_SUNW_verdef |
| 909 | #define SHT_GNU_verneed	SHT_SUNW_verneed |
| 910 | #define SHT_GNU_versym	SHT_SUNW_versym |
| 911 | |
| 912 | |
| 913 | #define	PN_XNUM			0xFFFFU /* Use extended section numbering. */ |
| 914 | |
| 915 | /* |
| 916 | * Symbol binding information. |
| 917 | */ |
| 918 | |
| 919 | #define STB_LOCAL	0 /* not visible outside defining object file */ |
| 920 | #define STB_GLOBAL	1 /* visible across all object files being combined */ |
| 921 | #define STB_WEAK	2 /* visible across all object files but with low precedence */ |
| 922 | #define STB_LOOS	10 /* start of OS-specific range */ |
| 923 | #define STB_GNU_UNIQUE	10 /* unique symbol (GNU) */ |
| 924 | #define STB_HIOS	12 /* end of OS-specific range */ |
| 925 | #define STB_LOPROC	13 /* start of processor-specific range */ |
| 926 | #define STB_HIPROC	15 /* end of processor-specific range */ |
| 927 | |
| 928 | |
| 929 | /* |
| 930 | * Symbol types |
| 931 | */ |
| 932 | |
| 933 | #define STT_NOTYPE	0 /* unspecified type */ |
| 934 | #define STT_OBJECT	1 /* data object */ |
| 935 | #define STT_FUNC	2 /* executable code */ |
| 936 | #define STT_SECTION	3 /* section */ |
| 937 | #define STT_FILE	4 /* source file */ |
| 938 | #define STT_COMMON	5 /* uninitialized common block */ |
| 939 | #define STT_TLS		6 /* thread local storage */ |
| 940 | #define STT_LOOS	10 /* start of OS-specific types */ |
| 941 | #define STT_GNU_IFUNC	10 /* indirect function */ |
| 942 | #define STT_HIOS	12 /* end of OS-specific types */ |
| 943 | #define STT_LOPROC	13 /* start of processor-specific types */ |
| 944 | #define STT_ARM_TFUNC	13 /* Thumb function (GNU) */ |
| 945 | #define STT_ARM_16BIT	15 /* Thumb label (GNU) */ |
| 946 | #define STT_SPARC_REGISTER 13 /* SPARC register information */ |
| 947 | #define STT_HIPROC	15 /* end of processor-specific types */ |
| 948 | |
| 949 | /* Additional constants related to symbol types. */ |
| 950 | |
| 951 | #define STT_NUM		7 /* the number of symbol types */ |
| 952 | |
| 953 | |
| 954 | /* |
| 955 | * Symbol binding. |
| 956 | */ |
| 957 | |
| 958 | #define SYMINFO_BT_SELF	0xFFFFU /* bound to self */ |
| 959 | #define SYMINFO_BT_PARENT 0xFFFEU /* bound to parent */ |
| 960 | #define SYMINFO_BT_NONE	0xFFFDU /* no special binding */ |
| 961 | |
| 962 | |
| 963 | /* |
| 964 | * Symbol visibility. |
| 965 | */ |
| 966 | |
| 967 | #define STV_DEFAULT	0 /* as specified by symbol type */ |
| 968 | #define STV_INTERNAL	1 /* as defined by processor semantics */ |
| 969 | #define STV_HIDDEN	2 /* hidden from other components */ |
| 970 | #define STV_PROTECTED	3 /* local references are not preemptable */ |
| 971 | |
| 972 | |
| 973 | /* |
| 974 | * Symbol flags. |
| 975 | */ |
| 976 | |
| 977 | #define SYMINFO_FLG_DIRECT 0x01 /* directly assocated reference */ |
| 978 | #define SYMINFO_FLG_COPY 0x04 /* definition by copy-relocation */ |
| 979 | #define SYMINFO_FLG_LAZYLOAD 0x08 /* object should be lazily loaded */ |
| 980 | #define SYMINFO_FLG_DIRECTBIND 0x10 /* reference should be directly bound */ |
| 981 | #define SYMINFO_FLG_NOEXTDIRECT 0x20 /* external references not allowed to bind to definition */ |
| 982 | |
| 983 | |
| 984 | /* |
| 985 | * Versioning dependencies. |
| 986 | */ |
| 987 | |
| 988 | #define VER_NDX_LOCAL	0 /* local scope */ |
| 989 | #define VER_NDX_GLOBAL	1 /* global scope */ |
| 990 | |
| 991 | |
| 992 | /* |
| 993 | * Versioning flags. |
| 994 | */ |
| 995 | |
| 996 | #define VER_FLG_BASE	0x1 /* file version */ |
| 997 | #define VER_FLG_WEAK	0x2 /* weak version */ |
| 998 | |
| 999 | |
| 1000 | /* |
| 1001 | * Versioning needs |
| 1002 | */ |
| 1003 | |
| 1004 | #define VER_NEED_NONE	0 /* invalid version */ |
| 1005 | #define VER_NEED_CURRENT 1 /* current version */ |
| 1006 | |
| 1007 | |
| 1008 | /* |
| 1009 | * Versioning numbers. |
| 1010 | */ |
| 1011 | |
| 1012 | #define VER_DEF_NONE	0 /* invalid version */ |
| 1013 | #define VER_DEF_CURRENT	1 /* current version */ |
| 1014 | |
| 1015 | |
| 1016 | /** |
| 1017 | ** Relocation types. |
| 1018 | **/ |
| 1019 | |
| 1020 | |
| 1021 | /* EM_386 */ |
| 1022 | #define R_386_NONE	0 |
| 1023 | #define R_386_32	1 |
| 1024 | #define R_386_PC32	2 |
| 1025 | #define R_386_GOT32	3 |
| 1026 | #define R_386_PLT32	4 |
| 1027 | #define R_386_COPY	5 |
| 1028 | #define R_386_GLOB_DAT	6 |
| 1029 | #define R_386_JUMP_SLOT	7 |
| 1030 | #define R_386_RELATIVE	8 |
| 1031 | #define R_386_GOTOFF	9 |
| 1032 | #define R_386_GOTPC	10 |
| 1033 | #define R_386_32PLT	11 |
| 1034 | 	/* unused: 12-13 */ |
| 1035 | #define R_386_TLS_TPOFF	14 |
| 1036 | #define R_386_TLS_IE	15 |
| 1037 | #define R_386_TLS_GOTIE	16 |
| 1038 | #define R_386_TLS_LE	17 |
| 1039 | #define R_386_TLS_GD	18 |
| 1040 | #define R_386_TLS_LDM	19 |
| 1041 | #define R_386_16	20 |
| 1042 | #define R_386_PC16	21 |
| 1043 | #define R_386_8		22 |
| 1044 | #define R_386_PC8	23 |
| 1045 | #define R_386_TLS_GD_32	24 |
| 1046 | #define R_386_TLS_GD_PUSH 25 |
| 1047 | #define R_386_TLS_GD_CALL 26 |
| 1048 | #define R_386_TLS_GD_POP 27 |
| 1049 | #define R_386_TLS_LDM_32 28 |
| 1050 | #define R_386_TLS_LDM_PUSH 29 |
| 1051 | #define R_386_TLS_LDM_CALL 30 |
| 1052 | #define R_386_TLS_LDM_POP 31 |
| 1053 | #define R_386_TLS_LDO_32 32 |
| 1054 | #define R_386_TLS_IE_32	33 |
| 1055 | #define R_386_TLS_LE_32	34 |
| 1056 | #define R_386_TLS_DTPMOD32 35 |
| 1057 | #define R_386_TLS_DTPOFF32 36 |
| 1058 | #define R_386_TLS_TPOFF32 37 |
| 1059 | #define R_386_SIZE32	38 |
| 1060 | #define R_386_TLS_GOTDESC 39 |
| 1061 | #define R_386_TLS_DESC_CALL 40 |
| 1062 | #define R_386_TLS_DESC	41 |
| 1063 | #define R_386_IRELATIVE	42 |
| 1064 | #define R_386_GOT32X	43 |
| 1065 | |
| 1066 | |
| 1067 | /* EM_AARCH64 */ |
| 1068 | #define R_AARCH64_NONE	0 |
| 1069 | #define R_AARCH64_P32_ABS32 1 |
| 1070 | #define R_AARCH64_P32_ABS16 2 |
| 1071 | #define R_AARCH64_P32_PREL32 3 |
| 1072 | #define R_AARCH64_P32_PREL16 4 |
| 1073 | #define R_AARCH64_P32_MOVW_UABS_G0 5 |
| 1074 | #define R_AARCH64_P32_MOVW_UABS_G0_NC 6 |
| 1075 | #define R_AARCH64_P32_MOVW_UABS_G1 7 |
| 1076 | #define R_AARCH64_P32_MOVW_SABS_G0 8 |
| 1077 | #define R_AARCH64_P32_LD_PREL_LO19 9 |
| 1078 | #define R_AARCH64_P32_ADR_PREL_LO21 10 |
| 1079 | #define R_AARCH64_P32_ADR_PREL_PG_HI21 11 |
| 1080 | #define R_AARCH64_P32_ADD_ABS_LO12_NC 12 |
| 1081 | #define R_AARCH64_P32_LDST8_ABS_LO12_NC 13 |
| 1082 | #define R_AARCH64_P32_LDST16_ABS_LO12_NC 14 |
| 1083 | #define R_AARCH64_P32_LDST32_ABS_LO12_NC 15 |
| 1084 | #define R_AARCH64_P32_LDST64_ABS_LO12_NC 16 |
| 1085 | #define R_AARCH64_P32_LDST128_ABS_LO12_NC 17 |
| 1086 | #define R_AARCH64_P32_TSTBR14 18 |
| 1087 | #define R_AARCH64_P32_CONDBR19 19 |
| 1088 | #define R_AARCH64_P32_JUMP26 20 |
| 1089 | #define R_AARCH64_P32_CALL26 21 |
| 1090 | #define R_AARCH64_P32_MOVW_PREL_G0 22 |
| 1091 | #define R_AARCH64_P32_MOVW_PREL_G0_NC 23 |
| 1092 | #define R_AARCH64_P32_MOVW_PREL_G1 24 |
| 1093 | #define R_AARCH64_P32_GOT_LD_PREL19 25 |
| 1094 | #define R_AARCH64_P32_ADR_GOT_PAGE 26 |
| 1095 | #define R_AARCH64_P32_LD32_GOT_LO12_NC 27 |
| 1096 | #define R_AARCH64_P32_LD32_GOTPAGE_LO14 28 |
| 1097 | #define R_AARCH64_P32_PLT32 29 |
| 1098 | 	/* Unused: 30-79. */ |
| 1099 | #define R_AARCH64_P32_TLSGD_ADR_PREL21 80 |
| 1100 | #define R_AARCH64_P32_TLSGD_ADR_PAGE21 81 |
| 1101 | #define R_AARCH64_P32_TLSGD_ADD_LO12_NC 82 |
| 1102 | #define R_AARCH64_P32_TLSLD_ADR_PREL21 83 |
| 1103 | #define R_AARCH64_P32_TLSLD_ADR_PAGE21 84 |
| 1104 | #define R_AARCH64_P32_TLSLD_ADD_LO12_NC 85 |
| 1105 | #define R_AARCH64_P32_TLSLD_LD_PREL19 86 |
| 1106 | #define R_AARCH64_P32_TLSLD_MOVW_DTPREL_G1 87 |
| 1107 | #define R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0 88 |
| 1108 | #define R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0_NC 89 |
| 1109 | #define R_AARCH64_P32_TLSLD_ADD_DTPREL_HI12 90 |
| 1110 | #define R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12 91 |
| 1111 | #define R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12_NC 92 |
| 1112 | #define R_AARCH64_P32_TLSLD_LDST8_DTPREL_LO12 93 |
| 1113 | #define R_AARCH64_P32_TLSLD_LDST8_DTPREL_LO12_NC 94 |
| 1114 | #define R_AARCH64_P32_TLSLD_LDST16_DTPREL_LO12 95 |
| 1115 | #define R_AARCH64_P32_TLSLD_LDST16_DTPREL_LO12_NC 96 |
| 1116 | #define R_AARCH64_P32_TLSLD_LDST32_DTPREL_LO12 97 |
| 1117 | #define R_AARCH64_P32_TLSLD_LDST32_DTPREL_LO12_NC 98 |
| 1118 | #define R_AARCH64_P32_TLSLD_LDST64_DTPREL_LO12 99 |
| 1119 | #define R_AARCH64_P32_TLSLD_LDST64_DTPREL_LO12_NC 100 |
| 1120 | #define R_AARCH64_P32_TLSLD_LDST128_DTPREL_LO12 101 |
| 1121 | #define R_AARCH64_P32_TLSLD_LDST128_DTPREL_LO12_NC 102 |
| 1122 | #define R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21 103 |
| 1123 | #define R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC 104 |
| 1124 | #define R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19 105 |
| 1125 | #define R_AARCH64_P32_TLSLE_MOVW_TPREL_G1 106 |
| 1126 | #define R_AARCH64_P32_TLSLE_MOVW_TPREL_G0 107 |
| 1127 | #define R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC 108 |
| 1128 | #define R_AARCH64_P32_TLSLE_ADD_TPREL_HI12 109 |
| 1129 | #define R_AARCH64_P32_TLSLE_ADD_TPREL_LO12 110 |
| 1130 | #define R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC 111 |
| 1131 | #define R_AARCH64_P32_TLSLE_LDST8_TPREL_LO12 112 |
| 1132 | #define R_AARCH64_P32_TLSLE_LDST8_TPREL_LO12_NC 113 |
| 1133 | #define R_AARCH64_P32_TLSLE_LDST16_TPREL_LO12 114 |
| 1134 | #define R_AARCH64_P32_TLSLE_LDST16_TPREL_LO12_NC 115 |
| 1135 | #define R_AARCH64_P32_TLSLE_LDST32_TPREL_LO12 116 |
| 1136 | #define R_AARCH64_P32_TLSLE_LDST32_TPREL_LO12_NC 117 |
| 1137 | #define R_AARCH64_P32_TLSLE_LDST64_TPREL_LO12 118 |
| 1138 | #define R_AARCH64_P32_TLSLE_LDST64_TPREL_LO12_NC 119 |
| 1139 | #define R_AARCH64_P32_TLSLE_LDST128_TPREL_LO12 120 |
| 1140 | #define R_AARCH64_P32_TLSLE_LDST128_TPREL_LO12_NC 121 |
| 1141 | #define R_AARCH64_P32_TLSDESC_LD_PREL19 122 |
| 1142 | #define R_AARCH64_P32_TLSDESC_ADR_PREL21 123 |
| 1143 | #define R_AARCH64_P32_TLSDESC_ADR_PAGE21 124 |
| 1144 | #define R_AARCH64_P32_TLSDESC_LD32_LO12 125 |
| 1145 | #define R_AARCH64_P32_TLSDESC_ADD_LO12 126 |
| 1146 | #define R_AARCH64_P32_TLSDESC_CALL 127 |
| 1147 | 	/* Unused: 128-179. */ |
| 1148 | #define R_AARCH64_P32_COPY 180 |
| 1149 | #define R_AARCH64_P32_GLOB_DAT 181 |
| 1150 | #define R_AARCH64_P32_JUMP_SLOT 182 |
| 1151 | #define R_AARCH64_P32_RELATIVE 183 |
| 1152 | #define R_AARCH64_P32_TLS_IMPDEF1 184 /* R_AARCH64_P32_TLS_DTPREL or R_AARCH64_P32_TLS_DTPMOD. */ |
| 1153 | #define R_AARCH64_P32_TLS_IMPDEF2 185 /* R_AARCH64_P32_TLS_DTPMOD or R_AARCH64_P32_TLS_DTPREL. */ |
| 1154 | #define R_AARCH64_P32_TLS_TPREL 186 |
| 1155 | #define R_AARCH64_P32_TLSDESC 187 |
| 1156 | #define R_AARCH64_P32_IRELATIVE 188 |
| 1157 | 	/* Unused: 189-256. */ |
| 1158 | #define R_AARCH64_ABS64	257 |
| 1159 | #define R_AARCH64_ABS32	258 |
| 1160 | #define R_AARCH64_ABS16	259 |
| 1161 | #define R_AARCH64_PREL64 260 |
| 1162 | #define R_AARCH64_PREL32 261 |
| 1163 | #define R_AARCH64_PREL16 262 |
| 1164 | #define R_AARCH64_MOVW_UABS_G0 263 |
| 1165 | #define R_AARCH64_MOVW_UABS_G0_NC 264 |
| 1166 | #define R_AARCH64_MOVW_UABS_G1 265 |
| 1167 | #define R_AARCH64_MOVW_UABS_G1_NC 266 |
| 1168 | #define R_AARCH64_MOVW_UABS_G2 267 |
| 1169 | #define R_AARCH64_MOVW_UABS_G2_NC 268 |
| 1170 | #define R_AARCH64_MOVW_UABS_G3 269 |
| 1171 | #define R_AARCH64_MOVW_SABS_G0 270 |
| 1172 | #define R_AARCH64_MOVW_SABS_G1 271 |
| 1173 | #define R_AARCH64_MOVW_SABS_G2 272 |
| 1174 | #define R_AARCH64_LD_PREL_LO19 273 |
| 1175 | #define R_AARCH64_ADR_PREL_LO21 274 |
| 1176 | #define R_AARCH64_ADR_PREL_PG_HI21 275 |
| 1177 | #define R_AARCH64_ADR_PREL_PG_HI21_NC 276 |
| 1178 | #define R_AARCH64_ADD_ABS_LO12_NC 277 |
| 1179 | #define R_AARCH64_LDST8_ABS_LO12_NC 278 |
| 1180 | #define R_AARCH64_TSTBR14 279 |
| 1181 | #define R_AARCH64_CONDBR19 280 |
| 1182 | 	/* unused: 281 */ |
| 1183 | #define R_AARCH64_JUMP26 282 |
| 1184 | #define R_AARCH64_CALL26 283 |
| 1185 | #define R_AARCH64_LDST16_ABS_LO12_NC 284 |
| 1186 | #define R_AARCH64_LDST32_ABS_LO12_NC 285 |
| 1187 | #define R_AARCH64_LDST64_ABS_LO12_NC 286 |
| 1188 | #define R_AARCH64_MOVW_PREL_G0 287 |
| 1189 | #define R_AARCH64_MOVW_PREL_G0_NC 288 |
| 1190 | #define R_AARCH64_MOVW_PREL_G1 289 |
| 1191 | #define R_AARCH64_MOVW_PREL_G1_NC 290 |
| 1192 | #define R_AARCH64_MOVW_PREL_G2 291 |
| 1193 | #define R_AARCH64_MOVW_PREL_G2_NC 292 |
| 1194 | #define R_AARCH64_MOVW_PREL_G3 293 |
| 1195 | 	/* unused: 294-298 */ |
| 1196 | #define R_AARCH64_LDST128_ABS_LO12_NC 299 |
| 1197 | #define R_AARCH64_MOVW_GOTOFF_G0 300 |
| 1198 | #define R_AARCH64_MOVW_GOTOFF_G0_NC 301 |
| 1199 | #define R_AARCH64_MOVW_GOTOFF_G1 302 |
| 1200 | #define R_AARCH64_MOVW_GOTOFF_G1_NC 303 |
| 1201 | #define R_AARCH64_MOVW_GOTOFF_G2 304 |
| 1202 | #define R_AARCH64_MOVW_GOTOFF_G2_NC 305 |
| 1203 | #define R_AARCH64_MOVW_GOTOFF_G3 306 |
| 1204 | #define R_AARCH64_GOTREL64 307 |
| 1205 | #define R_AARCH64_GOTREL32 308 |
| 1206 | #define R_AARCH64_GOT_LD_PREL19 309 |
| 1207 | #define R_AARCH64_LD64_GOTOFF_LO15 310 |
| 1208 | #define R_AARCH64_ADR_GOT_PAGE 311 |
| 1209 | #define R_AARCH64_LD64_GOT_LO12_NC 312 |
| 1210 | #define R_AARCH64_LD64_GOTPAGE_LO15 313 |
| 1211 | #define R_AARCH64_PLT32	314 |
| 1212 | #define R_AARCH64_GOTPCREL32 315 |
| 1213 | 	/* unused: 316-511 */ |
| 1214 | #define R_AARCH64_TLSGD_ADR_PREL21 512 |
| 1215 | #define R_AARCH64_TLSGD_ADR_PAGE21 513 |
| 1216 | #define R_AARCH64_TLSGD_ADD_LO12_NC 514 |
| 1217 | #define R_AARCH64_TLSGD_MOVW_G1 515 |
| 1218 | #define R_AARCH64_TLSGD_MOVW_G0_NC 516 |
| 1219 | #define R_AARCH64_TLSLD_ADR_PREL21 517 |
| 1220 | #define R_AARCH64_TLSLD_ADR_PAGE21 518 |
| 1221 | #define R_AARCH64_TLSLD_ADD_LO12_NC 519 |
| 1222 | #define R_AARCH64_TLSLD_MOVW_G1 520 |
| 1223 | #define R_AARCH64_TLSLD_MOVW_G0_NC 521 |
| 1224 | #define R_AARCH64_TLSLD_LD_PREL19 522 |
| 1225 | #define R_AARCH64_TLSLD_MOVW_DTPREL_G2 523 |
| 1226 | #define R_AARCH64_TLSLD_MOVW_DTPREL_G1 524 |
| 1227 | #define R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC 525 |
| 1228 | #define R_AARCH64_TLSLD_MOVW_DTPREL_G0 526 |
| 1229 | #define R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC 527 |
| 1230 | #define R_AARCH64_TLSLD_ADD_DTPREL_HI12 528 |
| 1231 | #define R_AARCH64_TLSLD_ADD_DTPREL_LO12 529 |
| 1232 | #define R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC 530 |
| 1233 | #define R_AARCH64_TLSLD_LDST8_DTPREL_LO12 531 |
| 1234 | #define R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 532 |
| 1235 | #define R_AARCH64_TLSLD_LDST16_DTPREL_LO12 533 |
| 1236 | #define R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 534 |
| 1237 | #define R_AARCH64_TLSLD_LDST32_DTPREL_LO12 535 |
| 1238 | #define R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 536 |
| 1239 | #define R_AARCH64_TLSLD_LDST64_DTPREL_LO12 537 |
| 1240 | #define R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 538 |
| 1241 | #define R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 539 |
| 1242 | #define R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 540 |
| 1243 | #define R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 541 |
| 1244 | #define R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 542 |
| 1245 | #define R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 543 |
| 1246 | #define R_AARCH64_TLSLE_MOVW_TPREL_G2 544 |
| 1247 | #define R_AARCH64_TLSLE_MOVW_TPREL_G1 545 |
| 1248 | #define R_AARCH64_TLSLE_MOVW_TPREL_G1_NC 546 |
| 1249 | #define R_AARCH64_TLSLE_MOVW_TPREL_G0 547 |
| 1250 | #define R_AARCH64_TLSLE_MOVW_TPREL_G0_NC 548 |
| 1251 | #define R_AARCH64_TLSLE_ADD_TPREL_HI12 549 |
| 1252 | #define R_AARCH64_TLSLE_ADD_TPREL_LO12 550 |
| 1253 | #define R_AARCH64_TLSLE_ADD_TPREL_LO12_NC 551 |
| 1254 | #define R_AARCH64_TLSLE_LDST8_TPREL_LO12 552 |
| 1255 | #define R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC 553 |
| 1256 | #define R_AARCH64_TLSLE_LDST16_TPREL_LO12 554 |
| 1257 | #define R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC 555 |
| 1258 | #define R_AARCH64_TLSLE_LDST32_TPREL_LO12 556 |
| 1259 | #define R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC 557 |
| 1260 | #define R_AARCH64_TLSLE_LDST64_TPREL_LO12 558 |
| 1261 | #define R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC 559 |
| 1262 | #define R_AARCH64_TLSDESC_LD_PREL19 560 |
| 1263 | #define R_AARCH64_TLSDESC_ADR_PREL21 561 |
| 1264 | #define R_AARCH64_TLSDESC_ADR_PAGE21 562 |
| 1265 | #define R_AARCH64_TLSDESC_LD64_LO12 563 |
| 1266 | #define R_AARCH64_TLSDESC_ADD_LO12 564 |
| 1267 | #define R_AARCH64_TLSDESC_OFF_G1 565 |
| 1268 | #define R_AARCH64_TLSDESC_OFF_G0_NC 566 |
| 1269 | #define R_AARCH64_TLSDESC_LDR 567 |
| 1270 | #define R_AARCH64_TLSDESC_ADD 568 |
| 1271 | #define R_AARCH64_TLSDESC_CALL 569 |
| 1272 | #define R_AARCH64_TLSLE_LDST128_TPREL_LO12 570 |
| 1273 | #define R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC 571 |
| 1274 | #define R_AARCH64_TLSLD_LDST128_DTPREL_LO12 572 |
| 1275 | #define R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 573 |
| 1276 | 	/* unused: 574-579 */ |
| 1277 | #define R_AARCH64_AUTH_ABS64 580 |
| 1278 | #define R_AARCH64_AUTH_MOVW_GOTOFF_G0 581 |
| 1279 | #define R_AARCH64_AUTH_MOVW_GOTOFF_G0_NC 582 |
| 1280 | #define R_AARCH64_AUTH_MOVW_GOTOFF_G1 583 |
| 1281 | #define R_AARCH64_AUTH_MOVW_GOTOFF_G1_NC 584 |
| 1282 | #define R_AARCH64_AUTH_MOVW_GOTOFF_G2 585 |
| 1283 | #define R_AARCH64_AUTH_MOVW_GOTOFF_G2_NC 586 |
| 1284 | #define R_AARCH64_AUTH_MOVW_GOTOFF_G3 587 |
| 1285 | #define R_AARCH64_AUTH_GOT_LD_PREL19 588 |
| 1286 | #define R_AARCH64_AUTH_LD64_GOTOFF_LO15 589 |
| 1287 | #define R_AARCH64_AUTH_ADR_GOT_PAGE 590 |
| 1288 | #define R_AARCH64_AUTH_LD64_GOT_LO12_NC 591 |
| 1289 | #define R_AARCH64_AUTH_LD64_GOTPAGE_LO15 592 |
| 1290 | #define R_AARCH64_AUTH_GOT_ADD_LO12_NC 593 |
| 1291 | #define R_AARCH64_AUTH_GOT_ADR_PREL_LO21 594 |
| 1292 | #define R_AARCH64_AUTH_TLSDESC_ADR_PAGE21 595 |
| 1293 | #define R_AARCH64_AUTH_TLSDESC_LD64_LO12 596 |
| 1294 | #define R_AARCH64_AUTH_TLSDESC_ADD_LO12 597 |
| 1295 | 	/* unused: 598-1023 */ |
| 1296 | #define R_AARCH64_COPY	1024 |
| 1297 | #define R_AARCH64_GLOB_DAT 1025 |
| 1298 | #define R_AARCH64_JUMP_SLOT 1026 |
| 1299 | #define R_AARCH64_RELATIVE 1027 |
| 1300 | #define R_AARCH64_TLS_IMPDEF1 1028 /* R_AARCH64_TLS_DTPREL or R_AARCH64_TLS_DTPMOD. */ |
| 1301 | #define R_AARCH64_TLS_IMPDEF2 1029 /* R_AARCH64_TLS_DTPMOD or R_AARCH64_TLS_DTPREL. */ |
| 1302 | #define R_AARCH64_TLS_TPREL 1030 |
| 1303 | #define R_AARCH64_TLSDESC 1031 |
| 1304 | #define R_AARCH64_IRELATIVE 1032 |
| 1305 | 	/* unused: 1033-1040 */ |
| 1306 | #define R_AARCH64_AUTH_RELATIVE 1041 |
| 1307 | #define R_AARCH64_AUTH_GLOB_DAT 1042 |
| 1308 | #define R_AARCH64_AUTH_TLSDESC 1043 |
| 1309 | #define R_AARCH64_AUTH_IRELATIVE 1044 |
| 1310 | |
| 1311 | |
| 1312 | /* EM_ARM */ |
| 1313 | #define R_ARM_NONE	0 |
| 1314 | #define R_ARM_PC24	1 /* Deprecated. */ |
| 1315 | #define R_ARM_ABS32	2 |
| 1316 | #define R_ARM_REL32	3 |
| 1317 | #define R_ARM_LDR_PC_G0	4 |
| 1318 | #define R_ARM_ABS16	5 |
| 1319 | #define R_ARM_ABS12	6 |
| 1320 | #define R_ARM_THM_ABS5	7 |
| 1321 | #define R_ARM_ABS8	8 |
| 1322 | #define R_ARM_SBREL32	9 |
| 1323 | #define R_ARM_THM_CALL	10 |
| 1324 | #define R_ARM_THM_PC8	11 |
| 1325 | #define R_ARM_BREL_ADJ	12 |
| 1326 | #define R_ARM_TLS_DESC	13 |
| 1327 | #define R_ARM_THM_SWI8	14 /* Obsolete. */ |
| 1328 | #define R_ARM_XPC25	15 /* Obsolete. */ |
| 1329 | #define R_ARM_THM_XPC22	16 /* Obsolete. */ |
| 1330 | #define R_ARM_TLS_DTPMOD32 17 |
| 1331 | #define R_ARM_TLS_DTPOFF32 18 |
| 1332 | #define R_ARM_TLS_TPOFF32 19 |
| 1333 | #define R_ARM_COPY	20 |
| 1334 | #define R_ARM_GLOB_DAT	21 |
| 1335 | #define R_ARM_JUMP_SLOT	22 |
| 1336 | #define R_ARM_RELATIVE	23 |
| 1337 | #define R_ARM_GOTOFF32	24 |
| 1338 | #define R_ARM_BASE_PREL	25 |
| 1339 | #define R_ARM_GOT_BREL	26 |
| 1340 | #define R_ARM_PLT32	27 /* Deprecated. */ |
| 1341 | #define R_ARM_CALL	28 |
| 1342 | #define R_ARM_JUMP24	29 |
| 1343 | #define R_ARM_THM_JUMP24 30 |
| 1344 | #define R_ARM_BASE_ABS	31 |
| 1345 | #define R_ARM_ALU_PCREL_7_0 32 /* Obsolete. */ |
| 1346 | #define R_ARM_ALU_PCREL_15_8 33 /* Obsolete. */ |
| 1347 | #define R_ARM_ALU_PCREL_23_15 34 /* Obsolete. */ |
| 1348 | #define R_ARM_LDR_SBREL_11_0_NC 35 /* Deprecated. */ |
| 1349 | #define R_ARM_ALU_SBREL_19_12_NC 36 /* Deprecated. */ |
| 1350 | #define R_ARM_ALU_SBREL_27_20_CK 37 /* Deprecated. */ |
| 1351 | #define R_ARM_TARGET1	38 |
| 1352 | #define R_ARM_SBREL31	39 /* Deprecated. */ |
| 1353 | #define R_ARM_V4BX	40 |
| 1354 | #define R_ARM_TARGET2	41 |
| 1355 | #define R_ARM_PREL31	42 |
| 1356 | #define R_ARM_MOVW_ABS_NC 43 |
| 1357 | #define R_ARM_MOVT_ABS	44 |
| 1358 | #define R_ARM_MOVW_PREL_NC 45 |
| 1359 | #define R_ARM_MOVT_PREL	46 |
| 1360 | #define R_ARM_THM_MOVW_ABS_NC 47 |
| 1361 | #define R_ARM_THM_MOVT_ABS 48 |
| 1362 | #define R_ARM_THM_MOVW_PREL_NC 49 |
| 1363 | #define R_ARM_THM_MOVT_PREL 50 |
| 1364 | #define R_ARM_THM_JUMP19 51 |
| 1365 | #define R_ARM_THM_JUMP6	52 |
| 1366 | #define R_ARM_THM_ALU_PREL_11_0 53 |
| 1367 | #define R_ARM_THM_PC12	54 |
| 1368 | #define R_ARM_ABS32_NOI	55 |
| 1369 | #define R_ARM_REL32_NOI	56 |
| 1370 | #define R_ARM_ALU_PC_G0_NC 57 |
| 1371 | #define R_ARM_ALU_PC_G0	58 |
| 1372 | #define R_ARM_ALU_PC_G1_NC 59 |
| 1373 | #define R_ARM_ALU_PC_G1	60 |
| 1374 | #define R_ARM_ALU_PC_G2	61 |
| 1375 | #define R_ARM_LDR_PC_G1	62 |
| 1376 | #define R_ARM_LDR_PC_G2	63 |
| 1377 | #define R_ARM_LDRS_PC_G0 64 |
| 1378 | #define R_ARM_LDRS_PC_G1 65 |
| 1379 | #define R_ARM_LDRS_PC_G2 66 |
| 1380 | #define R_ARM_LDC_PC_G0	67 |
| 1381 | #define R_ARM_LDC_PC_G1	68 |
| 1382 | #define R_ARM_LDC_PC_G2	69 |
| 1383 | #define R_ARM_ALU_SB_G0_NC 70 |
| 1384 | #define R_ARM_ALU_SB_G0	71 |
| 1385 | #define R_ARM_ALU_SB_G1_NC 72 |
| 1386 | #define R_ARM_ALU_SB_G1	73 |
| 1387 | #define R_ARM_ALU_SB_G2	74 |
| 1388 | #define R_ARM_LDR_SB_G0	75 |
| 1389 | #define R_ARM_LDR_SB_G1	76 |
| 1390 | #define R_ARM_LDR_SB_G2	77 |
| 1391 | #define R_ARM_LDRS_SB_G0 78 |
| 1392 | #define R_ARM_LDRS_SB_G1 79 |
| 1393 | #define R_ARM_LDRS_SB_G2 80 |
| 1394 | #define R_ARM_LDC_SB_G0	81 |
| 1395 | #define R_ARM_LDC_SB_G1	82 |
| 1396 | #define R_ARM_LDC_SB_G2	83 |
| 1397 | #define R_ARM_MOVW_BREL_NC 84 |
| 1398 | #define R_ARM_MOVT_BREL	85 |
| 1399 | #define R_ARM_MOVW_BREL	86 |
| 1400 | #define R_ARM_THM_MOVW_BREL_NC 87 |
| 1401 | #define R_ARM_THM_MOVT_BREL 88 |
| 1402 | #define R_ARM_THM_MOVW_BREL 89 |
| 1403 | #define R_ARM_TLS_GOTDESC 90 |
| 1404 | #define R_ARM_TLS_CALL	91 |
| 1405 | #define R_ARM_TLS_DESCSEQ 92 |
| 1406 | #define R_ARM_THM_TLS_CALL 93 |
| 1407 | #define R_ARM_PLT32_ABS	94 |
| 1408 | #define R_ARM_GOT_ABS	95 |
| 1409 | #define R_ARM_GOT_PREL	96 |
| 1410 | #define R_ARM_GOT_BREL12 97 |
| 1411 | #define R_ARM_GOTOFF12	98 |
| 1412 | #define R_ARM_GOTRELAX	99 |
| 1413 | #define R_ARM_GNU_VTENTRY 100 /* Deprecated. */ |
| 1414 | #define R_ARM_GNU_VTINHERIT 101 /* Deprecated. */ |
| 1415 | #define R_ARM_THM_JUMP11 102 |
| 1416 | #define R_ARM_THM_JUMP8	103 |
| 1417 | #define R_ARM_TLS_GD32	104 |
| 1418 | #define R_ARM_TLS_LDM32	105 |
| 1419 | #define R_ARM_TLS_LDO32	106 |
| 1420 | #define R_ARM_TLS_IE32	107 |
| 1421 | #define R_ARM_TLS_LE32	108 |
| 1422 | #define R_ARM_TLS_LDO12	109 |
| 1423 | #define R_ARM_TLS_LE12	110 |
| 1424 | #define R_ARM_TLS_IE12GP 111 |
| 1425 | #define R_ARM_PRIVATE_0	112 |
| 1426 | #define R_ARM_PRIVATE_1	113 |
| 1427 | #define R_ARM_PRIVATE_2	114 |
| 1428 | #define R_ARM_PRIVATE_3	115 |
| 1429 | #define R_ARM_PRIVATE_4	116 |
| 1430 | #define R_ARM_PRIVATE_5	117 |
| 1431 | #define R_ARM_PRIVATE_6	118 |
| 1432 | #define R_ARM_PRIVATE_7	119 |
| 1433 | #define R_ARM_PRIVATE_8	120 |
| 1434 | #define R_ARM_PRIVATE_9	121 |
| 1435 | #define R_ARM_PRIVATE_10 122 |
| 1436 | #define R_ARM_PRIVATE_11 123 |
| 1437 | #define R_ARM_PRIVATE_12 124 |
| 1438 | #define R_ARM_PRIVATE_13 125 |
| 1439 | #define R_ARM_PRIVATE_14 126 |
| 1440 | #define R_ARM_PRIVATE_15 127 |
| 1441 | #define R_ARM_ME_TOO	128 /* Obsolete. */ |
| 1442 | #define R_ARM_THM_TLS_DESCSEQ16 129 |
| 1443 | #define R_ARM_THM_TLS_DESCSEQ32 130 |
| 1444 | #define R_ARM_THM_GOT_BREL12 131 |
| 1445 | #define R_ARM_THM_ALU_ABS_G0_NC 132 |
| 1446 | #define R_ARM_THM_ALU_ABS_G1_NC 133 |
| 1447 | #define R_ARM_THM_ALU_ABS_G2_NC 134 |
| 1448 | #define R_ARM_THM_ALU_ABS_G3 135 |
| 1449 | #define R_ARM_THM_BF16	136 |
| 1450 | #define R_ARM_THM_BF12	137 |
| 1451 | #define R_ARM_THM_BF18	138 |
| 1452 | 	/* Reserved: 139-159. */ |
| 1453 | #define R_ARM_IRELATIVE	160 |
| 1454 | #define R_ARM_PRIVATE_16 161 |
| 1455 | #define R_ARM_PRIVATE_17 162 |
| 1456 | #define R_ARM_PRIVATE_18 163 |
| 1457 | #define R_ARM_PRIVATE_19 164 |
| 1458 | #define R_ARM_PRIVATE_20 165 |
| 1459 | #define R_ARM_PRIVATE_21 166 |
| 1460 | #define R_ARM_PRIVATE_22 167 |
| 1461 | #define R_ARM_PRIVATE_23 168 |
| 1462 | #define R_ARM_PRIVATE_24 169 |
| 1463 | #define R_ARM_PRIVATE_25 170 |
| 1464 | #define R_ARM_PRIVATE_26 171 |
| 1465 | #define R_ARM_PRIVATE_27 172 |
| 1466 | #define R_ARM_PRIVATE_28 173 |
| 1467 | #define R_ARM_PRIVATE_29 174 |
| 1468 | #define R_ARM_PRIVATE_30 175 |
| 1469 | #define R_ARM_PRIVATE_31 176 |
| 1470 | 	/* Reserved: 177-255. */ |
| 1471 | |
| 1472 | |
| 1473 | /* EM_IA_64 */ |
| 1474 | #define R_IA_64_NONE	0 |
| 1475 | 	/* unused: 0x1-0x20 */ |
| 1476 | #define R_IA_64_IMM14	0x21 |
| 1477 | #define R_IA_64_IMM22	0x22 |
| 1478 | #define R_IA_64_IMM64	0x23 |
| 1479 | #define R_IA_64_DIR32MSB 0x24 |
| 1480 | #define R_IA_64_DIR32LSB 0x25 |
| 1481 | #define R_IA_64_DIR64MSB 0x26 |
| 1482 | #define R_IA_64_DIR64LSB 0x27 |
| 1483 | 	/* unused: 0x28-0x29 */ |
| 1484 | #define R_IA_64_GPREL22	0x2a |
| 1485 | #define R_IA_64_GPREL64I 0x2b |
| 1486 | #define R_IA_64_GPREL32MSB 0x2c |
| 1487 | #define R_IA_64_GPREL32LSB 0x2d |
| 1488 | #define R_IA_64_GPREL64MSB 0x2e |
| 1489 | #define R_IA_64_GPREL64LSB 0x2f |
| 1490 | 	/* unused: 0x30-0x31 */ |
| 1491 | #define R_IA_64_LTOFF22	0x32 |
| 1492 | #define R_IA_64_LTOFF64I 0x33 |
| 1493 | 	/* unused: 0x34-0x39 */ |
| 1494 | #define R_IA_64_PLTOFF22 0x3a |
| 1495 | #define R_IA_64_PLTOFF64I 0x3b |
| 1496 | 	/* unused: 0x3c-0x3d */ |
| 1497 | #define R_IA_64_PLTOFF64MSB 0x3e |
| 1498 | #define R_IA_64_PLTOFF64LSB 0x3f |
| 1499 | 	/* unused: 0x40-0x42 */ |
| 1500 | #define R_IA_64_FPTR64I	0x43 |
| 1501 | #define R_IA_64_FPTR32MSB 0x44 |
| 1502 | #define R_IA_64_FPTR32LSB 0x45 |
| 1503 | #define R_IA_64_FPTR64MSB 0x46 |
| 1504 | #define R_IA_64_FPTR64LSB 0x47 |
| 1505 | #define R_IA_64_PCREL60B 0x48 |
| 1506 | #define R_IA_64_PCREL21B 0x49 |
| 1507 | #define R_IA_64_PCREL21M 0x4a |
| 1508 | #define R_IA_64_PCREL21F 0x4b |
| 1509 | #define R_IA_64_PCREL32MSB 0x4c |
| 1510 | #define R_IA_64_PCREL32LSB 0x4d |
| 1511 | #define R_IA_64_PCREL64MSB 0x4e |
| 1512 | #define R_IA_64_PCREL64LSB 0x4f |
| 1513 | 	/* unused: 0x50-0x51 */ |
| 1514 | #define R_IA_64_LTOFF_FPTR22 0x52 |
| 1515 | #define R_IA_64_LTOFF_FPTR64I 0x53 |
| 1516 | #define R_IA_64_LTOFF_FPTR32MSB 0x54 |
| 1517 | #define R_IA_64_LTOFF_FPTR32LSB 0x55 |
| 1518 | #define R_IA_64_LTOFF_FPTR64MSB 0x56 |
| 1519 | #define R_IA_64_LTOFF_FPTR64LSB 0x57 |
| 1520 | 	/* unused: 0x58-0x5b */ |
| 1521 | #define R_IA_64_SEGREL32MSB 0x5c |
| 1522 | #define R_IA_64_SEGREL32LSB 0x5d |
| 1523 | #define R_IA_64_SEGREL64MSB 0x5e |
| 1524 | #define R_IA_64_SEGREL64LSB 0x5f |
| 1525 | 	/* unused: 0x60-0x63 */ |
| 1526 | #define R_IA_64_SECREL32MSB 0x64 |
| 1527 | #define R_IA_64_SECREL32LSB 0x65 |
| 1528 | #define R_IA_64_SECREL64MSB 0x66 |
| 1529 | #define R_IA_64_SECREL64LSB 0x67 |
| 1530 | 	/* unused: 0x68-0x6b */ |
| 1531 | #define R_IA_64_REL32MSB 0x6c |
| 1532 | #define R_IA_64_REL32LSB 0x6d |
| 1533 | #define R_IA_64_REL64MSB 0x6e |
| 1534 | #define R_IA_64_REL64LSB 0x6f |
| 1535 | 	/* unused: 0x70-0x73 */ |
| 1536 | #define R_IA_64_LTV32MSB 0x74 |
| 1537 | #define R_IA_64_LTV32LSB 0x75 |
| 1538 | #define R_IA_64_LTV64MSB 0x76 |
| 1539 | #define R_IA_64_LTV64LSB 0x77 |
| 1540 | 	/* unused: 0x78 */ |
| 1541 | #define R_IA_64_PCREL21BI 0x79 |
| 1542 | #define R_IA_64_PCREL22	0x7A |
| 1543 | #define R_IA_64_PCREL64I 0x7B |
| 1544 | 	/* unused: 0x7C-0x7F */ |
| 1545 | #define R_IA_64_IPLTMSB	0x80 |
| 1546 | #define R_IA_64_IPLTLSB	0x81 |
| 1547 | 	/* unused: 0x82-0x84 */ |
| 1548 | #define R_IA_64_SUB	0x85 |
| 1549 | #define R_IA_64_LTOFF22X 0x86 |
| 1550 | #define R_IA_64_LDXMOV	0x87 |
| 1551 | 	/* unused: 0x88-0x90 */ |
| 1552 | #define R_IA_64_TPREL14	0x91 |
| 1553 | #define R_IA_64_TPREL22	0x92 |
| 1554 | #define R_IA_64_TPREL64I 0x93 |
| 1555 | 	/* unused: 0x94-0x95 */ |
| 1556 | #define R_IA_64_TPREL64MSB 0x96 |
| 1557 | #define R_IA_64_TPREL64LSB 0x97 |
| 1558 | 	/* unused: 0x98-0x99 */ |
| 1559 | #define R_IA_64_LTOFF_TPREL22 0x9A |
| 1560 | 	/* unused: 0x9B-0xA5 */ |
| 1561 | #define R_IA_64_DTPMOD64MSB 0xA6 |
| 1562 | #define R_IA_64_DTPMOD64LSB 0xA7 |
| 1563 | 	/* unused: 0xA8-0xA9 */ |
| 1564 | #define R_IA_64_LTOFF_DTPMOD22 0xAA |
| 1565 | 	/* unused: 0xAB-0xB0 */ |
| 1566 | #define R_IA_64_DTPREL14 0xB1 |
| 1567 | #define R_IA_64_DTPREL22 0xB2 |
| 1568 | #define R_IA_64_DTPREL64I 0xB3 |
| 1569 | #define R_IA_64_DTPREL32MSB 0xB4 |
| 1570 | #define R_IA_64_DTPREL32LSB 0xB5 |
| 1571 | #define R_IA_64_DTPREL64MSB 0xB6 |
| 1572 | #define R_IA_64_DTPREL64LSB 0xB7 |
| 1573 | 	/* unused: 0xB8-0xB9 */ |
| 1574 | #define R_IA_64_LTOFF_DTPREL22 0xBA |
| 1575 | |
| 1576 | |
| 1577 | /* EM_LOONGARCH */ |
| 1578 | #define R_LARCH_NONE	0 |
| 1579 | #define R_LARCH_32	1 |
| 1580 | #define R_LARCH_64	2 |
| 1581 | #define R_LARCH_RELATIVE 3 |
| 1582 | #define R_LARCH_COPY	4 |
| 1583 | #define R_LARCH_JUMP_SLOT 5 |
| 1584 | #define R_LARCH_TLS_DTPMOD32 6 |
| 1585 | #define R_LARCH_TLS_DTPMOD64 7 |
| 1586 | #define R_LARCH_TLS_DTPREL32 8 |
| 1587 | #define R_LARCH_TLS_DTPREL64 9 |
| 1588 | #define R_LARCH_TLS_TPREL32 10 |
| 1589 | #define R_LARCH_TLS_TPREL64 11 |
| 1590 | #define R_LARCH_IRELATIVE 12 |
| 1591 | #define R_LARCH_TLS_DESC32 13 |
| 1592 | #define R_LARCH_TLS_DESC64 14 |
| 1593 | 	/* reserved for the dynamic linker: 15-19 */ |
| 1594 | #define R_LARCH_MARK_LA	20 |
| 1595 | #define R_LARCH_MARK_PCREL 21 |
| 1596 | #define R_LARCH_SOP_PUSH_PCREL 22 |
| 1597 | #define R_LARCH_SOP_PUSH_ABSOLUTE 23 |
| 1598 | #define R_LARCH_SOP_PUSH_DUP 24 |
| 1599 | #define R_LARCH_SOP_PUSH_GPREL 25 |
| 1600 | #define R_LARCH_SOP_PUSH_TLS_TPREL 26 |
| 1601 | #define R_LARCH_SOP_PUSH_TLS_GOT 27 |
| 1602 | #define R_LARCH_SOP_PUSH_TLS_GD 28 |
| 1603 | #define R_LARCH_SOP_PUSH_PLT_PCREL 29 |
| 1604 | #define R_LARCH_SOP_ASSERT 30 |
| 1605 | #define R_LARCH_SOP_NOT	31 |
| 1606 | #define R_LARCH_SOP_SUB	32 |
| 1607 | #define R_LARCH_SOP_SL	33 |
| 1608 | #define R_LARCH_SOP_SR	34 |
| 1609 | #define R_LARCH_SOP_ADD	35 |
| 1610 | #define R_LARCH_SOP_AND	36 |
| 1611 | #define R_LARCH_SOP_IF_ELSE 37 |
| 1612 | #define R_LARCH_SOP_POP_32_S_10_5 38 |
| 1613 | #define R_LARCH_SOP_POP_32_U_10_12 39 |
| 1614 | #define R_LARCH_SOP_POP_32_S_10_12 40 |
| 1615 | #define R_LARCH_SOP_POP_32_S_10_16 41 |
| 1616 | #define R_LARCH_SOP_POP_32_S_10_16_S2 42 |
| 1617 | #define R_LARCH_SOP_POP_32_S_5_20 43 |
| 1618 | #define R_LARCH_SOP_POP_32_S_0_5_10_16_S2 44 |
| 1619 | #define R_LARCH_SOP_POP_32_S_0_10_10_16_S2 45 |
| 1620 | #define R_LARCH_SOP_POP_32_U 46 |
| 1621 | #define R_LARCH_ADD8	47 |
| 1622 | #define R_LARCH_ADD16	48 |
| 1623 | #define R_LARCH_ADD24	49 |
| 1624 | #define R_LARCH_ADD32	50 |
| 1625 | #define R_LARCH_ADD64	51 |
| 1626 | #define R_LARCH_SUB8	52 |
| 1627 | #define R_LARCH_SUB16	53 |
| 1628 | #define R_LARCH_SUB24	54 |
| 1629 | #define R_LARCH_SUB32	55 |
| 1630 | #define R_LARCH_SUB64	56 |
| 1631 | #define R_LARCH_GNU_VTINHERIT 57 |
| 1632 | #define R_LARCH_GNU_VTENTRY 58 |
| 1633 | 	/* reserved: 59-63 */ |
| 1634 | #define R_LARCH_B16	64 |
| 1635 | #define R_LARCH_B21	65 |
| 1636 | #define R_LARCH_B26	66 |
| 1637 | #define R_LARCH_ABS_HI20 67 |
| 1638 | #define R_LARCH_ABS_LO12 68 |
| 1639 | #define R_LARCH_ABS64_LO20 69 |
| 1640 | #define R_LARCH_ABS64_HI12 70 |
| 1641 | #define R_LARCH_PCALA_HI20 71 |
| 1642 | #define R_LARCH_PCALA_LO12 72 |
| 1643 | #define R_LARCH_PCALA64_LO20 73 |
| 1644 | #define R_LARCH_PCALA64_HI12 74 |
| 1645 | #define R_LARCH_GOT_PC_HI20 75 |
| 1646 | #define R_LARCH_GOT_PC_LO12 76 |
| 1647 | #define R_LARCH_GOT64_PC_LO20 77 |
| 1648 | #define R_LARCH_GOT64_PC_HI12 78 |
| 1649 | #define R_LARCH_GOT_HI20 79 |
| 1650 | #define R_LARCH_GOT_LO12 80 |
| 1651 | #define R_LARCH_GOT64_LO20 81 |
| 1652 | #define R_LARCH_GOT64_HI12 82 |
| 1653 | #define R_LARCH_TLS_LE_HI20 83 |
| 1654 | #define R_LARCH_TLS_LE_LO12 84 |
| 1655 | #define R_LARCH_TLS_LE64_LO20 85 |
| 1656 | #define R_LARCH_TLS_LE64_HI12 86 |
| 1657 | #define R_LARCH_TLS_IE_PC_HI20 87 |
| 1658 | #define R_LARCH_TLS_IE_PC_LO12 88 |
| 1659 | #define R_LARCH_TLS_IE64_PC_LO20 89 |
| 1660 | #define R_LARCH_TLS_IE64_PC_HI12 90 |
| 1661 | #define R_LARCH_TLS_IE_HI20 91 |
| 1662 | #define R_LARCH_TLS_IE_LO12 92 |
| 1663 | #define R_LARCH_TLS_IE64_LO20 93 |
| 1664 | #define R_LARCH_TLS_IE64_HI12 94 |
| 1665 | #define R_LARCH_TLS_LD_PC_HI20 95 |
| 1666 | #define R_LARCH_TLS_LD_HI20 96 |
| 1667 | #define R_LARCH_TLS_GD_PC_HI20 97 |
| 1668 | #define R_LARCH_TLS_GD_HI20 98 |
| 1669 | #define R_LARCH_32_PCREL 99 |
| 1670 | #define R_LARCH_RELAX	100 |
| 1671 | 	/* reserved: 101 */ |
| 1672 | #define R_LARCH_ALIGN	102 |
| 1673 | #define R_LARCH_PCREL20_S2 103 |
| 1674 | 	/* reserved: 104 */ |
| 1675 | #define R_LARCH_ADD6	105 |
| 1676 | #define R_LARCH_SUB6	106 |
| 1677 | #define R_LARCH_ADD_ULEB128 107 |
| 1678 | #define R_LARCH_SUB_ULEB128 108 |
| 1679 | #define R_LARCH_64_PCREL 109 |
| 1680 | #define R_LARCH_CALL36	110 |
| 1681 | #define R_LARCH_TLS_DESC_PC_HI20 111 |
| 1682 | #define R_LARCH_TLS_DESC_PC_LO12 112 |
| 1683 | #define R_LARCH_TLS_DESC64_PC_LO20 113 |
| 1684 | #define R_LARCH_TLS_DESC64_PC_HI12 114 |
| 1685 | #define R_LARCH_TLS_DESC_HI20 115 |
| 1686 | #define R_LARCH_TLS_DESC_LO12 116 |
| 1687 | #define R_LARCH_TLS_DESC64_LO20 117 |
| 1688 | #define R_LARCH_TLS_DESC64_HI12 118 |
| 1689 | #define R_LARCH_TLS_DESC_LD 119 |
| 1690 | #define R_LARCH_TLS_DESC_CALL 120 |
| 1691 | #define R_LARCH_TLS_LE_HI20_R 121 |
| 1692 | #define R_LARCH_TLS_LE_ADD_R 122 |
| 1693 | #define R_LARCH_TLS_LE_LO12_R 123 |
| 1694 | #define R_LARCH_TLS_LD_PCREL20_S2 124 |
| 1695 | #define R_LARCH_TLS_GD_PCREL20_S2 125 |
| 1696 | #define R_LARCH_TLS_DESC_PCREL20_S2 126 |
| 1697 | |
| 1698 | |
| 1699 | /* EM_MIPS */ |
| 1700 | #define R_MIPS_NONE	0 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1701 | #define R_MIPS_16	1 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1702 | #define R_MIPS_32	2 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1703 | #define R_MIPS_REL32	3 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1704 | #define R_MIPS_26	4 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1705 | #define R_MIPS_HI16	5 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1706 | #define R_MIPS_LO16	6 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1707 | #define R_MIPS_GPREL16	7 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1708 | #define R_MIPS_LITERAL	8 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1709 | #define R_MIPS_GOT16	9 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1710 | #define R_MIPS_PC16	10 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1711 | #define R_MIPS_CALL16	11 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1712 | #define R_MIPS_GPREL32	12 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1713 | 	/* Unused: 13-15. */ |
| 1714 | #define R_MIPS_SHIFT5	16 /* GNU binutils, LLVM. */ |
| 1715 | #define R_MIPS_SHIFT6	17 /* GNU binutils, LLVM. */ |
| 1716 | #define R_MIPS_64	18 /* GNU binutils, LLVM */ |
| 1717 | #define R_MIPS_GOT_DISP	19 /* GNU binutils, LLVM. */ |
| 1718 | #define R_MIPS_GOT_PAGE	20 /* GNU binutils, LLVM. */ |
| 1719 | #define R_MIPS_GOTHI16	21 /* MIPS psABI. */ |
| 1720 | #define R_MIPS_GOTLO16	22 /* MIPS psABI. */ |
| 1721 | #define R_MIPS_GOT_LO16	23 /* GNU binutils, LLVM. */ |
| 1722 | #define R_MIPS_SUB	24 /* GNU binutils, LLVM. */ |
| 1723 | #define R_MIPS_INSERT_A	25 /* GNU binutils, LLVM. */ |
| 1724 | #define R_MIPS_INSERT_B	26 /* GNU binutils, LLVM. */ |
| 1725 | #define R_MIPS_DELETE	27 /* GNU binutils, LLVM. */ |
| 1726 | #define R_MIPS_HIGHER	28 /* GNU binutils, LLVM. */ |
| 1727 | #define R_MIPS_HIGHEST	29 /* GNU binutils, LLVM. */ |
| 1728 | #define R_MIPS_CALLHI16	30 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1729 | #define R_MIPS_CALLLO16	31 /* GNU binutils, LLVM, MIPS psABI. */ |
| 1730 | #define R_MIPS_SCN_DISP	32 /* GNU binutils, LLVM. */ |
| 1731 | #define R_MIPS_REL16	33 /* GNU binutils, LLVM. */ |
| 1732 | #define R_MIPS_ADD_IMMEDIATE 34 /* GNU binutils, LLVM. */ |
| 1733 | #define R_MIPS_PJUMP	35 /* GNU binutils, LLVM. */ |
| 1734 | #define R_MIPS_RELGOT	36 /* GNU binutils, LLVM. */ |
| 1735 | #define R_MIPS_JALR	37 /* GNU binutils, LLVM. */ |
| 1736 | #define R_MIPS_TLS_DTPMOD32 38 /* GNU binutils, LLVM. */ |
| 1737 | #define R_MIPS_TLS_DTPREL32 39 /* GNU binutils, LLVM. */ |
| 1738 | #define R_MIPS_TLS_DTPMOD64 40 /* GNU binutils, LLVM. */ |
| 1739 | #define R_MIPS_TLS_DTPREL64 41 /* GNU binutils, LLVM. */ |
| 1740 | #define R_MIPS_TLS_GD	42 /* GNU binutils, LLVM. */ |
| 1741 | #define R_MIPS_TLS_LDM	43 /* GNU binutils, LLVM. */ |
| 1742 | #define R_MIPS_TLS_DTPREL_HI16 44 /* GNU binutils, LLVM. */ |
| 1743 | #define R_MIPS_TLS_DTPREL_LO16 45 /* GNU binutils, LLVM. */ |
| 1744 | #define R_MIPS_TLS_GOTTPREL 46 /* GNU binutils, LLVM. */ |
| 1745 | #define R_MIPS_TLS_TPREL32 47 /* GNU binutils, LLVM. */ |
| 1746 | #define R_MIPS_TLS_TPREL64 48 /* GNU binutils, LLVM. */ |
| 1747 | #define R_MIPS_TLS_TPREL_HI16 49 /* GNU binutils, LLVM. */ |
| 1748 | #define R_MIPS_TLS_TPREL_LO16 50 /* GNU binutils, LLVM. */ |
| 1749 | #define R_MIPS_GLOB_DAT	51 /* GNU binutils, LLVM. */ |
| 1750 | 	/* Unused: 52-59. */ |
| 1751 | #define R_MIPS_PC21_S2	60 /* GNU binutils, LLVM. */ |
| 1752 | #define R_MIPS_PC26_S2	61 /* GNU binutils, LLVM. */ |
| 1753 | #define R_MIPS_PC18_S3	62 /* GNU binutils, LLVM. */ |
| 1754 | #define R_MIPS_PC19_S2	63 /* GNU binutils, LLVM. */ |
| 1755 | #define R_MIPS_PCHI16	64 /* GNU binutils, LLVM. */ |
| 1756 | #define R_MIPS_PCLO16	65 /* GNU binutils, LLVM. */ |
| 1757 | 	/* Unused: 66-99. */ |
| 1758 | #define R_MIPS16_26	100 /* GNU binutils, LLVM. */ |
| 1759 | #define R_MIPS16_GPREL	101 /* GNU binutils, LLVM. */ |
| 1760 | #define R_MIPS16_GOT16	102 /* GNU binutils, LLVM. */ |
| 1761 | #define R_MIPS16_CALL16	103 /* GNU binutils, LLVM. */ |
| 1762 | #define R_MIPS16_HI16	104 /* GNU binutils, LLVM. */ |
| 1763 | #define R_MIPS16_LO16	105 /* GNU binutils, LLVM. */ |
| 1764 | #define R_MIPS16_TLS_GD	106 /* GNU binutils, LLVM. */ |
| 1765 | #define R_MIPS16_TLS_LDM 107 /* GNU binutils, LLVM. */ |
| 1766 | #define R_MIPS16_TLS_DTPREL_HI16 108 /* GNU binutils, LLVM. */ |
| 1767 | #define R_MIPS16_TLS_DTPREL_LO16 109 /* GNU binutils, LLVM. */ |
| 1768 | #define R_MIPS16_TLS_GOTTPREL 110 /* GNU binutils, LLVM. */ |
| 1769 | #define R_MIPS16_TLS_TPREL_HI16 111 /* GNU binutils, LLVM. */ |
| 1770 | #define R_MIPS16_TLS_TPREL_LO16 112 /* GNU binutils, LLVM. */ |
| 1771 | 	/* Unused: 113-125. */ |
| 1772 | #define R_MIPS_COPY	126 /* GNU binutils, LLVM. */ |
| 1773 | #define R_MIPS_JUMP_SLOT 127 /* GNU binutils, LLVM. */ |
| 1774 | 	/* Unused: 128-132. */ |
| 1775 | #define R_MICROMIPS_26_S1 133 /* GNU binutils, LLVM. */ |
| 1776 | #define R_MICROMIPS_HI16 134 /* GNU binutils, LLVM. */ |
| 1777 | #define R_MICROMIPS_LO16 135 /* GNU binutils, LLVM. */ |
| 1778 | #define R_MICROMIPS_GPREL16 136 /* GNU binutils, LLVM. */ |
| 1779 | #define R_MICROMIPS_LITERAL 137 /* GNU binutils, LLVM. */ |
| 1780 | #define R_MICROMIPS_GOT16 138 /* GNU binutils, LLVM. */ |
| 1781 | #define R_MICROMIPS_PC7_S1 139 /* GNU binutils, LLVM. */ |
| 1782 | #define R_MICROMIPS_PC10_S1 140 /* GNU binutils, LLVM. */ |
| 1783 | #define R_MICROMIPS_PC16_S1 141 /* GNU binutils, LLVM. */ |
| 1784 | #define R_MICROMIPS_CALL16 142 /* GNU binutils, LLVM. */ |
| 1785 | 	/* Unused: 143-144. */ |
| 1786 | #define R_MICROMIPS_GOT_DISP 145 /* GNU binutils, LLVM. */ |
| 1787 | #define R_MICROMIPS_GOT_PAGE 146 /* GNU binutils, LLVM. */ |
| 1788 | #define R_MICROMIPS_GOT_OFST 147 /* GNU binutils, LLVM. */ |
| 1789 | #define R_MICROMIPS_GOT_HI16 148 /* GNU binutils, LLVM. */ |
| 1790 | #define R_MICROMIPS_GOT_LO16 149 /* GNU binutils, LLVM. */ |
| 1791 | #define R_MICROMIPS_SUB	150 /* GNU binutils, LLVM. */ |
| 1792 | #define R_MICROMIPS_HIGHER 151 /* GNU binutils, LLVM. */ |
| 1793 | #define R_MICROMIPS_HIGHEST 152 /* GNU binutils, LLVM. */ |
| 1794 | #define R_MICROMIPS_CALL_HI16 153 /* GNU binutils, LLVM. */ |
| 1795 | #define R_MICROMIPS_CALL_LO16 154 /* GNU binutils, LLVM. */ |
| 1796 | #define R_MICROMIPS_SCN_DISP 155 /* GNU binutils, LLVM. */ |
| 1797 | #define R_MICROMIPS_JALR 156 /* GNU binutils, LLVM. */ |
| 1798 | #define R_MICROMIPS_HI0_LO16 157 /* GNU binutils, LLVM. */ |
| 1799 | 	/* Unused: 158-161. */ |
| 1800 | #define R_MICROMIPS_TLS_GD 162 /* GNU binutils, LLVM. */ |
| 1801 | #define R_MICROMIPS_TLS_LDM 163 /* GNU binutils, LLVM. */ |
| 1802 | #define R_MICROMIPS_TLS_DTPREL_HI16 164 /* GNU binutils, LLVM. */ |
| 1803 | #define R_MICROMIPS_TLS_DTPREL_LO16 165 /* GNU binutils, LLVM. */ |
| 1804 | #define R_MICROMIPS_TLS_GOTTPREL 166 /* GNU binutils, LLVM. */ |
| 1805 | 	/* Unused: 167-168. */ |
| 1806 | #define R_MICROMIPS_TLS_TPREL_HI16 169 /* GNU binutils, LLVM. */ |
| 1807 | #define R_MICROMIPS_TLS_TPREL_LO16 170 /* GNU binutils, LLVM. */ |
| 1808 | 	/* Unused: 171. */ |
| 1809 | #define R_MICROMIPS_GPREL7_S2 172 /* GNU binutils, LLVM. */ |
| 1810 | #define R_MICROMIPS_PC23_S2 173 /* GNU binutils, LLVM. */ |
| 1811 | #define R_MICROMIPS_PC21_S1 174 /* LLVM. */ |
| 1812 | #define R_MICROMIPS_PC26_S1 175 /* LLVM. */ |
| 1813 | #define R_MICROMIPS_PC18_S3 176 /* LLVM. */ |
| 1814 | #define R_MICROMIPS_PC19_S2 177 /* LLVM. */ |
| 1815 | 	/* Unused: 178-247. */ |
| 1816 | #define R_MIPS_PC32	248 /* GNU binutils, LLVM. */ |
| 1817 | #define R_MIPS_EH	249 /* GNU binutils, LLVM. */ |
| 1818 | 	/* GNU extensions. */ |
| 1819 | #define R_MIPS_GNU_REL16_S2 250 /* GNU binutils. */ |
| 1820 | #define R_MIPS_GNU_VTINHERIT 251 /* GNU binutils. */ |
| 1821 | #define R_MIPS_GNU_VTENTRY 252 /* GNU binutils. */ |
| 1822 | |
| 1823 | |
| 1824 | /* EM_PPC64 */ |
| 1825 | #define R_PPC64_NONE	0 |
| 1826 | #define R_PPC64_ADDR32	1 |
| 1827 | #define R_PPC64_ADDR24	2 |
| 1828 | #define R_PPC64_ADDR16	3 |
| 1829 | #define R_PPC64_ADDR16_LO 4 |
| 1830 | #define R_PPC64_ADDR16_HI 5 |
| 1831 | #define R_PPC64_ADDR16_HA 6 |
| 1832 | #define R_PPC64_ADDR14	7 |
| 1833 | 	/* unused: 8-9. */ |
| 1834 | #define R_PPC64_REL24	10 |
| 1835 | #define R_PPC64_REL14	11 |
| 1836 | 	/* unused: 12-13. */ |
| 1837 | #define R_PPC64_GOT16	14 |
| 1838 | #define R_PPC64_GOT16_LO 15 |
| 1839 | #define R_PPC64_GOT16_HI 16 |
| 1840 | #define R_PPC64_GOT16_HA 17 |
| 1841 | 	/* unused: 18. */ |
| 1842 | #define R_PPC64_COPY	19 |
| 1843 | #define R_PPC64_GLOB_DAT 20 |
| 1844 | #define R_PPC64_JMP_SLOT 21 |
| 1845 | #define R_PPC64_RELATIVE 22 |
| 1846 | 	/* unused: 23. */ |
| 1847 | #define R_PPC64_UADDR32	24 |
| 1848 | #define R_PPC64_UADDR16	25 |
| 1849 | #define R_PPC64_REL32	26 |
| 1850 | #define R_PPC64_PLT32	27 |
| 1851 | #define R_PPC64_PLTREL32 28 |
| 1852 | #define R_PPC64_PLT16_LO 29 |
| 1853 | #define R_PPC64_PLT16_HI 30 |
| 1854 | #define R_PPC64_PLT16_HA 31 |
| 1855 | 	/* unused: 32. */ |
| 1856 | #define R_PPC64_SECTOFF	33 |
| 1857 | #define R_PPC64_SECTOFF_LO 34 |
| 1858 | #define R_PPC64_SECTOFF_HI 35 |
| 1859 | #define R_PPC64_SECTOFF_HA 36 |
| 1860 | #define R_PPC64_REL30	37 |
| 1861 | #define R_PPC64_ADDR64	38 |
| 1862 | #define R_PPC64_ADDR16_HIGHER 39 |
| 1863 | #define R_PPC64_ADDR16_HIGHERA 40 |
| 1864 | #define R_PPC64_ADDR16_HIGHEST 41 |
| 1865 | #define R_PPC64_ADDR16_HIGHESTA 42 |
| 1866 | #define R_PPC64_UADDR64	43 |
| 1867 | #define R_PPC64_REL64	44 |
| 1868 | #define R_PPC64_PLT64	45 |
| 1869 | #define R_PPC64_PLTREL64 46 |
| 1870 | #define R_PPC64_TOC16	47 |
| 1871 | #define R_PPC64_TOC16_LO 48 |
| 1872 | #define R_PPC64_TOC16_HI 49 |
| 1873 | #define R_PPC64_TOC16_HA 50 |
| 1874 | #define R_PPC64_TOC	51 |
| 1875 | #define R_PPC64_PLTGOT16 52 |
| 1876 | #define R_PPC64_PLTGOT16_LO 53 |
| 1877 | #define R_PPC64_PLTGOT16_HI 54 |
| 1878 | #define R_PPC64_PLTGOT16_HA 55 |
| 1879 | #define R_PPC64_ADDR16_DS 56 |
| 1880 | #define R_PPC64_ADDR16_LO_DS 57 |
| 1881 | #define R_PPC64_GOT16_DS 58 |
| 1882 | #define R_PPC64_GOT16_LO_DS 59 |
| 1883 | #define R_PPC64_PLT16_LO_DS 60 |
| 1884 | #define R_PPC64_SECTOFF_DS 61 |
| 1885 | #define R_PPC64_SECTOFF_LO_DS 62 |
| 1886 | #define R_PPC64_TOC16_DS 63 |
| 1887 | #define R_PPC64_TOC16_LO_DS 64 |
| 1888 | #define R_PPC64_PLTGOT16_DS 65 |
| 1889 | #define R_PPC64_PLTGOT16_LO_DS 66 |
| 1890 | #define R_PPC64_TLS	67 |
| 1891 | #define R_PPC64_DTPMOD64 68 |
| 1892 | #define R_PPC64_TPREL16	69 |
| 1893 | #define R_PPC64_TPREL16_LO 70 |
| 1894 | #define R_PPC64_TPREL16_HI 71 |
| 1895 | #define R_PPC64_TPREL16_HA 72 |
| 1896 | #define R_PPC64_TPREL64	73 |
| 1897 | #define R_PPC64_DTPREL16 74 |
| 1898 | #define R_PPC64_DTPREL16_LO 75 |
| 1899 | #define R_PPC64_DTPREL16_HI 76 |
| 1900 | #define R_PPC64_DTPREL16_HA 77 |
| 1901 | #define R_PPC64_DTPREL64 78 |
| 1902 | #define R_PPC64_GOT_TLSGD16 79 |
| 1903 | #define R_PPC64_GOT_TLSGD16_LO 80 |
| 1904 | #define R_PPC64_GOT_TLSGD16_HI 81 |
| 1905 | #define R_PPC64_GOT_TLSGD16_HA 82 |
| 1906 | #define R_PPC64_GOT_TLSLD16 83 |
| 1907 | #define R_PPC64_GOT_TLSLD16_LO 84 |
| 1908 | #define R_PPC64_GOT_TLSLD16_HI 85 |
| 1909 | #define R_PPC64_GOT_TLSLD16_HA 86 |
| 1910 | #define R_PPC64_GOT_TPREL16_DS 87 |
| 1911 | #define R_PPC64_GOT_TPREL16_LO_DS 88 |
| 1912 | #define R_PPC64_GOT_TPREL16_HI 89 |
| 1913 | #define R_PPC64_GOT_TPREL16_HA 90 |
| 1914 | #define R_PPC64_GOT_DTPREL16_DS 91 |
| 1915 | #define R_PPC64_GOT_DTPREL16_LO_DS 92 |
| 1916 | #define R_PPC64_GOT_DTPREL16_HI 93 |
| 1917 | #define R_PPC64_GOT_DTPREL16_HA 94 |
| 1918 | #define R_PPC64_TPREL16_DS 95 |
| 1919 | #define R_PPC64_TPREL16_LO_DS 96 |
| 1920 | #define R_PPC64_TPREL16_HIGHER 97 |
| 1921 | #define R_PPC64_TPREL16_HIGHERA 98 |
| 1922 | #define R_PPC64_TPREL16_HIGHEST 99 |
| 1923 | #define R_PPC64_TPREL16_HIGHESTA 100 |
| 1924 | #define R_PPC64_DTPREL16_DS 101 |
| 1925 | #define R_PPC64_DTPREL16_LO_DS 102 |
| 1926 | #define R_PPC64_DTPREL16_HIGHER 103 |
| 1927 | #define R_PPC64_DTPREL16_HIGHERA 104 |
| 1928 | #define R_PPC64_DTPREL16_HIGHEST 105 |
| 1929 | #define R_PPC64_DTPREL16_HIGHESTA 106 |
| 1930 | #define R_PPC64_TLSGD	107 |
| 1931 | #define R_PPC64_TLSLD	108 |
| 1932 | #define R_PPC64_TOCSAVE	109 |
| 1933 | #define R_PPC64_ADDR16_HIGH 110 |
| 1934 | #define R_PPC64_ADDR16_HIGHA 111 |
| 1935 | #define R_PPC64_TPREL16_HIGH 112 |
| 1936 | #define R_PPC64_TPREL16_HIGHA 113 |
| 1937 | #define R_PPC64_DTPREL16_HIGH 114 |
| 1938 | #define R_PPC64_DTPREL16_HIGHA 115 |
| 1939 | #define R_PPC64_REL24_NOTOC 116 |
| 1940 | #define R_PPC64_ADDR64_LOCAL 117 |
| 1941 | #define R_PPC64_ENTRY	118 |
| 1942 | #define R_PPC64_PLTSEQ	119 |
| 1943 | #define R_PPC64_PLTCALL	120 |
| 1944 | #define R_PPC64_PLTSEQ_NOTOC 121 |
| 1945 | #define R_PPC64_PLTCALL_NOTOC 122 |
| 1946 | #define R_PPC64_PCREL_OPT 123 |
| 1947 | 	/* unused: 124-127. */ |
| 1948 | #define R_PPC64_D34	128 |
| 1949 | #define R_PPC64_D34_LO	129 |
| 1950 | #define R_PPC64_D34_HI30 130 |
| 1951 | #define R_PPC64_D34_HA30 131 |
| 1952 | #define R_PPC64_PCREL34	132 |
| 1953 | #define R_PPC64_GOT_PCREL34 133 |
| 1954 | #define R_PPC64_PLT_PCREL34 134 |
| 1955 | #define R_PPC64_PLT_PCREL34_NOTOC 135 |
| 1956 | #define R_PPC64_ADDR16_HIGHER34 136 |
| 1957 | #define R_PPC64_ADDR16_HIGHERA34 137 |
| 1958 | #define R_PPC64_ADDR16_HIGHEST34 138 |
| 1959 | #define R_PPC64_ADDR16_HIGHESTA34 139 |
| 1960 | #define R_PPC64_REL16_HIGHER34 140 |
| 1961 | #define R_PPC64_REL16_HIGHERA34 141 |
| 1962 | #define R_PPC64_REL16_HIGHEST34 142 |
| 1963 | #define R_PPC64_REL16_HIGHESTA34 143 |
| 1964 | #define R_PPC64_D28	144 |
| 1965 | #define R_PPC64_PCREL28	145 |
| 1966 | #define R_PPC64_TPREL34	146 |
| 1967 | #define R_PPC64_DTPREL34 147 |
| 1968 | #define R_PPC64_GOT_TLSGD_PCREL34 148 |
| 1969 | #define R_PPC64_GOT_TLSLD_PCREL34 149 |
| 1970 | #define R_PPC64_GOT_TPREL_PCREL34 150 |
| 1971 | #define R_PPC64_GOT_DTPREL_PCREL34 151 |
| 1972 | 	/* unused: 152-239. */ |
| 1973 | #define R_PPC64_REL16_HIGH 240 |
| 1974 | #define R_PPC64_REL16_HIGHA 241 |
| 1975 | #define R_PPC64_REL16_HIGHER 242 |
| 1976 | #define R_PPC64_REL16_HIGHERA 243 |
| 1977 | #define R_PPC64_REL16_HIGHEST 244 |
| 1978 | #define R_PPC64_REL16_HIGHESTA 245 |
| 1979 | #define R_PPC64_REL16DX_HA 246 |
| 1980 | 	/* unused: 247. */ |
| 1981 | #define R_PPC64_IRELATIVE 248 |
| 1982 | #define R_PPC64_REL16	249 |
| 1983 | #define R_PPC64_REL16_LO 250 |
| 1984 | #define R_PPC64_REL16_HI 251 |
| 1985 | #define R_PPC64_REL16_HA 252 |
| 1986 | #define R_PPC64_GNU_VTINHERIT 253 |
| 1987 | #define R_PPC64_GNU_VTENTRY 254 |
| 1988 | |
| 1989 | |
| 1990 | /* EM_PPC */ |
| 1991 | #define R_PPC_NONE	0 |
| 1992 | #define R_PPC_ADDR32	1 |
| 1993 | #define R_PPC_ADDR24	2 |
| 1994 | #define R_PPC_ADDR16	3 |
| 1995 | #define R_PPC_ADDR16_LO	4 |
| 1996 | #define R_PPC_ADDR16_HI	5 |
| 1997 | #define R_PPC_ADDR16_HA	6 |
| 1998 | #define R_PPC_ADDR14	7 |
| 1999 | #define R_PPC_ADDR14_BRTAKEN 8 |
| 2000 | #define R_PPC_ADDR14_BRNTAKEN 9 |
| 2001 | #define R_PPC_REL24	10 |
| 2002 | #define R_PPC_REL14	11 |
| 2003 | #define R_PPC_REL14_BRTAKEN 12 |
| 2004 | #define R_PPC_REL14_BRNTAKEN 13 |
| 2005 | #define R_PPC_GOT16	14 |
| 2006 | #define R_PPC_GOT16_LO	15 |
| 2007 | #define R_PPC_GOT16_HI	16 |
| 2008 | #define R_PPC_GOT16_HA	17 |
| 2009 | #define R_PPC_PLTREL24	18 |
| 2010 | #define R_PPC_COPY	19 |
| 2011 | #define R_PPC_GLOB_DAT	20 |
| 2012 | #define R_PPC_JMP_SLOT	21 |
| 2013 | #define R_PPC_RELATIVE	22 |
| 2014 | #define R_PPC_LOCAL24PC	23 |
| 2015 | #define R_PPC_UADDR32	24 |
| 2016 | #define R_PPC_UADDR16	25 |
| 2017 | #define R_PPC_REL32	26 |
| 2018 | #define R_PPC_PLT32	27 |
| 2019 | #define R_PPC_PLTREL32	28 |
| 2020 | #define R_PPC_PLT16_LO	29 |
| 2021 | #define R_PPC_PLT16_HI	30 |
| 2022 | #define R_PPC_PLT16_HA	31 |
| 2023 | 	/* Not in the psABI: 32 */ |
| 2024 | #define R_PPC_SDAREL16	32 |
| 2025 | #define R_PPC_SECTOFF	33 |
| 2026 | #define R_PPC_SECTOFF_LO 34 |
| 2027 | #define R_PPC_SECTOFF_HI 35 |
| 2028 | #define R_PPC_SECTOFF_HA 36 |
| 2029 | #define R_PPC_ADDR30	37 |
| 2030 | 	/* Used by the PPC64 ABI: 38-66. */ |
| 2031 | #define R_PPC_TLS	67 |
| 2032 | #define R_PPC_DTPMOD32	68 |
| 2033 | #define R_PPC_TPREL16	69 |
| 2034 | #define R_PPC_TPREL16_LO 70 |
| 2035 | #define R_PPC_TPREL16_HI 71 |
| 2036 | #define R_PPC_TPREL16_HA 72 |
| 2037 | #define R_PPC_TPREL32	73 |
| 2038 | #define R_PPC_DTPREL16	74 |
| 2039 | #define R_PPC_DTPREL16_LO 75 |
| 2040 | #define R_PPC_DTPREL16_HI 76 |
| 2041 | #define R_PPC_DTPREL16_HA 77 |
| 2042 | #define R_PPC_DTPREL32	78 |
| 2043 | #define R_PPC_GOT_TLSGD16 79 |
| 2044 | #define R_PPC_GOT_TLSGD16_LO 80 |
| 2045 | #define R_PPC_GOT_TLSGD16_HI 81 |
| 2046 | #define R_PPC_GOT_TLSGD16_HA 82 |
| 2047 | #define R_PPC_GOT_TLSLD16 83 |
| 2048 | #define R_PPC_GOT_TLSLD16_LO 84 |
| 2049 | #define R_PPC_GOT_TLSLD16_HI 85 |
| 2050 | #define R_PPC_GOT_TLSLD16_HA 86 |
| 2051 | #define R_PPC_GOT_TPREL16 87 |
| 2052 | #define R_PPC_GOT_TPREL16_LO 88 |
| 2053 | #define R_PPC_GOT_TPREL16_HI 89 |
| 2054 | #define R_PPC_GOT_TPREL16_HA 90 |
| 2055 | 	/* Not in the psABI: 91-94. */ |
| 2056 | #define R_PPC_GOT_DTPREL16 91 |
| 2057 | #define R_PPC_GOT_DTPREL16_LO 92 |
| 2058 | #define R_PPC_GOT_DTPREL16_HI 93 |
| 2059 | #define R_PPC_GOT_DTPREL16_HA 94 |
| 2060 | #define R_PPC_TLSGD	95 |
| 2061 | #define R_PPC_TLSLD	96 |
| 2062 | 	/* Reserved: 97-100. */ |
| 2063 | #define R_PPC_EMB_NADDR32 101 |
| 2064 | #define R_PPC_EMB_NADDR16 102 |
| 2065 | #define R_PPC_EMB_NADDR16_LO 103 |
| 2066 | #define R_PPC_EMB_NADDR16_HI 104 |
| 2067 | #define R_PPC_EMB_NADDR16_HA 105 |
| 2068 | #define R_PPC_EMB_SDAI16 106 |
| 2069 | #define R_PPC_EMB_SDA2I16 107 |
| 2070 | #define R_PPC_EMB_SDA2REL 108 |
| 2071 | #define R_PPC_EMB_SDA21	109 |
| 2072 | #define R_PPC_EMB_MRKREF 110 |
| 2073 | #define R_PPC_EMB_RELSEC16 111 |
| 2074 | #define R_PPC_EMB_RELST_LO 112 |
| 2075 | #define R_PPC_EMB_RELST_HI 113 |
| 2076 | #define R_PPC_EMB_RELST_HA 114 |
| 2077 | #define R_PPC_EMB_BIT_FLD 115 |
| 2078 | #define R_PPC_EMB_RELSDA 116 |
| 2079 | 	/* Reserved: 117-179. */ |
| 2080 | #define R_PPC_DIAB_SDA21_LO 180 |
| 2081 | #define R_PPC_DIAB_SDA21_HI 181 |
| 2082 | #define R_PPC_DIAB_SDA21_HA 182 |
| 2083 | #define R_PPC_DIAB_RELSDA_LO 183 |
| 2084 | #define R_PPC_DIAB_RELSDA_HI 184 |
| 2085 | #define R_PPC_DIAB_RELSDA_HA 185 |
| 2086 | 	/* Reserved: 201-200. */ |
| 2087 | #define R_PPC_EMB_SPE_DOUBLE 201 |
| 2088 | #define R_PPC_EMB_SPE_WORD 202 |
| 2089 | #define R_PPC_EMB_SPE_HALF 203 |
| 2090 | #define R_PPC_EMB_SPE_DOUBLE_SDAREL 204 |
| 2091 | #define R_PPC_EMB_SPE_WORD_SDAREL 205 |
| 2092 | #define R_PPC_EMB_SPE_HALF_SDAREL 206 |
| 2093 | #define R_PPC_EMB_SPE_DOUBLE_SDA2REL 207 |
| 2094 | #define R_PPC_EMB_SPE_WORD_SDA2REL 208 |
| 2095 | #define R_PPC_EMB_SPE_HALF_SDA2REL 209 |
| 2096 | #define R_PPC_EMB_SPE_DOUBLE_SDA0REL 210 |
| 2097 | #define R_PPC_EMB_SPE_WORD_SDA0REL 211 |
| 2098 | #define R_PPC_EMB_SPE_HALF_SDA0REL 212 |
| 2099 | #define R_PPC_EMB_SPE_DOUBLE_SDA 213 |
| 2100 | #define R_PPC_EMB_SPE_WORD_SDA 214 |
| 2101 | #define R_PPC_EMB_SPE_HALF_SDA 215 |
| 2102 | #define R_PPC_VLE_REL8	216 |
| 2103 | #define R_PPC_VLE_REL15	217 |
| 2104 | #define R_PPC_VLE_REL24	218 |
| 2105 | #define R_PPC_VLE_LO16A	219 |
| 2106 | #define R_PPC_VLE_LO16D	220 |
| 2107 | #define R_PPC_VLE_HI16A	221 |
| 2108 | #define R_PPC_VLE_HI16D	222 |
| 2109 | #define R_PPC_VLE_HA16A	223 |
| 2110 | #define R_PPC_VLE_HA16D	224 |
| 2111 | #define R_PPC_VLE_SDA21	225 |
| 2112 | #define R_PPC_VLE_SDA21_LO 226 |
| 2113 | #define R_PPC_VLE_SDAREL_LO16A 227 |
| 2114 | #define R_PPC_VLE_SDAREL_LO16D 228 |
| 2115 | #define R_PPC_VLE_SDAREL_HI16A 229 |
| 2116 | #define R_PPC_VLE_SDAREL_HI16D 230 |
| 2117 | #define R_PPC_VLE_SDAREL_HA16A 231 |
| 2118 | #define R_PPC_VLE_SDAREL_HA16D 232 |
| 2119 | #define R_PPC_VLE_ADDR20 233 |
| 2120 | 	/* Reserved: 234-248. */ |
| 2121 | #define R_PPC_REL16	249 |
| 2122 | #define R_PPC_REL16_LO	250 |
| 2123 | #define R_PPC_REL16_HI	251 |
| 2124 | #define R_PPC_REL16_HA	252 |
| 2125 | 	/* Reserved: 253-255. */ |
| 2126 | |
| 2127 | |
| 2128 | /* EM_RISCV */ |
| 2129 | #define R_RISCV_NONE	0 |
| 2130 | #define R_RISCV_32	1 |
| 2131 | #define R_RISCV_64	2 |
| 2132 | #define R_RISCV_RELATIVE 3 |
| 2133 | #define R_RISCV_COPY	4 |
| 2134 | #define R_RISCV_JUMP_SLOT 5 |
| 2135 | #define R_RISCV_TLS_DTPMOD32 6 |
| 2136 | #define R_RISCV_TLS_DTPMOD64 7 |
| 2137 | #define R_RISCV_TLS_DTPREL32 8 |
| 2138 | #define R_RISCV_TLS_DTPREL64 9 |
| 2139 | #define R_RISCV_TLS_TPREL32 10 |
| 2140 | #define R_RISCV_TLS_TPREL64 11 |
| 2141 | #define R_RISCV_TLSDESC	12 |
| 2142 | 	/* unused: 13-15 */ |
| 2143 | #define R_RISCV_BRANCH	16 |
| 2144 | #define R_RISCV_JAL	17 |
| 2145 | #define R_RISCV_CALL	18 |
| 2146 | #define R_RISCV_CALL_PLT 19 |
| 2147 | #define R_RISCV_GOT_HI20 20 |
| 2148 | #define R_RISCV_TLS_GOT_HI20 21 |
| 2149 | #define R_RISCV_TLS_GD_HI20 22 |
| 2150 | #define R_RISCV_PCREL_HI20 23 |
| 2151 | #define R_RISCV_PCREL_LO12_I 24 |
| 2152 | #define R_RISCV_PCREL_LO12_S 25 |
| 2153 | #define R_RISCV_HI20	26 |
| 2154 | #define R_RISCV_LO12_I	27 |
| 2155 | #define R_RISCV_LO12_S	28 |
| 2156 | #define R_RISCV_TPREL_HI20 29 |
| 2157 | #define R_RISCV_TPREL_LO12_I 30 |
| 2158 | #define R_RISCV_TPREL_LO12_S 31 |
| 2159 | #define R_RISCV_TPREL_ADD 32 |
| 2160 | #define R_RISCV_ADD8	33 |
| 2161 | #define R_RISCV_ADD16	34 |
| 2162 | #define R_RISCV_ADD32	35 |
| 2163 | #define R_RISCV_ADD64	36 |
| 2164 | #define R_RISCV_SUB8	37 |
| 2165 | #define R_RISCV_SUB16	38 |
| 2166 | #define R_RISCV_SUB32	39 |
| 2167 | #define R_RISCV_SUB64	40 |
| 2168 | #define R_RISCV_GOT32_PCREL 41 |
| 2169 | 	/* reserved: 42 */ |
| 2170 | #define R_RISCV_ALIGN	43 |
| 2171 | #define R_RISCV_RVC_BRANCH 44 |
| 2172 | #define R_RISCV_RVC_JUMP 45 |
| 2173 | 	/* reserved: 46-50 */ |
| 2174 | #define R_RISCV_RELAX	51 |
| 2175 | #define R_RISCV_SUB6	52 |
| 2176 | #define R_RISCV_SET6	53 |
| 2177 | #define R_RISCV_SET8	54 |
| 2178 | #define R_RISCV_SET16	55 |
| 2179 | #define R_RISCV_SET32	56 |
| 2180 | #define R_RISCV_32_PCREL 57 |
| 2181 | #define R_RISCV_IRELATIVE 58 |
| 2182 | #define R_RISCV_PLT32	59 |
| 2183 | #define R_RISCV_SET_ULEB128 60 |
| 2184 | #define R_RISCV_SUB_ULEB128 61 |
| 2185 | #define R_RISCV_TLSDESC_HI20 62 |
| 2186 | #define R_RISCV_TLSDESC_LOAD_LO12 63 |
| 2187 | #define R_RISCV_TLSDESC_ADD_LO12 64 |
| 2188 | #define R_RISCV_TLSDESC_CALL 65 |
| 2189 | 	/* reserved: 66-190 */ |
| 2190 | #define R_RISCV_VENDOR	191 |
| 2191 | 	/* reserved: 192-255 */ |
| 2192 | |
| 2193 | |
| 2194 | /* EM_S390 */ |
| 2195 | #define R_390_NONE	0 |
| 2196 | #define R_390_8		1 |
| 2197 | #define R_390_12	2 |
| 2198 | #define R_390_16	3 |
| 2199 | #define R_390_32	4 |
| 2200 | #define R_390_PC32	5 |
| 2201 | #define R_390_GOT12	6 |
| 2202 | #define R_390_GOT32	7 |
| 2203 | #define R_390_PLT32	8 |
| 2204 | #define R_390_COPY	9 |
| 2205 | #define R_390_GLOB_DAT	10 |
| 2206 | #define R_390_JMP_SLOT	11 |
| 2207 | #define R_390_RELATIVE	12 |
| 2208 | #define R_390_GOTOFF	13 |
| 2209 | #define R_390_GOTPC	14 |
| 2210 | #define R_390_GOT16	15 |
| 2211 | #define R_390_PC16	16 |
| 2212 | #define R_390_PC16DBL	17 |
| 2213 | #define R_390_PLT16DBL	18 |
| 2214 | #define R_390_PC32DBL	19 |
| 2215 | #define R_390_PLT32DBL	20 |
| 2216 | #define R_390_GOTPCDBL	21 |
| 2217 | #define R_390_64	22 |
| 2218 | #define R_390_PC64	23 |
| 2219 | #define R_390_GOT64	24 |
| 2220 | #define R_390_PLT64	25 |
| 2221 | #define R_390_GOTENT	26 |
| 2222 | |
| 2223 | |
| 2224 | /* EM_SPARC */ |
| 2225 | #define R_SPARC_NONE	0 |
| 2226 | #define R_SPARC_8	1 |
| 2227 | #define R_SPARC_16	2 |
| 2228 | #define R_SPARC_32	3 |
| 2229 | #define R_SPARC_DISP8	4 |
| 2230 | #define R_SPARC_DISP16	5 |
| 2231 | #define R_SPARC_DISP32	6 |
| 2232 | #define R_SPARC_WDISP30	7 |
| 2233 | #define R_SPARC_WDISP22	8 |
| 2234 | #define R_SPARC_HI22	9 |
| 2235 | #define R_SPARC_22	10 |
| 2236 | #define R_SPARC_13	11 |
| 2237 | #define R_SPARC_LO10	12 |
| 2238 | #define R_SPARC_GOT10	13 |
| 2239 | #define R_SPARC_GOT13	14 |
| 2240 | #define R_SPARC_GOT22	15 |
| 2241 | #define R_SPARC_PC10	16 |
| 2242 | #define R_SPARC_PC22	17 |
| 2243 | #define R_SPARC_WPLT30	18 |
| 2244 | #define R_SPARC_COPY	19 |
| 2245 | #define R_SPARC_GLOB_DAT 20 |
| 2246 | #define R_SPARC_JMP_SLOT 21 |
| 2247 | #define R_SPARC_RELATIVE 22 |
| 2248 | #define R_SPARC_UA32	23 |
| 2249 | #define R_SPARC_PLT32	24 |
| 2250 | #define R_SPARC_HIPLT22	25 |
| 2251 | #define R_SPARC_LOPLT10	26 |
| 2252 | #define R_SPARC_PCPLT32	27 |
| 2253 | #define R_SPARC_PCPLT22	28 |
| 2254 | #define R_SPARC_PCPLT10	29 |
| 2255 | #define R_SPARC_10	30 |
| 2256 | #define R_SPARC_11	31 |
| 2257 | #define R_SPARC_64	32 |
| 2258 | #define R_SPARC_OLO10	33 |
| 2259 | #define R_SPARC_HH22	34 |
| 2260 | #define R_SPARC_HM10	35 |
| 2261 | #define R_SPARC_LM22	36 |
| 2262 | #define R_SPARC_PC_HH22	37 |
| 2263 | #define R_SPARC_PC_HM10	38 |
| 2264 | #define R_SPARC_PC_LM22	39 |
| 2265 | #define R_SPARC_WDISP16	40 |
| 2266 | #define R_SPARC_WDISP19	41 |
| 2267 | 	/* unused: 42 */ |
| 2268 | #define R_SPARC_7	43 |
| 2269 | #define R_SPARC_5	44 |
| 2270 | #define R_SPARC_6	45 |
| 2271 | #define R_SPARC_DISP64	46 |
| 2272 | #define R_SPARC_PLT64	47 |
| 2273 | #define R_SPARC_HIX22	48 |
| 2274 | #define R_SPARC_LOX10	49 |
| 2275 | #define R_SPARC_H44	50 |
| 2276 | #define R_SPARC_M44	51 |
| 2277 | #define R_SPARC_L44	52 |
| 2278 | #define R_SPARC_REGISTER 53 |
| 2279 | #define R_SPARC_UA64	54 |
| 2280 | #define R_SPARC_UA16	55 |
| 2281 | #define R_SPARC_TLS_GD_HI22 56 |
| 2282 | #define R_SPARC_TLS_GD_LO10 57 |
| 2283 | #define R_SPARC_TLS_GD_ADD 58 |
| 2284 | #define R_SPARC_TLS_GD_CALL 59 |
| 2285 | #define R_SPARC_TLS_LDM_HI22 60 |
| 2286 | #define R_SPARC_TLS_LDM_LO10 61 |
| 2287 | #define R_SPARC_TLS_LDM_ADD 62 |
| 2288 | #define R_SPARC_TLS_LDM_CALL 63 |
| 2289 | #define R_SPARC_TLS_LDO_HIX22 64 |
| 2290 | #define R_SPARC_TLS_LDO_LOX10 65 |
| 2291 | #define R_SPARC_TLS_LDO_ADD 66 |
| 2292 | #define R_SPARC_TLS_IE_HI22 67 |
| 2293 | #define R_SPARC_TLS_IE_LO10 68 |
| 2294 | #define R_SPARC_TLS_IE_LD 69 |
| 2295 | #define R_SPARC_TLS_IE_LDX 70 |
| 2296 | #define R_SPARC_TLS_IE_ADD 71 |
| 2297 | #define R_SPARC_TLS_LE_HIX22 72 |
| 2298 | #define R_SPARC_TLS_LE_LOX10 73 |
| 2299 | #define R_SPARC_TLS_DTPMOD32 74 |
| 2300 | #define R_SPARC_TLS_DTPMOD64 75 |
| 2301 | #define R_SPARC_TLS_DTPOFF32 76 |
| 2302 | #define R_SPARC_TLS_DTPOFF64 77 |
| 2303 | #define R_SPARC_TLS_TPOFF32 78 |
| 2304 | #define R_SPARC_TLS_TPOFF64 79 |
| 2305 | #define R_SPARC_GOTDATA_HIX22 80 |
| 2306 | #define R_SPARC_GOTDATA_LOX10 81 |
| 2307 | #define R_SPARC_GOTDATA_OP_HIX22 82 |
| 2308 | #define R_SPARC_GOTDATA_OP_LOX10 83 |
| 2309 | #define R_SPARC_GOTDATA_OP 84 |
| 2310 | #define R_SPARC_H34	85 |
| 2311 | #define R_SPARC_SIZE32	86 |
| 2312 | #define R_SPARC_SIZE64	87 |
| 2313 | #define R_SPARC_WDISP10	88 |
| 2314 | |
| 2315 | |
| 2316 | /* EM_VAX */ |
| 2317 | #define R_VAX_NONE	0 |
| 2318 | #define R_VAX_32	1 |
| 2319 | #define R_VAX_16	2 |
| 2320 | #define R_VAX_8		3 |
| 2321 | #define R_VAX_PC32	4 |
| 2322 | #define R_VAX_PC16	5 |
| 2323 | #define R_VAX_PC8	6 |
| 2324 | #define R_VAX_GOT32	7 |
| 2325 | #define R_VAX_PLT32	13 |
| 2326 | #define R_VAX_COPY	19 |
| 2327 | #define R_VAX_GLOB_DAT	20 |
| 2328 | #define R_VAX_JMP_SLOT	21 |
| 2329 | #define R_VAX_RELATIVE	22 |
| 2330 | |
| 2331 | |
| 2332 | /* EM_X86_64 */ |
| 2333 | #define R_X86_64_NONE	0 |
| 2334 | #define R_X86_64_64	1 |
| 2335 | #define R_X86_64_PC32	2 |
| 2336 | #define R_X86_64_GOT32	3 |
| 2337 | #define R_X86_64_PLT32	4 |
| 2338 | #define R_X86_64_COPY	5 |
| 2339 | #define R_X86_64_GLOB_DAT 6 |
| 2340 | #define R_X86_64_JUMP_SLOT 7 |
| 2341 | #define R_X86_64_RELATIVE 8 |
| 2342 | #define R_X86_64_GOTPCREL 9 |
| 2343 | #define R_X86_64_32	10 |
| 2344 | #define R_X86_64_32S	11 |
| 2345 | #define R_X86_64_16	12 |
| 2346 | #define R_X86_64_PC16	13 |
| 2347 | #define R_X86_64_8	14 |
| 2348 | #define R_X86_64_PC8	15 |
| 2349 | #define R_X86_64_DTPMOD64 16 |
| 2350 | #define R_X86_64_DTPOFF64 17 |
| 2351 | #define R_X86_64_TPOFF64 18 |
| 2352 | #define R_X86_64_TLSGD	19 |
| 2353 | #define R_X86_64_TLSLD	20 |
| 2354 | #define R_X86_64_DTPOFF32 21 |
| 2355 | #define R_X86_64_GOTTPOFF 22 |
| 2356 | #define R_X86_64_TPOFF32 23 |
| 2357 | #define R_X86_64_PC64	24 |
| 2358 | #define R_X86_64_GOTOFF64 25 |
| 2359 | #define R_X86_64_GOTPC32 26 |
| 2360 | #define R_X86_64_GOT64	27 |
| 2361 | #define R_X86_64_GOTPCREL64 28 |
| 2362 | #define R_X86_64_GOTPC64 29 |
| 2363 | 	/* deprecated: 30 */ |
| 2364 | #define R_X86_64_PLTOFF64 31 |
| 2365 | #define R_X86_64_SIZE32	32 |
| 2366 | #define R_X86_64_SIZE64	33 |
| 2367 | #define R_X86_64_GOTPC32_TLSDESC 34 |
| 2368 | #define R_X86_64_TLSDESC_CALL 35 |
| 2369 | #define R_X86_64_TLSDESC 36 |
| 2370 | #define R_X86_64_IRELATIVE 37 |
| 2371 | #define R_X86_64_RELATIVE64 38 |
| 2372 | 	/* deprecated: 39-40 */ |
| 2373 | #define R_X86_64_GOTPCRELX 41 |
| 2374 | #define R_X86_64_REX_GOTPCRELX 42 |
| 2375 | #define R_X86_64_CODE_4_GOTPCRELX 43 |
| 2376 | #define R_X86_64_CODE_4_GOTTPOFF 44 |
| 2377 | #define R_X86_64_CODE_4_GOTPC32_TLSDESC 45 |
| 2378 | #define R_X86_64_CODE_5_GOTPCRELX 46 |
| 2379 | #define R_X86_64_CODE_5_GOTTPOFF 47 |
| 2380 | #define R_X86_64_CODE_5_GOTPC32_TLSDESC 48 |
| 2381 | #define R_X86_64_CODE_6_GOTPCRELX 49 |
| 2382 | #define R_X86_64_CODE_6_GOTTPOFF 50 |
| 2383 | #define R_X86_64_CODE_6_GOTPC32_TLSDESC 51 |
| 2384 | |
| 2385 | |
| 2386 | |
| 2387 | /* |
| 2388 | * Obsolete relocation types. |
| 2389 | */ |
| 2390 | |
| 2391 | #define R_ARM_PC13	4 |
| 2392 | #define R_ARM_THM_PC22	10 |
| 2393 | #define R_ARM_AMP_VCALL9 12 |
| 2394 | #define R_ARM_SWI24	13 |
| 2395 | #define R_ARM_GOTOFF	24 |
| 2396 | #define R_ARM_GOTPC	25 |
| 2397 | #define R_ARM_GOT32	26 |
| 2398 | #define R_ARM_THM_PC11	102 |
| 2399 | #define R_ARM_THM_PC9	103 |
| 2400 | |
| 2401 | |
| 2402 | #define R_PPC64_ADDR14_BRTAKEN 8 |
| 2403 | #define R_PPC64_ADDR14_BRNTAKEN 9 |
| 2404 | #define R_PPC64_REL14_BRTAKEN 12 |
| 2405 | #define R_PPC64_REL14_BRNTAKEN 13 |
| 2406 | #define R_PPC64_ADDR30	37 |
| 2407 | |
| 2408 | |
| 2409 | #define R_RISCV_GNU_VTINHERIT 41 |
| 2410 | #define R_RISCV_GNU_VTENTRY 42 |
| 2411 | #define R_RISCV_RVC_LUI	46 |
| 2412 | #define R_RISCV_GPREL_I	47 |
| 2413 | #define R_RISCV_GPREL_S	48 |
| 2414 | #define R_RISCV_TPREL_I	49 |
| 2415 | #define R_RISCV_TPREL_S	50 |
| 2416 | |
| 2417 | |
| 2418 | #define R_SPARC_GLOB_JMP 42 |
| 2419 | |
| 2420 | |
| 2421 | #define R_X86_64_GOTPLT64 30 |
| 2422 | #define R_X86_64_PC32_BND 39 |
| 2423 | #define R_X86_64_PLT32_BND 40 |
| 2424 | |
| 2425 | |
| 2426 | |
| 2427 | /* |
| 2428 | * Alternate spellings for relocation type symbols. |
| 2429 | */ |
| 2430 | |
| 2431 | |
| 2432 | #define R_386_JMP_SLOT	7 |
| 2433 | |
| 2434 | |
| 2435 | #define R_AARCH64_TLS_TPREL64 R_AARCH64_TLS_TPREL |
| 2436 | |
| 2437 | |
| 2438 | #define R_IA64_NONE	R_IA_64_NONE |
| 2439 | #define R_IA64_IMM14	R_IA_64_IMM14 |
| 2440 | #define R_IA64_IMM22	R_IA_64_IMM22 |
| 2441 | #define R_IA64_IMM64	R_IA_64_IMM64 |
| 2442 | #define R_IA64_DIR32MSB	R_IA_64_DIR32MSB |
| 2443 | #define R_IA64_DIR32LSB	R_IA_64_DIR32LSB |
| 2444 | #define R_IA64_DIR64MSB	R_IA_64_DIR64MSB |
| 2445 | #define R_IA64_DIR64LSB	R_IA_64_DIR64LSB |
| 2446 | #define R_IA64_GPREL22	R_IA_64_GPREL22 |
| 2447 | #define R_IA64_GPREL64I	R_IA_64_GPREL64I |
| 2448 | #define R_IA64_GPREL64MSB R_IA_64_GPREL64MSB |
| 2449 | #define R_IA64_GPREL64LSB R_IA_64_GPREL64LSB |
| 2450 | #define R_IA64_LTOFF22	R_IA_64_LTOFF22 |
| 2451 | #define R_IA64_LTOFF64I	R_IA_64_LTOFF64I |
| 2452 | #define R_IA64_PLTOFF22	R_IA_64_PLTOFF22 |
| 2453 | #define R_IA64_PLTOFF64I R_IA_64_PLTOFF64I |
| 2454 | #define R_IA64_PLTOFF64MSB R_IA_64_PLTOFF64MSB |
| 2455 | #define R_IA64_PLTOFF64LSB R_IA_64_PLTOFF64LSB |
| 2456 | #define R_IA64_FPTR64I	R_IA_64_FPTR64I |
| 2457 | #define R_IA64_FPTR32MSB R_IA_64_FPTR32MSB |
| 2458 | #define R_IA64_FPTR32LSB R_IA_64_FPTR32LSB |
| 2459 | #define R_IA64_FPTR64MSB R_IA_64_FPTR64MSB |
| 2460 | #define R_IA64_FPTR64LSB R_IA_64_FPTR64LSB |
| 2461 | #define R_IA64_PCREL21B	R_IA_64_PCREL21B |
| 2462 | #define R_IA64_PCREL21M	R_IA_64_PCREL21M |
| 2463 | #define R_IA64_PCREL21F	R_IA_64_PCREL21F |
| 2464 | #define R_IA64_PCREL32MSB R_IA_64_PCREL32MSB |
| 2465 | #define R_IA64_PCREL32LSB R_IA_64_PCREL32LSB |
| 2466 | #define R_IA64_PCREL64MSB R_IA_64_PCREL64MSB |
| 2467 | #define R_IA64_PCREL64LSB R_IA_64_PCREL64LSB |
| 2468 | #define R_IA64_LTOFF_FPTR22 R_IA_64_LTOFF_FPTR22 |
| 2469 | #define R_IA64_LTOFF_FPTR64I R_IA_64_LTOFF_FPTR64I |
| 2470 | #define R_IA64_LTOFF_FPTR32MSB R_IA_64_LTOFF_FPTR32MSB |
| 2471 | #define R_IA64_LTOFF_FPTR32LSB R_IA_64_LTOFF_FPTR32LSB |
| 2472 | #define R_IA64_LTOFF_FPTR64MSB R_IA_64_LTOFF_FPTR64MSB |
| 2473 | #define R_IA64_LTOFF_FPTR64LSB R_IA_64_LTOFF_FPTR64LSB |
| 2474 | #define R_IA64_SEGREL32MSB R_IA_64_SEGREL32MSB |
| 2475 | #define R_IA64_SEGREL32LSB R_IA_64_SEGREL32LSB |
| 2476 | #define R_IA64_SEGREL64MSB R_IA_64_SEGREL64MSB |
| 2477 | #define R_IA64_SEGREL64LSB R_IA_64_SEGREL64LSB |
| 2478 | #define R_IA64_SECREL32MSB R_IA_64_SECREL32MSB |
| 2479 | #define R_IA64_SECREL32LSB R_IA_64_SECREL32LSB |
| 2480 | #define R_IA64_SECREL64MSB R_IA_64_SECREL64MSB |
| 2481 | #define R_IA64_SECREL64LSB R_IA_64_SECREL64LSB |
| 2482 | #define R_IA64_REL32MSB	R_IA_64_REL32MSB |
| 2483 | #define R_IA64_REL32LSB	R_IA_64_REL32LSB |
| 2484 | #define R_IA64_REL64MSB	R_IA_64_REL64MSB |
| 2485 | #define R_IA64_REL64LSB	R_IA_64_REL64LSB |
| 2486 | #define R_IA64_LTV32MSB	R_IA_64_LTV32MSB |
| 2487 | #define R_IA64_LTV32LSB	R_IA_64_LTV32LSB |
| 2488 | #define R_IA64_LTV64MSB	R_IA_64_LTV64MSB |
| 2489 | #define R_IA64_LTV64LSB	R_IA_64_LTV64LSB |
| 2490 | #define R_IA64_IPLTMSB	R_IA_64_IPLTMSB |
| 2491 | #define R_IA64_IPLTLSB	R_IA_64_IPLTLSB |
| 2492 | #define R_IA64_SUB	R_IA_64_SUB |
| 2493 | #define R_IA64_LTOFF22X	R_IA_64_LTOFF22X |
| 2494 | #define R_IA64_LDXMOV	R_IA_64_LDXMOV |
| 2495 | #define R_IA64_TPREL14	R_IA_64_TPREL14 |
| 2496 | #define R_IA64_TPREL22	R_IA_64_TPREL22 |
| 2497 | #define R_IA64_TPREL64I	R_IA_64_TPREL64I |
| 2498 | #define R_IA64_TPREL64MSB R_IA_64_TPREL64MSB |
| 2499 | #define R_IA64_TPREL64LSB R_IA_64_TPREL64LSB |
| 2500 | #define R_IA64_LTOFF_TPREL22 R_IA_64_LTOFF_TPREL22 |
| 2501 | #define R_IA64_DTPMOD64MSB R_IA_64_DTPMOD64MSB |
| 2502 | #define R_IA64_DTPMOD64LSB R_IA_64_DTPMOD64LSB |
| 2503 | #define R_IA64_LTOFF_DTPMOD22 R_IA_64_LTOFF_DTPMOD22 |
| 2504 | #define R_IA64_DTPREL14	R_IA_64_DTPREL14 |
| 2505 | #define R_IA64_DTPREL22	R_IA_64_DTPREL22 |
| 2506 | #define R_IA64_DTPREL64I R_IA_64_DTPREL64I |
| 2507 | #define R_IA64_DTPREL32MSB R_IA_64_DTPREL32MSB |
| 2508 | #define R_IA64_DTPREL32LSB R_IA_64_DTPREL32LSB |
| 2509 | #define R_IA64_DTPREL64MSB R_IA_64_DTPREL64MSB |
| 2510 | #define R_IA64_DTPREL64LSB R_IA_64_DTPREL64LSB |
| 2511 | #define R_IA64_LTOFF_DTPREL22 R_IA_64_LTOFF_DTPREL22 |
| 2512 | |
| 2513 | |
| 2514 | #define R_MIPS_GOT_OFST	21 /* GNU binutils, LLVM. */ |
| 2515 | #define R_MIPS_GOT_HI16	22 /* GNU binutils, LLVM. */ |
| 2516 | |
| 2517 | |
| 2518 | #define R_AMD64_NONE	R_X86_64_NONE |
| 2519 | #define R_AMD64_64	R_X86_64_64 |
| 2520 | #define R_AMD64_PC32	R_X86_64_PC32 |
| 2521 | #define R_AMD64_GOT32	R_X86_64_GOT32 |
| 2522 | #define R_AMD64_PLT32	R_X86_64_PLT32 |
| 2523 | #define R_AMD64_COPY	R_X86_64_COPY |
| 2524 | #define R_AMD64_GLOB_DAT R_X86_64_GLOB_DAT |
| 2525 | #define R_AMD64_JUMP_SLOT R_X86_64_JUMP_SLOT |
| 2526 | #define R_AMD64_RELATIVE R_X86_64_RELATIVE |
| 2527 | #define R_AMD64_GOTPCREL R_X86_64_GOTPCREL |
| 2528 | #define R_AMD64_32	R_X86_64_32 |
| 2529 | #define R_AMD64_32S	R_X86_64_32S |
| 2530 | #define R_AMD64_16	R_X86_64_16 |
| 2531 | #define R_AMD64_PC16	R_X86_64_PC16 |
| 2532 | #define R_AMD64_8	R_X86_64_8 |
| 2533 | #define R_AMD64_PC8	R_X86_64_PC8 |
| 2534 | #define R_AMD64_PC64	R_X86_64_PC64 |
| 2535 | #define R_AMD64_GOTOFF64 R_X86_64_GOTOFF64 |
| 2536 | #define R_AMD64_GOTPC32	R_X86_64_PC32 |
| 2537 | |
| 2538 | |
| 2539 | |
| 2540 | /* |
| 2541 | * MIPS ABI related. |
| 2542 | */ |
| 2543 | |
| 2544 | #define E_MIPS_ABI_O32	0x00001000 /* MIPS 32 bit ABI (UCODE) */ |
| 2545 | #define E_MIPS_ABI_O64	0x00002000 /* UCODE MIPS 64 bit ABI */ |
| 2546 | #define E_MIPS_ABI_EABI32 0x00003000 /* Embedded ABI for 32-bit */ |
| 2547 | #define E_MIPS_ABI_EABI64 0x00004000 /* Embedded ABI for 64-bit */ |
| 2548 | |
| 2549 | |
| 2550 | /** |
| 2551 | ** ELF Types. |
| 2552 | **/ |
| 2553 | |
| 2554 | typedef uint32_t	Elf32_Addr;	/* Program address. */ |
| 2555 | typedef uint8_t		Elf32_Byte;	/* Unsigned tiny integer. */ |
| 2556 | typedef uint16_t	Elf32_Half;	/* Unsigned medium integer. */ |
| 2557 | typedef uint32_t	Elf32_Off;	/* File offset. */ |
| 2558 | typedef uint16_t	Elf32_Section;	/* Section index. */ |
| 2559 | typedef int32_t		Elf32_Sword;	/* Signed integer. */ |
| 2560 | typedef uint32_t	Elf32_Word;	/* Unsigned integer. */ |
| 2561 | typedef uint64_t	Elf32_Lword;	/* Unsigned long integer. */ |
| 2562 | |
| 2563 | typedef uint64_t	Elf64_Addr;	/* Program address. */ |
| 2564 | typedef uint8_t		Elf64_Byte;	/* Unsigned tiny integer. */ |
| 2565 | typedef uint16_t	Elf64_Half;	/* Unsigned medium integer. */ |
| 2566 | typedef uint64_t	Elf64_Off;	/* File offset. */ |
| 2567 | typedef uint16_t	Elf64_Section;	/* Section index. */ |
| 2568 | typedef int32_t		Elf64_Sword;	/* Signed integer. */ |
| 2569 | typedef uint32_t	Elf64_Word;	/* Unsigned integer. */ |
| 2570 | typedef uint64_t	Elf64_Lword;	/* Unsigned long integer. */ |
| 2571 | typedef uint64_t	Elf64_Xword;	/* Unsigned long integer. */ |
| 2572 | typedef int64_t		Elf64_Sxword;	/* Signed long integer. */ |
| 2573 | |
| 2574 | |
| 2575 | /* |
| 2576 | * Capability descriptors. |
| 2577 | */ |
| 2578 | |
| 2579 | /* 32-bit capability descriptor. */ |
| 2580 | typedef struct { |
| 2581 | 	Elf32_Word	c_tag;	 /* Type of entry. */ |
| 2582 | 	union { |
| 2583 | 		Elf32_Word	c_val; /* Integer value. */ |
| 2584 | 		Elf32_Addr	c_ptr; /* Pointer value. */ |
| 2585 | 	} c_un; |
| 2586 | } Elf32_Cap; |
| 2587 | |
| 2588 | /* 64-bit capability descriptor. */ |
| 2589 | typedef struct { |
| 2590 | 	Elf64_Xword	c_tag;	 /* Type of entry. */ |
| 2591 | 	union { |
| 2592 | 		Elf64_Xword	c_val; /* Integer value. */ |
| 2593 | 		Elf64_Addr	c_ptr; /* Pointer value. */ |
| 2594 | 	} c_un; |
| 2595 | } Elf64_Cap; |
| 2596 | |
| 2597 | /* |
| 2598 | * MIPS .conflict section entries. |
| 2599 | */ |
| 2600 | |
| 2601 | /* 32-bit entry. */ |
| 2602 | typedef struct { |
| 2603 | 	Elf32_Addr	c_index; |
| 2604 | } Elf32_Conflict; |
| 2605 | |
| 2606 | /* 64-bit entry. */ |
| 2607 | typedef struct { |
| 2608 | 	Elf64_Addr	c_index; |
| 2609 | } Elf64_Conflict; |
| 2610 | |
| 2611 | /* |
| 2612 | * Dynamic section entries. |
| 2613 | */ |
| 2614 | |
| 2615 | /* 32-bit entry. */ |
| 2616 | typedef struct { |
| 2617 | 	Elf32_Sword	d_tag;	 /* Type of entry. */ |
| 2618 | 	union { |
| 2619 | 		Elf32_Word	d_val; /* Integer value. */ |
| 2620 | 		Elf32_Addr	d_ptr; /* Pointer value. */ |
| 2621 | 	} d_un; |
| 2622 | } Elf32_Dyn; |
| 2623 | |
| 2624 | /* 64-bit entry. */ |
| 2625 | typedef struct { |
| 2626 | 	Elf64_Sxword	d_tag;	 /* Type of entry. */ |
| 2627 | 	union { |
| 2628 | 		Elf64_Xword	d_val; /* Integer value. */ |
| 2629 | 		Elf64_Addr	d_ptr; /* Pointer value; */ |
| 2630 | 	} d_un; |
| 2631 | } Elf64_Dyn; |
| 2632 | |
| 2633 | |
| 2634 | /* |
| 2635 | * The executable header (EHDR). |
| 2636 | */ |
| 2637 | |
| 2638 | /* 32 bit EHDR. */ |
| 2639 | typedef struct { |
| 2640 | 	unsigned char e_ident[EI_NIDENT]; /* ELF identification. */ |
| 2641 | 	Elf32_Half e_type;	 /* Object file type (ET_*). */ |
| 2642 | 	Elf32_Half e_machine; /* Machine type (EM_*). */ |
| 2643 | 	Elf32_Word e_version; /* File format version (EV_*). */ |
| 2644 | 	Elf32_Addr e_entry; /* Start address. */ |
| 2645 | 	Elf32_Off e_phoff; /* File offset to the PHDR table. */ |
| 2646 | 	Elf32_Off e_shoff; /* File offset to the SHDRheader. */ |
| 2647 | 	Elf32_Word e_flags; /* Flags (EF_*). */ |
| 2648 | 	Elf32_Half e_ehsize; /* Elf header size in bytes. */ |
| 2649 | 	Elf32_Half e_phentsize; /* PHDR table entry size in bytes. */ |
| 2650 | 	Elf32_Half e_phnum; /* Number of PHDR entries. */ |
| 2651 | 	Elf32_Half e_shentsize; /* SHDR table entry size in bytes. */ |
| 2652 | 	Elf32_Half e_shnum; /* Number of SHDR entries. */ |
| 2653 | 	Elf32_Half e_shstrndx; /* Index of section name string table. */ |
| 2654 | } Elf32_Ehdr; |
| 2655 | |
| 2656 | |
| 2657 | /* 64 bit EHDR. */ |
| 2658 | typedef struct { |
| 2659 | 	unsigned char e_ident[EI_NIDENT]; /* ELF identification. */ |
| 2660 | 	Elf64_Half e_type;	 /* Object file type (ET_*). */ |
| 2661 | 	Elf64_Half e_machine; /* Machine type (EM_*). */ |
| 2662 | 	Elf64_Word e_version; /* File format version (EV_*). */ |
| 2663 | 	Elf64_Addr e_entry; /* Start address. */ |
| 2664 | 	Elf64_Off e_phoff; /* File offset to the PHDR table. */ |
| 2665 | 	Elf64_Off e_shoff; /* File offset to the SHDRheader. */ |
| 2666 | 	Elf64_Word e_flags; /* Flags (EF_*). */ |
| 2667 | 	Elf64_Half e_ehsize; /* Elf header size in bytes. */ |
| 2668 | 	Elf64_Half e_phentsize; /* PHDR table entry size in bytes. */ |
| 2669 | 	Elf64_Half e_phnum; /* Number of PHDR entries. */ |
| 2670 | 	Elf64_Half e_shentsize; /* SHDR table entry size in bytes. */ |
| 2671 | 	Elf64_Half e_shnum; /* Number of SHDR entries. */ |
| 2672 | 	Elf64_Half e_shstrndx; /* Index of section name string table. */ |
| 2673 | } Elf64_Ehdr; |
| 2674 | |
| 2675 | |
| 2676 | /* |
| 2677 | * Shared object information. |
| 2678 | */ |
| 2679 | |
| 2680 | /* 32-bit entry. */ |
| 2681 | typedef struct { |
| 2682 | 	Elf32_Word l_name;	 /* The name of a shared object. */ |
| 2683 | 	Elf32_Word l_time_stamp; /* 32-bit timestamp. */ |
| 2684 | 	Elf32_Word l_checksum;	 /* Checksum of visible symbols, sizes. */ |
| 2685 | 	Elf32_Word l_version;	 /* Interface version string index. */ |
| 2686 | 	Elf32_Word l_flags;	 /* Flags (LL_*). */ |
| 2687 | } Elf32_Lib; |
| 2688 | |
| 2689 | /* 64-bit entry. */ |
| 2690 | typedef struct { |
| 2691 | 	Elf64_Word l_name;	 /* The name of a shared object. */ |
| 2692 | 	Elf64_Word l_time_stamp; /* 32-bit timestamp. */ |
| 2693 | 	Elf64_Word l_checksum;	 /* Checksum of visible symbols, sizes. */ |
| 2694 | 	Elf64_Word l_version;	 /* Interface version string index. */ |
| 2695 | 	Elf64_Word l_flags;	 /* Flags (LL_*). */ |
| 2696 | } Elf64_Lib; |
| 2697 | |
| 2698 | |
| 2699 | #define LL_NONE		0 /* no flags */ |
| 2700 | #define LL_EXACT_MATCH	0x1 /* require an exact match */ |
| 2701 | #define LL_IGNORE_INT_VER 0x2 /* ignore version incompatibilities */ |
| 2702 | #define LL_REQUIRE_MINOR 0x4 |
| 2703 | #define LL_EXPORTS	0x8 |
| 2704 | #define LL_DELAY_LOAD	0x10 |
| 2705 | #define LL_DELTA	0x20 |
| 2706 | |
| 2707 | |
| 2708 | /* |
| 2709 | * Note tags |
| 2710 | */ |
| 2711 | |
| 2712 | #define NT_ABI_TAG	1 /* Tag indicating the ABI */ |
| 2713 | #define NT_GNU_HWCAP	2 /* Hardware capabilities */ |
| 2714 | #define NT_GNU_BUILD_ID	3 /* Build id, set by ld(1) */ |
| 2715 | #define NT_GNU_GOLD_VERSION 4 /* Version number of the GNU gold linker */ |
| 2716 | #define NT_PRSTATUS	1 /* Process status */ |
| 2717 | #define NT_FPREGSET	2 /* Floating point information */ |
| 2718 | #define NT_PRPSINFO	3 /* Process information */ |
| 2719 | #define NT_AUXV		6 /* Auxiliary vector */ |
| 2720 | #define NT_PRXFPREG	0x46E62B7FU /* Linux user_xfpregs structure */ |
| 2721 | #define NT_PSTATUS	10 /* Linux process status */ |
| 2722 | #define NT_FPREGS	12 /* Linux floating point regset */ |
| 2723 | #define NT_PSINFO	13 /* Linux process information */ |
| 2724 | #define NT_LWPSTATUS	16 /* Linux lwpstatus_t type */ |
| 2725 | #define NT_LWPSINFO	17 /* Linux lwpinfo_t type */ |
| 2726 | #define NT_FREEBSD_NOINIT_TAG 2 /* FreeBSD no .init tag */ |
| 2727 | #define NT_FREEBSD_ARCH_TAG 3 /* FreeBSD arch tag */ |
| 2728 | #define NT_FREEBSD_FEATURE_CTL 4 /* FreeBSD feature control */ |
| 2729 | |
| 2730 | /* Aliases for the ABI tag. */ |
| 2731 | |
| 2732 | #define NT_FREEBSD_ABI_TAG NT_ABI_TAG |
| 2733 | #define NT_GNU_ABI_TAG	NT_ABI_TAG |
| 2734 | #define NT_NETBSD_IDENT	NT_ABI_TAG |
| 2735 | #define NT_OPENBSD_IDENT NT_ABI_TAG |
| 2736 | |
| 2737 | |
| 2738 | /* |
| 2739 | * Note descriptors. |
| 2740 | */ |
| 2741 | |
| 2742 | typedef	struct { |
| 2743 | 	uint32_t	n_namesz; /* Length of note's name. */ |
| 2744 | 	uint32_t	n_descsz; /* Length of note's value. */ |
| 2745 | 	uint32_t	n_type;	 /* Type of note. */ |
| 2746 | } Elf_Note; |
| 2747 | |
| 2748 | typedef Elf_Note Elf32_Nhdr;	 /* 32-bit note header. */ |
| 2749 | typedef Elf_Note Elf64_Nhdr;	 /* 64-bit note header. */ |
| 2750 | |
| 2751 | /* |
| 2752 | * MIPS ELF options descriptor header. |
| 2753 | */ |
| 2754 | |
| 2755 | typedef struct { |
| 2756 | 	Elf64_Byte	kind; /* Type of options. */ |
| 2757 | 	Elf64_Byte 	size;	 /* Size of option descriptor. */ |
| 2758 | 	Elf64_Half	section; /* Index of section affected. */ |
| 2759 | 	Elf64_Word	info; /* Kind-specific information. */ |
| 2760 | } Elf_Options; |
| 2761 | |
| 2762 | /* |
| 2763 | * Option kinds. |
| 2764 | */ |
| 2765 | |
| 2766 | #define ODK_NULL	0 /* undefined */ |
| 2767 | #define ODK_REGINFO	1 /* register usage info */ |
| 2768 | #define ODK_EXCEPTIONS	2 /* exception processing info */ |
| 2769 | #define ODK_PAD		3 /* section padding */ |
| 2770 | #define ODK_HWPATCH	4 /* hardware patch applied */ |
| 2771 | #define ODK_FILL	5 /* fill value used by linker */ |
| 2772 | #define ODK_TAGS	6 /* reserved space for tools */ |
| 2773 | #define ODK_HWAND	7 /* hardware AND patch applied */ |
| 2774 | #define ODK_HWOR	8 /* hardware OR patch applied */ |
| 2775 | #define ODK_GP_GROUP	9 /* GP group to use for text/data sections */ |
| 2776 | #define ODK_IDENT	10 /* ID information */ |
| 2777 | #define ODK_PAGESIZE	11 /* page size information */ |
| 2778 | |
| 2779 | |
| 2780 | /* |
| 2781 | * ODK_EXCEPTIONS info field masks. |
| 2782 | */ |
| 2783 | |
| 2784 | #define OEX_FPU_MIN	0x0000001FU /* minimum FPU exception which must be enabled */ |
| 2785 | #define OEX_FPU_MAX	0x00001F00U /* maximum FPU exception which can be enabled */ |
| 2786 | #define OEX_PAGE0	0x00010000U /* page zero must be mapped */ |
| 2787 | #define OEX_SMM		0x00020000U /* run in sequential memory mode */ |
| 2788 | #define OEX_PRECISEFP	0x00040000U /* run in precise FP exception mode */ |
| 2789 | #define OEX_DISMISS	0x00080000U /* dismiss invalid address traps */ |
| 2790 | |
| 2791 | |
| 2792 | /* |
| 2793 | * ODK_PAD info field masks. |
| 2794 | */ |
| 2795 | |
| 2796 | #define OPAD_PREFIX	0x0001 |
| 2797 | #define OPAD_POSTFIX	0x0002 |
| 2798 | #define OPAD_SYMBOL	0x0004 |
| 2799 | |
| 2800 | |
| 2801 | /* |
| 2802 | * ODK_HWPATCH info field masks and ODK_HWAND/ODK_HWOR info field |
| 2803 | * and hwp_flags[12] masks. |
| 2804 | */ |
| 2805 | |
| 2806 | #define OHW_R4KEOP	0x00000001U /* patch for R4000 branch at end-of-page bug */ |
| 2807 | #define OHW_R8KPFETCH	0x00000002U /* R8000 prefetch bug may occur */ |
| 2808 | #define OHW_R5KEOP	0x00000004U /* patch for R5000 branch at end-of-page bug */ |
| 2809 | #define OHW_R5KCVTL	0x00000008U /* R5000 cvt.[ds].l bug: clean == 1 */ |
| 2810 | #define OHW_R10KLDL	0x00000010U /* need patch for R10000 misaligned load */ |
| 2811 | #define OHWA0_R4KEOP_CHECKED 0x00000001U /* object checked for R4000 end-of-page bug */ |
| 2812 | #define OHWA0_R4KEOP_CLEAN 0x00000002U /* object verified clean for R4000 end-of-page bug */ |
| 2813 | #define OHWO0_FIXADE	0x00000001U /* object requires call to fixade */ |
| 2814 | |
| 2815 | |
| 2816 | /* |
| 2817 | * ODK_IDENT/ODK_GP_GROUP info field masks. |
| 2818 | */ |
| 2819 | |
| 2820 | #define OGP_GROUP	0x0000FFFFU /* GP group number */ |
| 2821 | #define OGP_SELF	0x00010000U /* GP group is self-contained */ |
| 2822 | |
| 2823 | |
| 2824 | /* |
| 2825 | * MIPS ELF register info descriptor. |
| 2826 | */ |
| 2827 | |
| 2828 | /* 32 bit RegInfo entry. */ |
| 2829 | typedef struct { |
| 2830 | 	Elf32_Word	ri_gprmask; /* Mask of general register used. */ |
| 2831 | 	Elf32_Word	ri_cprmask[4]; /* Mask of coprocessor register used. */ |
| 2832 | 	Elf32_Addr	ri_gp_value; /* GP register value. */ |
| 2833 | } Elf32_RegInfo; |
| 2834 | |
| 2835 | /* 64 bit RegInfo entry. */ |
| 2836 | typedef struct { |
| 2837 | 	Elf64_Word	ri_gprmask; /* Mask of general register used. */ |
| 2838 | 	Elf64_Word	ri_pad;	 /* Padding. */ |
| 2839 | 	Elf64_Word	ri_cprmask[4]; /* Mask of coprocessor register used. */ |
| 2840 | 	Elf64_Addr	ri_gp_value; /* GP register value. */ |
| 2841 | } Elf64_RegInfo; |
| 2842 | |
| 2843 | /* |
| 2844 | * Program Header Table (PHDR) entries. |
| 2845 | */ |
| 2846 | |
| 2847 | /* 32 bit PHDR entry. */ |
| 2848 | typedef struct { |
| 2849 | 	Elf32_Word	p_type;	 /* Type of segment. */ |
| 2850 | 	Elf32_Off	p_offset; /* File offset to segment. */ |
| 2851 | 	Elf32_Addr	p_vaddr; /* Virtual address in memory. */ |
| 2852 | 	Elf32_Addr	p_paddr; /* Physical address (if relevant). */ |
| 2853 | 	Elf32_Word	p_filesz; /* Size of segment in file. */ |
| 2854 | 	Elf32_Word	p_memsz; /* Size of segment in memory. */ |
| 2855 | 	Elf32_Word	p_flags; /* Segment flags. */ |
| 2856 | 	Elf32_Word	p_align; /* Alignment constraints. */ |
| 2857 | } Elf32_Phdr; |
| 2858 | |
| 2859 | /* 64 bit PHDR entry. */ |
| 2860 | typedef struct { |
| 2861 | 	Elf64_Word	p_type;	 /* Type of segment. */ |
| 2862 | 	Elf64_Word	p_flags; /* Segment flags. */ |
| 2863 | 	Elf64_Off	p_offset; /* File offset to segment. */ |
| 2864 | 	Elf64_Addr	p_vaddr; /* Virtual address in memory. */ |
| 2865 | 	Elf64_Addr	p_paddr; /* Physical address (if relevant). */ |
| 2866 | 	Elf64_Xword	p_filesz; /* Size of segment in file. */ |
| 2867 | 	Elf64_Xword	p_memsz; /* Size of segment in memory. */ |
| 2868 | 	Elf64_Xword	p_align; /* Alignment constraints. */ |
| 2869 | } Elf64_Phdr; |
| 2870 | |
| 2871 | |
| 2872 | /* |
| 2873 | * Move entries, for describing data in COMMON blocks in a compact |
| 2874 | * manner. |
| 2875 | */ |
| 2876 | |
| 2877 | /* 32-bit move entry. */ |
| 2878 | typedef struct { |
| 2879 | 	Elf32_Lword	m_value; /* Initialization value. */ |
| 2880 | 	Elf32_Word 	m_info;	 /* Encoded size and index. */ |
| 2881 | 	Elf32_Word	m_poffset; /* Offset relative to symbol. */ |
| 2882 | 	Elf32_Half	m_repeat; /* Repeat count. */ |
| 2883 | 	Elf32_Half	m_stride; /* Number of units to skip. */ |
| 2884 | } Elf32_Move; |
| 2885 | |
| 2886 | /* 64-bit move entry. */ |
| 2887 | typedef struct { |
| 2888 | 	Elf64_Lword	m_value; /* Initialization value. */ |
| 2889 | 	Elf64_Xword 	m_info;	 /* Encoded size and index. */ |
| 2890 | 	Elf64_Xword	m_poffset; /* Offset relative to symbol. */ |
| 2891 | 	Elf64_Half	m_repeat; /* Repeat count. */ |
| 2892 | 	Elf64_Half	m_stride; /* Number of units to skip. */ |
| 2893 | } Elf64_Move; |
| 2894 | |
| 2895 | #define ELF32_M_SYM(I)		((I) >> 8) |
| 2896 | #define ELF32_M_SIZE(I)		((unsigned char) (I)) |
| 2897 | #define ELF32_M_INFO(M, S)	(((M) << 8) + (unsigned char) (S)) |
| 2898 | |
| 2899 | #define ELF64_M_SYM(I)		((I) >> 8) |
| 2900 | #define ELF64_M_SIZE(I)		((unsigned char) (I)) |
| 2901 | #define ELF64_M_INFO(M, S)	(((M) << 8) + (unsigned char) (S)) |
| 2902 | |
| 2903 | /* |
| 2904 | * Section Header Table (SHDR) entries. |
| 2905 | */ |
| 2906 | |
| 2907 | /* 32 bit SHDR */ |
| 2908 | typedef struct { |
| 2909 | 	Elf32_Word	sh_name; /* index of section name */ |
| 2910 | 	Elf32_Word	sh_type; /* section type */ |
| 2911 | 	Elf32_Word	sh_flags; /* section flags */ |
| 2912 | 	Elf32_Addr	sh_addr; /* in-memory address of section */ |
| 2913 | 	Elf32_Off	sh_offset; /* file offset of section */ |
| 2914 | 	Elf32_Word	sh_size; /* section size in bytes */ |
| 2915 | 	Elf32_Word	sh_link; /* section header table link */ |
| 2916 | 	Elf32_Word	sh_info; /* extra information */ |
| 2917 | 	Elf32_Word	sh_addralign; /* alignment constraint */ |
| 2918 | 	Elf32_Word	sh_entsize; /* size for fixed-size entries */ |
| 2919 | } Elf32_Shdr; |
| 2920 | |
| 2921 | /* 64 bit SHDR */ |
| 2922 | typedef struct { |
| 2923 | 	Elf64_Word	sh_name; /* index of section name */ |
| 2924 | 	Elf64_Word	sh_type; /* section type */ |
| 2925 | 	Elf64_Xword	sh_flags; /* section flags */ |
| 2926 | 	Elf64_Addr	sh_addr; /* in-memory address of section */ |
| 2927 | 	Elf64_Off	sh_offset; /* file offset of section */ |
| 2928 | 	Elf64_Xword	sh_size; /* section size in bytes */ |
| 2929 | 	Elf64_Word	sh_link; /* section header table link */ |
| 2930 | 	Elf64_Word	sh_info; /* extra information */ |
| 2931 | 	Elf64_Xword	sh_addralign; /* alignment constraint */ |
| 2932 | 	Elf64_Xword	sh_entsize; /* size for fixed-size entries */ |
| 2933 | } Elf64_Shdr; |
| 2934 | |
| 2935 | |
| 2936 | /* |
| 2937 | * Symbol table entries. |
| 2938 | */ |
| 2939 | |
| 2940 | typedef struct { |
| 2941 | 	Elf32_Word	st_name; /* index of symbol's name */ |
| 2942 | 	Elf32_Addr	st_value; /* value for the symbol */ |
| 2943 | 	Elf32_Word	st_size; /* size of associated data */ |
| 2944 | 	unsigned char	st_info; /* type and binding attributes */ |
| 2945 | 	unsigned char	st_other; /* visibility */ |
| 2946 | 	Elf32_Half	st_shndx; /* index of related section */ |
| 2947 | } Elf32_Sym; |
| 2948 | |
| 2949 | typedef struct { |
| 2950 | 	Elf64_Word	st_name; /* index of symbol's name */ |
| 2951 | 	unsigned char	st_info; /* type and binding attributes */ |
| 2952 | 	unsigned char	st_other; /* visibility */ |
| 2953 | 	Elf64_Half	st_shndx; /* index of related section */ |
| 2954 | 	Elf64_Addr	st_value; /* value for the symbol */ |
| 2955 | 	Elf64_Xword	st_size; /* size of associated data */ |
| 2956 | } Elf64_Sym; |
| 2957 | |
| 2958 | #define ELF32_ST_BIND(I)	((I) >> 4) |
| 2959 | #define ELF32_ST_TYPE(I)	((I) & 0xFU) |
| 2960 | #define ELF32_ST_INFO(B,T)	(((B) << 4) + ((T) & 0xF)) |
| 2961 | |
| 2962 | #define ELF64_ST_BIND(I)	((I) >> 4) |
| 2963 | #define ELF64_ST_TYPE(I)	((I) & 0xFU) |
| 2964 | #define ELF64_ST_INFO(B,T)	(((B) << 4) + ((T) & 0xF)) |
| 2965 | |
| 2966 | #define ELF32_ST_VISIBILITY(O)	((O) & 0x3) |
| 2967 | #define ELF64_ST_VISIBILITY(O)	((O) & 0x3) |
| 2968 | |
| 2969 | /* |
| 2970 | * Syminfo descriptors, containing additional symbol information. |
| 2971 | */ |
| 2972 | |
| 2973 | /* 32-bit entry. */ |
| 2974 | typedef struct { |
| 2975 | 	Elf32_Half	si_boundto; /* Entry index with additional flags. */ |
| 2976 | 	Elf32_Half	si_flags; /* Flags. */ |
| 2977 | } Elf32_Syminfo; |
| 2978 | |
| 2979 | /* 64-bit entry. */ |
| 2980 | typedef struct { |
| 2981 | 	Elf64_Half	si_boundto; /* Entry index with additional flags. */ |
| 2982 | 	Elf64_Half	si_flags; /* Flags. */ |
| 2983 | } Elf64_Syminfo; |
| 2984 | |
| 2985 | /* |
| 2986 | * Relocation descriptors. |
| 2987 | */ |
| 2988 | |
| 2989 | typedef struct { |
| 2990 | 	Elf32_Addr	r_offset; /* location to apply relocation to */ |
| 2991 | 	Elf32_Word	r_info;	 /* type+section for relocation */ |
| 2992 | } Elf32_Rel; |
| 2993 | |
| 2994 | typedef struct { |
| 2995 | 	Elf32_Addr	r_offset; /* location to apply relocation to */ |
| 2996 | 	Elf32_Word	r_info; /* type+section for relocation */ |
| 2997 | 	Elf32_Sword	r_addend; /* constant addend */ |
| 2998 | } Elf32_Rela; |
| 2999 | |
| 3000 | typedef struct { |
| 3001 | 	Elf64_Addr	r_offset; /* location to apply relocation to */ |
| 3002 | 	Elf64_Xword	r_info; /* type+section for relocation */ |
| 3003 | } Elf64_Rel; |
| 3004 | |
| 3005 | typedef struct { |
| 3006 | 	Elf64_Addr	r_offset; /* location to apply relocation to */ |
| 3007 | 	Elf64_Xword	r_info; /* type+section for relocation */ |
| 3008 | 	Elf64_Sxword	r_addend; /* constant addend */ |
| 3009 | } Elf64_Rela; |
| 3010 | |
| 3011 | |
| 3012 | #define ELF32_R_SYM(I)		((I) >> 8) |
| 3013 | #define ELF32_R_TYPE(I)		((unsigned char) (I)) |
| 3014 | #define ELF32_R_INFO(S,T)	(((S) << 8) + (unsigned char) (T)) |
| 3015 | |
| 3016 | #define ELF64_R_SYM(I)		((I) >> 32) |
| 3017 | #define ELF64_R_TYPE(I)		((I) & 0xFFFFFFFFUL) |
| 3018 | #define ELF64_R_INFO(S,T)	\ |
| 3019 | 	(((Elf64_Xword) (S) << 32) + ((T) & 0xFFFFFFFFUL)) |
| 3020 | |
| 3021 | /* |
| 3022 | * Symbol versioning structures. |
| 3023 | */ |
| 3024 | |
| 3025 | /* 32-bit structures. */ |
| 3026 | typedef struct |
| 3027 | { |
| 3028 | 	Elf32_Word	vda_name; /* Index to name. */ |
| 3029 | 	Elf32_Word	vda_next; /* Offset to next entry. */ |
| 3030 | } Elf32_Verdaux; |
| 3031 | |
| 3032 | typedef struct |
| 3033 | { |
| 3034 | 	Elf32_Word	vna_hash; /* Hash value of dependency name. */ |
| 3035 | 	Elf32_Half	vna_flags; /* Flags. */ |
| 3036 | 	Elf32_Half	vna_other; /* Unused. */ |
| 3037 | 	Elf32_Word	vna_name; /* Offset to dependency name. */ |
| 3038 | 	Elf32_Word	vna_next; /* Offset to next vernaux entry. */ |
| 3039 | } Elf32_Vernaux; |
| 3040 | |
| 3041 | typedef struct |
| 3042 | { |
| 3043 | 	Elf32_Half	vd_version; /* Version information. */ |
| 3044 | 	Elf32_Half	vd_flags; /* Flags. */ |
| 3045 | 	Elf32_Half	vd_ndx;	 /* Index into the versym section. */ |
| 3046 | 	Elf32_Half	vd_cnt;	 /* Number of aux entries. */ |
| 3047 | 	Elf32_Word	vd_hash; /* Hash value of name. */ |
| 3048 | 	Elf32_Word	vd_aux;	 /* Offset to aux entries. */ |
| 3049 | 	Elf32_Word	vd_next; /* Offset to next version definition. */ |
| 3050 | } Elf32_Verdef; |
| 3051 | |
| 3052 | typedef struct |
| 3053 | { |
| 3054 | 	Elf32_Half	vn_version; /* Version number. */ |
| 3055 | 	Elf32_Half	vn_cnt;	 /* Number of aux entries. */ |
| 3056 | 	Elf32_Word	vn_file; /* Offset of associated file name. */ |
| 3057 | 	Elf32_Word	vn_aux;	 /* Offset of vernaux array. */ |
| 3058 | 	Elf32_Word	vn_next; /* Offset of next verneed entry. */ |
| 3059 | } Elf32_Verneed; |
| 3060 | |
| 3061 | typedef Elf32_Half	Elf32_Versym; |
| 3062 | |
| 3063 | /* 64-bit structures. */ |
| 3064 | |
| 3065 | typedef struct { |
| 3066 | 	Elf64_Word	vda_name; /* Index to name. */ |
| 3067 | 	Elf64_Word	vda_next; /* Offset to next entry. */ |
| 3068 | } Elf64_Verdaux; |
| 3069 | |
| 3070 | typedef struct { |
| 3071 | 	Elf64_Word	vna_hash; /* Hash value of dependency name. */ |
| 3072 | 	Elf64_Half	vna_flags; /* Flags. */ |
| 3073 | 	Elf64_Half	vna_other; /* Unused. */ |
| 3074 | 	Elf64_Word	vna_name; /* Offset to dependency name. */ |
| 3075 | 	Elf64_Word	vna_next; /* Offset to next vernaux entry. */ |
| 3076 | } Elf64_Vernaux; |
| 3077 | |
| 3078 | typedef struct { |
| 3079 | 	Elf64_Half	vd_version; /* Version information. */ |
| 3080 | 	Elf64_Half	vd_flags; /* Flags. */ |
| 3081 | 	Elf64_Half	vd_ndx;	 /* Index into the versym section. */ |
| 3082 | 	Elf64_Half	vd_cnt;	 /* Number of aux entries. */ |
| 3083 | 	Elf64_Word	vd_hash; /* Hash value of name. */ |
| 3084 | 	Elf64_Word	vd_aux;	 /* Offset to aux entries. */ |
| 3085 | 	Elf64_Word	vd_next; /* Offset to next version definition. */ |
| 3086 | } Elf64_Verdef; |
| 3087 | |
| 3088 | typedef struct { |
| 3089 | 	Elf64_Half	vn_version; /* Version number. */ |
| 3090 | 	Elf64_Half	vn_cnt;	 /* Number of aux entries. */ |
| 3091 | 	Elf64_Word	vn_file; /* Offset of associated file name. */ |
| 3092 | 	Elf64_Word	vn_aux;	 /* Offset of vernaux array. */ |
| 3093 | 	Elf64_Word	vn_next; /* Offset of next verneed entry. */ |
| 3094 | } Elf64_Verneed; |
| 3095 | |
| 3096 | typedef Elf64_Half	Elf64_Versym; |
| 3097 | |
| 3098 | |
| 3099 | /* |
| 3100 | * The header for GNU-style hash sections. |
| 3101 | */ |
| 3102 | |
| 3103 | typedef struct { |
| 3104 | 	uint32_t	gh_nbuckets;	/* Number of hash buckets. */ |
| 3105 | 	uint32_t	gh_symndx;	/* First visible symbol in .dynsym. */ |
| 3106 | 	uint32_t	gh_maskwords;	/* #maskwords used in bloom filter. */ |
| 3107 | 	uint32_t	gh_shift2;	/* Bloom filter shift count. */ |
| 3108 | } Elf_GNU_Hash_Header; |
| 3109 | |
| 3110 | #endif	/* _SYS_ELFDEFINITIONS_H_ */ |