1e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom//===-- llvm/Support/ELF.h - ELF constants and data structures --*- C++ -*-===// 2e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// 3e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// The LLVM Compiler Infrastructure 4e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// 5e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// This file is distributed under the University of Illinois Open Source 6e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// License. See LICENSE.TXT for details. 7e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// 8e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom//===----------------------------------------------------------------------===// 9e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// 10e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// This header contains common, non-processor-specific data structures and 11e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// constants for the ELF file format. 12e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// 13e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// The details of the ELF32 bits in this file are largely based on the Tool 14e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Interface Standard (TIS) Executable and Linking Format (ELF) Specification 15e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Version 1.2, May 1995. The ELF64 stuff is based on ELF-64 Object File Format 16e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Version 1.5, Draft 2, May 1998 as well as OpenBSD header files. 17e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// 18e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom//===----------------------------------------------------------------------===// 19e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 20e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// BEGIN android-changed 21e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom#ifndef ART_RUNTIME_ELF_H_ 22e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom#define ART_RUNTIME_ELF_H_ 23e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// END android-changed 24e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 25e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// BEGIN android-changed 26e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom#include <stdint.h> 27e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom#include <string.h> 28e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// END android-changed 29e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 30e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef uint32_t Elf32_Addr; // Program address 31e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef uint32_t Elf32_Off; // File offset 32e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef uint16_t Elf32_Half; 33e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef uint32_t Elf32_Word; 34e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef int32_t Elf32_Sword; 35e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 36e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef uint64_t Elf64_Addr; 37e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef uint64_t Elf64_Off; 38e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef uint16_t Elf64_Half; 39e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef uint32_t Elf64_Word; 40e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef int32_t Elf64_Sword; 41e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef uint64_t Elf64_Xword; 42e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromtypedef int64_t Elf64_Sxword; 43e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 44e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Object file magic string. 456e9cc3912b07d21ced1278eafdd213bc87b25635Mathieu Chartierstatic constexpr char ElfMagic[] = { 0x7f, 'E', 'L', 'F', '\0' }; 46e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 47e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// e_ident size and indices. 48e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 49e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EI_MAG0 = 0, // File identification index. 50e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EI_MAG1 = 1, // File identification index. 51e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EI_MAG2 = 2, // File identification index. 52e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EI_MAG3 = 3, // File identification index. 53e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EI_CLASS = 4, // File class. 54e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EI_DATA = 5, // Data encoding. 55e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EI_VERSION = 6, // File version. 56e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EI_OSABI = 7, // OS/ABI identification. 57e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EI_ABIVERSION = 8, // ABI version. 58e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EI_PAD = 9, // Start of padding bytes. 59e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EI_NIDENT = 16 // Number of bytes in e_ident. 60e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 61e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 62e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// BEGIN android-added for <elf.h> compat 636e9cc3912b07d21ced1278eafdd213bc87b25635Mathieu Chartierconstexpr char ELFMAG0 = ElfMagic[EI_MAG0]; 646e9cc3912b07d21ced1278eafdd213bc87b25635Mathieu Chartierconstexpr char ELFMAG1 = ElfMagic[EI_MAG1]; 656e9cc3912b07d21ced1278eafdd213bc87b25635Mathieu Chartierconstexpr char ELFMAG2 = ElfMagic[EI_MAG2]; 666e9cc3912b07d21ced1278eafdd213bc87b25635Mathieu Chartierconstexpr char ELFMAG3 = ElfMagic[EI_MAG3]; 67e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// END android-added for <elf.h> compat 68e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 69e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf32_Ehdr { 70e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char e_ident[EI_NIDENT]; // ELF Identification bytes 71e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Half e_type; // Type of file (see ET_* below) 72e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Half e_machine; // Required architecture for this file (see EM_*) 73e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word e_version; // Must be equal to 1 74e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Addr e_entry; // Address to jump to in order to start program 75e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Off e_phoff; // Program header table's file offset, in bytes 76e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Off e_shoff; // Section header table's file offset, in bytes 77e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word e_flags; // Processor-specific flags 78e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Half e_ehsize; // Size of ELF header, in bytes 79e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Half e_phentsize; // Size of an entry in the program header table 80e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Half e_phnum; // Number of entries in the program header table 81e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Half e_shentsize; // Size of an entry in the section header table 82e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Half e_shnum; // Number of entries in the section header table 83e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Half e_shstrndx; // Sect hdr table index of sect name string table 84e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom bool checkMagic() const { 85e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom return (memcmp(e_ident, ElfMagic, strlen(ElfMagic))) == 0; 86e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } 87e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char getFileClass() const { return e_ident[EI_CLASS]; } 88e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char getDataEncoding() const { return e_ident[EI_DATA]; } 89e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 90e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 91e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// 64-bit ELF header. Fields are the same as for ELF32, but with different 92e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// types (see above). 93e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf64_Ehdr { 94e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char e_ident[EI_NIDENT]; 95e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Half e_type; 96e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Half e_machine; 97e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word e_version; 98e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Addr e_entry; 99e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Off e_phoff; 100e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Off e_shoff; 101e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word e_flags; 102e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Half e_ehsize; 103e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Half e_phentsize; 104e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Half e_phnum; 105e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Half e_shentsize; 106e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Half e_shnum; 107e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Half e_shstrndx; 108e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom bool checkMagic() const { 109e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom return (memcmp(e_ident, ElfMagic, strlen(ElfMagic))) == 0; 110e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } 111e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char getFileClass() const { return e_ident[EI_CLASS]; } 112e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char getDataEncoding() const { return e_ident[EI_DATA]; } 113e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 114e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 115e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// File types 116e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 117e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ET_NONE = 0, // No file type 118e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ET_REL = 1, // Relocatable file 119e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ET_EXEC = 2, // Executable file 120e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ET_DYN = 3, // Shared object file 121e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ET_CORE = 4, // Core file 122e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ET_LOPROC = 0xff00, // Beginning of processor-specific codes 123e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ET_HIPROC = 0xffff // Processor-specific 124e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 125e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 126e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Versioning 127e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 128e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EV_NONE = 0, 129e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EV_CURRENT = 1 130e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 131e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 132e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Machine architectures 133e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 134e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_NONE = 0, // No machine 135e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_M32 = 1, // AT&T WE 32100 136e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SPARC = 2, // SPARC 137e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_386 = 3, // Intel 386 138e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_68K = 4, // Motorola 68000 139e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_88K = 5, // Motorola 88000 140e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_486 = 6, // Intel 486 (deprecated) 141e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_860 = 7, // Intel 80860 142e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MIPS = 8, // MIPS R3000 143e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_S370 = 9, // IBM System/370 144e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MIPS_RS3_LE = 10, // MIPS RS3000 Little-endian 145e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_PARISC = 15, // Hewlett-Packard PA-RISC 146e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_VPP500 = 17, // Fujitsu VPP500 147e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SPARC32PLUS = 18, // Enhanced instruction set SPARC 148e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_960 = 19, // Intel 80960 149e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_PPC = 20, // PowerPC 150e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_PPC64 = 21, // PowerPC64 151e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_S390 = 22, // IBM System/390 152e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SPU = 23, // IBM SPU/SPC 153e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_V800 = 36, // NEC V800 154e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_FR20 = 37, // Fujitsu FR20 155e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_RH32 = 38, // TRW RH-32 156e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_RCE = 39, // Motorola RCE 157e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ARM = 40, // ARM 158e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ALPHA = 41, // DEC Alpha 159e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SH = 42, // Hitachi SH 160e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SPARCV9 = 43, // SPARC V9 161e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TRICORE = 44, // Siemens TriCore 162e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ARC = 45, // Argonaut RISC Core 163e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_H8_300 = 46, // Hitachi H8/300 164e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_H8_300H = 47, // Hitachi H8/300H 165e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_H8S = 48, // Hitachi H8S 166e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_H8_500 = 49, // Hitachi H8/500 167e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_IA_64 = 50, // Intel IA-64 processor architecture 168e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MIPS_X = 51, // Stanford MIPS-X 169e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_COLDFIRE = 52, // Motorola ColdFire 170e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_68HC12 = 53, // Motorola M68HC12 171e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MMA = 54, // Fujitsu MMA Multimedia Accelerator 172e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_PCP = 55, // Siemens PCP 173e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_NCPU = 56, // Sony nCPU embedded RISC processor 174e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_NDR1 = 57, // Denso NDR1 microprocessor 175e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_STARCORE = 58, // Motorola Star*Core processor 176e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ME16 = 59, // Toyota ME16 processor 177e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ST100 = 60, // STMicroelectronics ST100 processor 178e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TINYJ = 61, // Advanced Logic Corp. TinyJ embedded processor family 179e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_X86_64 = 62, // AMD x86-64 architecture 180e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_PDSP = 63, // Sony DSP Processor 181e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_PDP10 = 64, // Digital Equipment Corp. PDP-10 182e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_PDP11 = 65, // Digital Equipment Corp. PDP-11 183e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_FX66 = 66, // Siemens FX66 microcontroller 184e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ST9PLUS = 67, // STMicroelectronics ST9+ 8/16 bit microcontroller 185e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ST7 = 68, // STMicroelectronics ST7 8-bit microcontroller 186e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_68HC16 = 69, // Motorola MC68HC16 Microcontroller 187e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_68HC11 = 70, // Motorola MC68HC11 Microcontroller 188e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_68HC08 = 71, // Motorola MC68HC08 Microcontroller 189e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_68HC05 = 72, // Motorola MC68HC05 Microcontroller 190e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SVX = 73, // Silicon Graphics SVx 191e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ST19 = 74, // STMicroelectronics ST19 8-bit microcontroller 192e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_VAX = 75, // Digital VAX 193e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_CRIS = 76, // Axis Communications 32-bit embedded processor 194e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_JAVELIN = 77, // Infineon Technologies 32-bit embedded processor 195e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_FIREPATH = 78, // Element 14 64-bit DSP Processor 196e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ZSP = 79, // LSI Logic 16-bit DSP Processor 197e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MMIX = 80, // Donald Knuth's educational 64-bit processor 198e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_HUANY = 81, // Harvard University machine-independent object files 199e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_PRISM = 82, // SiTera Prism 200e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_AVR = 83, // Atmel AVR 8-bit microcontroller 201e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_FR30 = 84, // Fujitsu FR30 202e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_D10V = 85, // Mitsubishi D10V 203e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_D30V = 86, // Mitsubishi D30V 204e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_V850 = 87, // NEC v850 205e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_M32R = 88, // Mitsubishi M32R 206e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MN10300 = 89, // Matsushita MN10300 207e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MN10200 = 90, // Matsushita MN10200 208e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_PJ = 91, // picoJava 209e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_OPENRISC = 92, // OpenRISC 32-bit embedded processor 210e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ARC_COMPACT = 93, // ARC International ARCompact processor (old 211e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // spelling/synonym: EM_ARC_A5) 212e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_XTENSA = 94, // Tensilica Xtensa Architecture 213e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_VIDEOCORE = 95, // Alphamosaic VideoCore processor 214e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TMM_GPP = 96, // Thompson Multimedia General Purpose Processor 215e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_NS32K = 97, // National Semiconductor 32000 series 216e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TPC = 98, // Tenor Network TPC processor 217e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SNP1K = 99, // Trebia SNP 1000 processor 218e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ST200 = 100, // STMicroelectronics (www.st.com) ST200 219e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_IP2K = 101, // Ubicom IP2xxx microcontroller family 220e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MAX = 102, // MAX Processor 221e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_CR = 103, // National Semiconductor CompactRISC microprocessor 222e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_F2MC16 = 104, // Fujitsu F2MC16 223e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MSP430 = 105, // Texas Instruments embedded microcontroller msp430 224e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_BLACKFIN = 106, // Analog Devices Blackfin (DSP) processor 225e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SE_C33 = 107, // S1C33 Family of Seiko Epson processors 226e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SEP = 108, // Sharp embedded microprocessor 227e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ARCA = 109, // Arca RISC Microprocessor 228e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_UNICORE = 110, // Microprocessor series from PKU-Unity Ltd. and MPRC 229e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // of Peking University 230e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_EXCESS = 111, // eXcess: 16/32/64-bit configurable embedded CPU 231e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_DXP = 112, // Icera Semiconductor Inc. Deep Execution Processor 232e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ALTERA_NIOS2 = 113, // Altera Nios II soft-core processor 233e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_CRX = 114, // National Semiconductor CompactRISC CRX 234e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_XGATE = 115, // Motorola XGATE embedded processor 235e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_C166 = 116, // Infineon C16x/XC16x processor 236e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_M16C = 117, // Renesas M16C series microprocessors 237e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_DSPIC30F = 118, // Microchip Technology dsPIC30F Digital Signal 238e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Controller 239e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_CE = 119, // Freescale Communication Engine RISC core 240e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_M32C = 120, // Renesas M32C series microprocessors 241e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TSK3000 = 131, // Altium TSK3000 core 242e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_RS08 = 132, // Freescale RS08 embedded processor 243e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SHARC = 133, // Analog Devices SHARC family of 32-bit DSP 244e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // processors 245e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ECOG2 = 134, // Cyan Technology eCOG2 microprocessor 246e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SCORE7 = 135, // Sunplus S+core7 RISC processor 247e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_DSP24 = 136, // New Japan Radio (NJR) 24-bit DSP Processor 248e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_VIDEOCORE3 = 137, // Broadcom VideoCore III processor 249e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_LATTICEMICO32 = 138, // RISC processor for Lattice FPGA architecture 250e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SE_C17 = 139, // Seiko Epson C17 family 251e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TI_C6000 = 140, // The Texas Instruments TMS320C6000 DSP family 252e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TI_C2000 = 141, // The Texas Instruments TMS320C2000 DSP family 253e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TI_C5500 = 142, // The Texas Instruments TMS320C55x DSP family 254e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MMDSP_PLUS = 160, // STMicroelectronics 64bit VLIW Data Signal Processor 255e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_CYPRESS_M8C = 161, // Cypress M8C microprocessor 256e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_R32C = 162, // Renesas R32C series microprocessors 257e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TRIMEDIA = 163, // NXP Semiconductors TriMedia architecture family 258e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_HEXAGON = 164, // Qualcomm Hexagon processor 259e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_8051 = 165, // Intel 8051 and variants 260e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_STXP7X = 166, // STMicroelectronics STxP7x family of configurable 261e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // and extensible RISC processors 262e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_NDS32 = 167, // Andes Technology compact code size embedded RISC 263e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // processor family 264e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ECOG1 = 168, // Cyan Technology eCOG1X family 265e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ECOG1X = 168, // Cyan Technology eCOG1X family 266e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MAXQ30 = 169, // Dallas Semiconductor MAXQ30 Core Micro-controllers 267e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_XIMO16 = 170, // New Japan Radio (NJR) 16-bit DSP Processor 268e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MANIK = 171, // M2000 Reconfigurable RISC Microprocessor 269e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_CRAYNV2 = 172, // Cray Inc. NV2 vector architecture 270e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_RX = 173, // Renesas RX family 271e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_METAG = 174, // Imagination Technologies META processor 272e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // architecture 273e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_MCST_ELBRUS = 175, // MCST Elbrus general purpose hardware architecture 274e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ECOG16 = 176, // Cyan Technology eCOG16 family 275e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_CR16 = 177, // National Semiconductor CompactRISC CR16 16-bit 276e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // microprocessor 277e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ETPU = 178, // Freescale Extended Time Processing Unit 278e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_SLE9X = 179, // Infineon Technologies SLE9X core 279e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_L10M = 180, // Intel L10M 280e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_K10M = 181, // Intel K10M 281e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_AARCH64 = 183, // ARM AArch64 282e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_AVR32 = 185, // Atmel Corporation 32-bit microprocessor family 283e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_STM8 = 186, // STMicroeletronics STM8 8-bit microcontroller 284e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TILE64 = 187, // Tilera TILE64 multicore architecture family 285e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TILEPRO = 188, // Tilera TILEPro multicore architecture family 286e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_CUDA = 190, // NVIDIA CUDA architecture 287e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_TILEGX = 191, // Tilera TILE-Gx multicore architecture family 288e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_CLOUDSHIELD = 192, // CloudShield architecture family 289e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_COREA_1ST = 193, // KIPO-KAIST Core-A 1st generation processor family 290e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_COREA_2ND = 194, // KIPO-KAIST Core-A 2nd generation processor family 291e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_ARC_COMPACT2 = 195, // Synopsys ARCompact V2 292e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_OPEN8 = 196, // Open8 8-bit RISC soft processor core 293e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_RL78 = 197, // Renesas RL78 family 294e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_VIDEOCORE5 = 198, // Broadcom VideoCore V processor 295e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_78KOR = 199, // Renesas 78KOR family 296e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EM_56800EX = 200 // Freescale 56800EX Digital Signal Controller (DSC) 297e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 298e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 299e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Object file classes. 300e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 301e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFCLASSNONE = 0, 302e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFCLASS32 = 1, // 32-bit object file 303e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFCLASS64 = 2 // 64-bit object file 304e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 305e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 306e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Object file byte orderings. 307e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 308e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFDATANONE = 0, // Invalid data encoding. 309e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFDATA2LSB = 1, // Little-endian object file 310e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFDATA2MSB = 2 // Big-endian object file 311e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 312e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 313e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// OS ABI identification. 314e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 315e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_NONE = 0, // UNIX System V ABI 316e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_HPUX = 1, // HP-UX operating system 317e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_NETBSD = 2, // NetBSD 318e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_GNU = 3, // GNU/Linux 319e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_LINUX = 3, // Historical alias for ELFOSABI_GNU. 320e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_HURD = 4, // GNU/Hurd 321e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_SOLARIS = 6, // Solaris 322e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_AIX = 7, // AIX 323e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_IRIX = 8, // IRIX 324e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_FREEBSD = 9, // FreeBSD 325e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_TRU64 = 10, // TRU64 UNIX 326e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_MODESTO = 11, // Novell Modesto 327e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_OPENBSD = 12, // OpenBSD 328e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_OPENVMS = 13, // OpenVMS 329e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_NSK = 14, // Hewlett-Packard Non-Stop Kernel 330e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_AROS = 15, // AROS 331e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_FENIXOS = 16, // FenixOS 332e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_C6000_ELFABI = 64, // Bare-metal TMS320C6000 333e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_C6000_LINUX = 65, // Linux TMS320C6000 334e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_ARM = 97, // ARM 335e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom ELFOSABI_STANDALONE = 255 // Standalone (embedded) application 336e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 337e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 338e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// X86_64 relocations. 339e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 340e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_NONE = 0, 341e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_64 = 1, 342e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_PC32 = 2, 343e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_GOT32 = 3, 344e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_PLT32 = 4, 345e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_COPY = 5, 346e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_GLOB_DAT = 6, 347e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_JUMP_SLOT = 7, 348e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_RELATIVE = 8, 349e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_GOTPCREL = 9, 350e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_32 = 10, 351e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_32S = 11, 352e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_16 = 12, 353e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_PC16 = 13, 354e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_8 = 14, 355e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_PC8 = 15, 356e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_DTPMOD64 = 16, 357e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_DTPOFF64 = 17, 358e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_TPOFF64 = 18, 359e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_TLSGD = 19, 360e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_TLSLD = 20, 361e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_DTPOFF32 = 21, 362e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_GOTTPOFF = 22, 363e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_TPOFF32 = 23, 364e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_PC64 = 24, 365e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_GOTOFF64 = 25, 366e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_GOTPC32 = 26, 367e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_GOT64 = 27, 368e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_GOTPCREL64 = 28, 369e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_GOTPC64 = 29, 370e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_GOTPLT64 = 30, 371e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_PLTOFF64 = 31, 372e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_SIZE32 = 32, 373e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_SIZE64 = 33, 374e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_GOTPC32_TLSDESC = 34, 375e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_TLSDESC_CALL = 35, 376e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_TLSDESC = 36, 377e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_X86_64_IRELATIVE = 37 378e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 379e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 380e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// i386 relocations. 381e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// TODO: this is just a subset 382e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 383e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_NONE = 0, 384e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_32 = 1, 385e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_PC32 = 2, 386e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_GOT32 = 3, 387e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_PLT32 = 4, 388e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_COPY = 5, 389e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_GLOB_DAT = 6, 390e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_JUMP_SLOT = 7, 391e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_RELATIVE = 8, 392e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_GOTOFF = 9, 393e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_GOTPC = 10, 394e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_32PLT = 11, 395e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_TPOFF = 14, 396e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_IE = 15, 397e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_GOTIE = 16, 398e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_LE = 17, 399e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_GD = 18, 400e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_LDM = 19, 401e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_16 = 20, 402e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_PC16 = 21, 403e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_8 = 22, 404e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_PC8 = 23, 405e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_GD_32 = 24, 406e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_GD_PUSH = 25, 407e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_GD_CALL = 26, 408e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_GD_POP = 27, 409e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_LDM_32 = 28, 410e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_LDM_PUSH = 29, 411e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_LDM_CALL = 30, 412e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_LDM_POP = 31, 413e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_LDO_32 = 32, 414e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_IE_32 = 33, 415e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_LE_32 = 34, 416e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_DTPMOD32 = 35, 417e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_DTPOFF32 = 36, 418e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_TPOFF32 = 37, 419e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_GOTDESC = 39, 420e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_DESC_CALL = 40, 421e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_TLS_DESC = 41, 422e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_IRELATIVE = 42, 423e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_386_NUM = 43 424e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 425e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 426e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// ELF Relocation types for PPC32 427e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 428e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_NONE = 0, /* No relocation. */ 429e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_ADDR32 = 1, 430e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_ADDR24 = 2, 431e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_ADDR16 = 3, 432e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_ADDR16_LO = 4, 433e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_ADDR16_HI = 5, 434e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_ADDR16_HA = 6, 435e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_ADDR14 = 7, 436e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_ADDR14_BRTAKEN = 8, 437e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_ADDR14_BRNTAKEN = 9, 438e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_REL24 = 10, 439e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_REL14 = 11, 440e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_REL14_BRTAKEN = 12, 441e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_REL14_BRNTAKEN = 13, 442e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT16 = 14, 443e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT16_LO = 15, 444e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT16_HI = 16, 445e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT16_HA = 17, 446e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_REL32 = 26, 447e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_TLS = 67, 448e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_DTPMOD32 = 68, 449e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_TPREL16 = 69, 450e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_TPREL16_LO = 70, 451e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_TPREL16_HI = 71, 452e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_TPREL16_HA = 72, 453e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_TPREL32 = 73, 454e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_DTPREL16 = 74, 455e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_DTPREL16_LO = 75, 456e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_DTPREL16_HI = 76, 457e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_DTPREL16_HA = 77, 458e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_DTPREL32 = 78, 459e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TLSGD16 = 79, 460e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TLSGD16_LO = 80, 461e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TLSGD16_HI = 81, 462e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TLSGD16_HA = 82, 463e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TLSLD16 = 83, 464e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TLSLD16_LO = 84, 465e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TLSLD16_HI = 85, 466e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TLSLD16_HA = 86, 467e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TPREL16 = 87, 468e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TPREL16_LO = 88, 469e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TPREL16_HI = 89, 470e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_TPREL16_HA = 90, 471e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_DTPREL16 = 91, 472e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_DTPREL16_LO = 92, 473e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_DTPREL16_HI = 93, 474e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_GOT_DTPREL16_HA = 94, 475e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_TLSGD = 95, 476e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_TLSLD = 96, 477e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_REL16 = 249, 478e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_REL16_LO = 250, 479e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_REL16_HI = 251, 480e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC_REL16_HA = 252 481e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 482e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 483e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// ELF Relocation types for PPC64 484e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 485e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_NONE = 0, 486e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR32 = 1, 487e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR24 = 2, 488e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR16 = 3, 489e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR16_LO = 4, 490e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR16_HI = 5, 491e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR16_HA = 6, 492e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR14 = 7, 493e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR14_BRTAKEN = 8, 494e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR14_BRNTAKEN = 9, 495e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_REL24 = 10, 496e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_REL14 = 11, 497e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_REL14_BRTAKEN = 12, 498e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_REL14_BRNTAKEN = 13, 499e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT16 = 14, 500e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT16_LO = 15, 501e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT16_HI = 16, 502e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT16_HA = 17, 503e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_REL32 = 26, 504e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR64 = 38, 505e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR16_HIGHER = 39, 506e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR16_HIGHERA = 40, 507e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR16_HIGHEST = 41, 508e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR16_HIGHESTA = 42, 509e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_REL64 = 44, 510e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TOC16 = 47, 511e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TOC16_LO = 48, 512e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TOC16_HI = 49, 513e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TOC16_HA = 50, 514e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TOC = 51, 515e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR16_DS = 56, 516e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_ADDR16_LO_DS = 57, 517e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT16_DS = 58, 518e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT16_LO_DS = 59, 519e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TOC16_DS = 63, 520e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TOC16_LO_DS = 64, 521e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TLS = 67, 522e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPMOD64 = 68, 523e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TPREL16 = 69, 524e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TPREL16_LO = 70, 525e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TPREL16_HI = 71, 526e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TPREL16_HA = 72, 527e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TPREL64 = 73, 528e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPREL16 = 74, 529e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPREL16_LO = 75, 530e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPREL16_HI = 76, 531e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPREL16_HA = 77, 532e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPREL64 = 78, 533e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TLSGD16 = 79, 534e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TLSGD16_LO = 80, 535e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TLSGD16_HI = 81, 536e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TLSGD16_HA = 82, 537e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TLSLD16 = 83, 538e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TLSLD16_LO = 84, 539e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TLSLD16_HI = 85, 540e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TLSLD16_HA = 86, 541e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TPREL16_DS = 87, 542e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TPREL16_LO_DS = 88, 543e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TPREL16_HI = 89, 544e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_TPREL16_HA = 90, 545e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_DTPREL16_DS = 91, 546e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_DTPREL16_LO_DS = 92, 547e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_DTPREL16_HI = 93, 548e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_GOT_DTPREL16_HA = 94, 549e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TPREL16_DS = 95, 550e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TPREL16_LO_DS = 96, 551e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TPREL16_HIGHER = 97, 552e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TPREL16_HIGHERA = 98, 553e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TPREL16_HIGHEST = 99, 554e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TPREL16_HIGHESTA = 100, 555e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPREL16_DS = 101, 556e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPREL16_LO_DS = 102, 557e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPREL16_HIGHER = 103, 558e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPREL16_HIGHERA = 104, 559e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPREL16_HIGHEST = 105, 560e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_DTPREL16_HIGHESTA = 106, 561e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TLSGD = 107, 562e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_TLSLD = 108, 563e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_REL16 = 249, 564e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_REL16_LO = 250, 565e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_REL16_HI = 251, 566e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_PPC64_REL16_HA = 252 567e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 568e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 569e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// ELF Relocation types for AArch64 570e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 571e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 572e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_NONE = 0x100, 573e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 574e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_ABS64 = 0x101, 575e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_ABS32 = 0x102, 576e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_ABS16 = 0x103, 577e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_PREL64 = 0x104, 578e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_PREL32 = 0x105, 579e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_PREL16 = 0x106, 580e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 581e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_MOVW_UABS_G0 = 0x107, 582e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_MOVW_UABS_G0_NC = 0x108, 583e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_MOVW_UABS_G1 = 0x109, 584e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_MOVW_UABS_G1_NC = 0x10a, 585e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_MOVW_UABS_G2 = 0x10b, 586e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_MOVW_UABS_G2_NC = 0x10c, 587e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_MOVW_UABS_G3 = 0x10d, 588e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_MOVW_SABS_G0 = 0x10e, 589e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_MOVW_SABS_G1 = 0x10f, 590e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_MOVW_SABS_G2 = 0x110, 591e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 592e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_LD_PREL_LO19 = 0x111, 593e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_ADR_PREL_LO21 = 0x112, 594e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_ADR_PREL_PG_HI21 = 0x113, 595e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_ADD_ABS_LO12_NC = 0x115, 596e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_LDST8_ABS_LO12_NC = 0x116, 597e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 598e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TSTBR14 = 0x117, 599e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_CONDBR19 = 0x118, 600e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_JUMP26 = 0x11a, 601e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_CALL26 = 0x11b, 602e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 603e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_LDST16_ABS_LO12_NC = 0x11c, 604e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_LDST32_ABS_LO12_NC = 0x11d, 605e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_LDST64_ABS_LO12_NC = 0x11e, 606e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 607e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_LDST128_ABS_LO12_NC = 0x12b, 608e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 609e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_ADR_GOT_PAGE = 0x137, 610e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_LD64_GOT_LO12_NC = 0x138, 611e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 612e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_MOVW_DTPREL_G2 = 0x20b, 613e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_MOVW_DTPREL_G1 = 0x20c, 614e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC = 0x20d, 615e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_MOVW_DTPREL_G0 = 0x20e, 616e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC = 0x20f, 617e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_ADD_DTPREL_HI12 = 0x210, 618e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_ADD_DTPREL_LO12 = 0x211, 619e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC = 0x212, 620e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_LDST8_DTPREL_LO12 = 0x213, 621e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC = 0x214, 622e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_LDST16_DTPREL_LO12 = 0x215, 623e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC = 0x216, 624e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_LDST32_DTPREL_LO12 = 0x217, 625e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC = 0x218, 626e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_LDST64_DTPREL_LO12 = 0x219, 627e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC = 0x21a, 628e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 629e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 = 0x21b, 630e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC = 0x21c, 631e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 = 0x21d, 632e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC = 0x21e, 633e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 = 0x21f, 634e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 635e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_MOVW_TPREL_G2 = 0x220, 636e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_MOVW_TPREL_G1 = 0x221, 637e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_MOVW_TPREL_G1_NC = 0x222, 638e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_MOVW_TPREL_G0 = 0x223, 639e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_MOVW_TPREL_G0_NC = 0x224, 640e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_ADD_TPREL_HI12 = 0x225, 641e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_ADD_TPREL_LO12 = 0x226, 642e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_ADD_TPREL_LO12_NC = 0x227, 643e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_LDST8_TPREL_LO12 = 0x228, 644e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC = 0x229, 645e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_LDST16_TPREL_LO12 = 0x22a, 646e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC = 0x22b, 647e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_LDST32_TPREL_LO12 = 0x22c, 648e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC = 0x22d, 649e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_LDST64_TPREL_LO12 = 0x22e, 650e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC = 0x22f, 651e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 652e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSDESC_ADR_PAGE = 0x232, 653e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSDESC_LD64_LO12_NC = 0x233, 654e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSDESC_ADD_LO12_NC = 0x234, 655e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 656e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_AARCH64_TLSDESC_CALL = 0x239 657e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 658e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 659e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// ARM Specific e_flags 660e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum : unsigned { 661e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_ARM_SOFT_FLOAT = 0x00000200U, 662e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_ARM_VFP_FLOAT = 0x00000400U, 663e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_ARM_EABI_UNKNOWN = 0x00000000U, 664e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_ARM_EABI_VER1 = 0x01000000U, 665e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_ARM_EABI_VER2 = 0x02000000U, 666e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_ARM_EABI_VER3 = 0x03000000U, 667e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_ARM_EABI_VER4 = 0x04000000U, 668e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_ARM_EABI_VER5 = 0x05000000U, 669e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_ARM_EABIMASK = 0xFF000000U 670e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 671e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 672e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// ELF Relocation types for ARM 673e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Meets 2.08 ABI Specs. 674e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 675e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 676e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_NONE = 0x00, 677e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PC24 = 0x01, 678e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ABS32 = 0x02, 679e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_REL32 = 0x03, 680e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDR_PC_G0 = 0x04, 681e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ABS16 = 0x05, 682e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ABS12 = 0x06, 683e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_ABS5 = 0x07, 684e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ABS8 = 0x08, 685e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_SBREL32 = 0x09, 686e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_CALL = 0x0a, 687e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_PC8 = 0x0b, 688e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_BREL_ADJ = 0x0c, 689e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_DESC = 0x0d, 690e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_SWI8 = 0x0e, 691e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_XPC25 = 0x0f, 692e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_XPC22 = 0x10, 693e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_DTPMOD32 = 0x11, 694e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_DTPOFF32 = 0x12, 695e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_TPOFF32 = 0x13, 696e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_COPY = 0x14, 697e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_GLOB_DAT = 0x15, 698e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_JUMP_SLOT = 0x16, 699e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_RELATIVE = 0x17, 700e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_GOTOFF32 = 0x18, 701e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_BASE_PREL = 0x19, 702e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_GOT_BREL = 0x1a, 703e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PLT32 = 0x1b, 704e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_CALL = 0x1c, 705e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_JUMP24 = 0x1d, 706e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_JUMP24 = 0x1e, 707e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_BASE_ABS = 0x1f, 708e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_PCREL_7_0 = 0x20, 709e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_PCREL_15_8 = 0x21, 710e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_PCREL_23_15 = 0x22, 711e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDR_SBREL_11_0_NC = 0x23, 712e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_SBREL_19_12_NC = 0x24, 713e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_SBREL_27_20_CK = 0x25, 714e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TARGET1 = 0x26, 715e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_SBREL31 = 0x27, 716e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_V4BX = 0x28, 717e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TARGET2 = 0x29, 718e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PREL31 = 0x2a, 719e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_MOVW_ABS_NC = 0x2b, 720e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_MOVT_ABS = 0x2c, 721e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_MOVW_PREL_NC = 0x2d, 722e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_MOVT_PREL = 0x2e, 723e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_MOVW_ABS_NC = 0x2f, 724e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_MOVT_ABS = 0x30, 725e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_MOVW_PREL_NC = 0x31, 726e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_MOVT_PREL = 0x32, 727e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_JUMP19 = 0x33, 728e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_JUMP6 = 0x34, 729e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_ALU_PREL_11_0 = 0x35, 730e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_PC12 = 0x36, 731e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ABS32_NOI = 0x37, 732e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_REL32_NOI = 0x38, 733e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_PC_G0_NC = 0x39, 734e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_PC_G0 = 0x3a, 735e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_PC_G1_NC = 0x3b, 736e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_PC_G1 = 0x3c, 737e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_PC_G2 = 0x3d, 738e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDR_PC_G1 = 0x3e, 739e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDR_PC_G2 = 0x3f, 740e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDRS_PC_G0 = 0x40, 741e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDRS_PC_G1 = 0x41, 742e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDRS_PC_G2 = 0x42, 743e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDC_PC_G0 = 0x43, 744e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDC_PC_G1 = 0x44, 745e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDC_PC_G2 = 0x45, 746e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_SB_G0_NC = 0x46, 747e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_SB_G0 = 0x47, 748e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_SB_G1_NC = 0x48, 749e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_SB_G1 = 0x49, 750e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ALU_SB_G2 = 0x4a, 751e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDR_SB_G0 = 0x4b, 752e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDR_SB_G1 = 0x4c, 753e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDR_SB_G2 = 0x4d, 754e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDRS_SB_G0 = 0x4e, 755e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDRS_SB_G1 = 0x4f, 756e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDRS_SB_G2 = 0x50, 757e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDC_SB_G0 = 0x51, 758e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDC_SB_G1 = 0x52, 759e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_LDC_SB_G2 = 0x53, 760e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_MOVW_BREL_NC = 0x54, 761e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_MOVT_BREL = 0x55, 762e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_MOVW_BREL = 0x56, 763e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_MOVW_BREL_NC = 0x57, 764e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_MOVT_BREL = 0x58, 765e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_MOVW_BREL = 0x59, 766e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_GOTDESC = 0x5a, 767e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_CALL = 0x5b, 768e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_DESCSEQ = 0x5c, 769e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_TLS_CALL = 0x5d, 770e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PLT32_ABS = 0x5e, 771e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_GOT_ABS = 0x5f, 772e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_GOT_PREL = 0x60, 773e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_GOT_BREL12 = 0x61, 774e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_GOTOFF12 = 0x62, 775e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_GOTRELAX = 0x63, 776e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_GNU_VTENTRY = 0x64, 777e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_GNU_VTINHERIT = 0x65, 778e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_JUMP11 = 0x66, 779e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_JUMP8 = 0x67, 780e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_GD32 = 0x68, 781e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_LDM32 = 0x69, 782e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_LDO32 = 0x6a, 783e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_IE32 = 0x6b, 784e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_LE32 = 0x6c, 785e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_LDO12 = 0x6d, 786e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_LE12 = 0x6e, 787e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_TLS_IE12GP = 0x6f, 788e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_0 = 0x70, 789e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_1 = 0x71, 790e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_2 = 0x72, 791e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_3 = 0x73, 792e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_4 = 0x74, 793e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_5 = 0x75, 794e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_6 = 0x76, 795e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_7 = 0x77, 796e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_8 = 0x78, 797e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_9 = 0x79, 798e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_10 = 0x7a, 799e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_11 = 0x7b, 800e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_12 = 0x7c, 801e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_13 = 0x7d, 802e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_14 = 0x7e, 803e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_PRIVATE_15 = 0x7f, 804e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_ME_TOO = 0x80, 805e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_TLS_DESCSEQ16 = 0x81, 806e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_ARM_THM_TLS_DESCSEQ32 = 0x82 807e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 808e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 809e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Mips Specific e_flags 810e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum : unsigned { 811e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_NOREORDER = 0x00000001, // Don't reorder instructions 812e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_PIC = 0x00000002, // Position independent code 813e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_CPIC = 0x00000004, // Call object with Position independent code 814e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ABI2 = 0x00000020, 815e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_32BITMODE = 0x00000100, 816e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_NAN2008 = 0x00000400, // Uses IEE 754-2008 NaN encoding 817e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ABI_O32 = 0x00001000, // This file follows the first MIPS 32 bit ABI 818e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 819e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom //ARCH_ASE 820e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_MICROMIPS = 0x02000000, // microMIPS 821e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_ASE_M16 = 822e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 0x04000000, // Has Mips-16 ISA extensions 823e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom //ARCH 824e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_1 = 0x00000000, // MIPS1 instruction set 825e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_2 = 0x10000000, // MIPS2 instruction set 826e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_3 = 0x20000000, // MIPS3 instruction set 827e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_4 = 0x30000000, // MIPS4 instruction set 828e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_5 = 0x40000000, // MIPS5 instruction set 829e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_32 = 0x50000000, // MIPS32 instruction set per linux not elf.h 830e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_64 = 0x60000000, // MIPS64 instruction set per linux not elf.h 831e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_32R2 = 0x70000000, // mips32r2 832e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_64R2 = 0x80000000, // mips64r2 833e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_32R6 = 0x90000000, // mips32r6 834e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH_64R6 = 0xa0000000, // mips64r6 835e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_MIPS_ARCH = 0xf0000000 // Mask for applying EF_MIPS_ARCH_ variant 836e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 837e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 838e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// ELF Relocation types for Mips 839e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 840e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_NONE = 0, 841e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_16 = 1, 842e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_32 = 2, 843e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_REL32 = 3, 844e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_26 = 4, 845e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_HI16 = 5, 846e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_LO16 = 6, 847e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_GPREL16 = 7, 848e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_LITERAL = 8, 849e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_GOT16 = 9, 850e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_PC16 = 10, 851e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_CALL16 = 11, 852e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_GPREL32 = 12, 853e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_UNUSED1 = 13, 854e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_UNUSED2 = 14, 855e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_SHIFT5 = 16, 856e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_SHIFT6 = 17, 857e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_64 = 18, 858e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_GOT_DISP = 19, 859e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_GOT_PAGE = 20, 860e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_GOT_OFST = 21, 861e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_GOT_HI16 = 22, 862e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_GOT_LO16 = 23, 863e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_SUB = 24, 864e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_INSERT_A = 25, 865e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_INSERT_B = 26, 866e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_DELETE = 27, 867e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_HIGHER = 28, 868e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_HIGHEST = 29, 869e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_CALL_HI16 = 30, 870e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_CALL_LO16 = 31, 871e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_SCN_DISP = 32, 872e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_REL16 = 33, 873e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_ADD_IMMEDIATE = 34, 874e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_PJUMP = 35, 875e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_RELGOT = 36, 876e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_JALR = 37, 877e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_DTPMOD32 = 38, 878e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_DTPREL32 = 39, 879e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_DTPMOD64 = 40, 880e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_DTPREL64 = 41, 881e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_GD = 42, 882e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_LDM = 43, 883e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_DTPREL_HI16 = 44, 884e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_DTPREL_LO16 = 45, 885e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_GOTTPREL = 46, 886e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_TPREL32 = 47, 887e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_TPREL64 = 48, 888e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_TPREL_HI16 = 49, 889e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_TLS_TPREL_LO16 = 50, 890e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_GLOB_DAT = 51, 891e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_PC21_S2 = 60, 892e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_PC26_S2 = 61, 893e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_PC18_S3 = 62, 894e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_PC19_S2 = 63, 895e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_PCHI16 = 64, 896e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_PCLO16 = 65, 897e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS16_GOT16 = 102, 898e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS16_HI16 = 104, 899e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS16_LO16 = 105, 900e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_COPY = 126, 901e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_JUMP_SLOT = 127, 902e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_26_S1 = 133, 903e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_HI16 = 134, 904e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_LO16 = 135, 905e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_GOT16 = 138, 906e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_PC16_S1 = 141, 907e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_CALL16 = 142, 908e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_GOT_DISP = 145, 909e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_GOT_PAGE = 146, 910e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_GOT_OFST = 147, 911e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_TLS_GD = 162, 912e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_TLS_LDM = 163, 913e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_TLS_DTPREL_HI16 = 164, 914e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_TLS_DTPREL_LO16 = 165, 915e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_TLS_TPREL_HI16 = 169, 916e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MICROMIPS_TLS_TPREL_LO16 = 170, 917e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_NUM = 218, 918e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_MIPS_PC32 = 248 919e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 920e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 921e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Special values for the st_other field in the symbol table entry for MIPS. 922e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 923e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STO_MIPS_OPTIONAL = 0x04, // Symbol whose definition is optional 924e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STO_MIPS_PLT = 0x08, // PLT entry related dynamic table record 925e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STO_MIPS_PIC = 0x20, // PIC func in an object mixes PIC/non-PIC 926e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STO_MIPS_MICROMIPS = 0x80, // MIPS Specific ISA for MicroMips 927e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STO_MIPS_MIPS16 = 0xf0 // MIPS Specific ISA for Mips16 928e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 929e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 930e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Hexagon Specific e_flags 931e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Release 5 ABI 932e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 933e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Object processor version flags, bits[3:0] 934e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_HEXAGON_MACH_V2 = 0x00000001, // Hexagon V2 935e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_HEXAGON_MACH_V3 = 0x00000002, // Hexagon V3 936e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_HEXAGON_MACH_V4 = 0x00000003, // Hexagon V4 937e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_HEXAGON_MACH_V5 = 0x00000004, // Hexagon V5 938e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 939e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Highest ISA version flags 940e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_HEXAGON_ISA_MACH = 0x00000000, // Same as specified in bits[3:0] 941e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // of e_flags 942e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_HEXAGON_ISA_V2 = 0x00000010, // Hexagon V2 ISA 943e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_HEXAGON_ISA_V3 = 0x00000020, // Hexagon V3 ISA 944e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_HEXAGON_ISA_V4 = 0x00000030, // Hexagon V4 ISA 945e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom EF_HEXAGON_ISA_V5 = 0x00000040 // Hexagon V5 ISA 946e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 947e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 948e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Hexagon specific Section indexes for common small data 949e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Release 5 ABI 950e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 951e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_HEXAGON_SCOMMON = 0xff00, // Other access sizes 952e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_HEXAGON_SCOMMON_1 = 0xff01, // Byte-sized access 953e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_HEXAGON_SCOMMON_2 = 0xff02, // Half-word-sized access 954e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_HEXAGON_SCOMMON_4 = 0xff03, // Word-sized access 955e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_HEXAGON_SCOMMON_8 = 0xff04 // Double-word-size access 956e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 957e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 958e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// ELF Relocation types for Hexagon 959e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Release 5 ABI 960e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 961e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_NONE = 0, 962e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_B22_PCREL = 1, 963e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_B15_PCREL = 2, 964e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_B7_PCREL = 3, 965e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_LO16 = 4, 966e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_HI16 = 5, 967e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_32 = 6, 968e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_16 = 7, 969e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_8 = 8, 970e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GPREL16_0 = 9, 971e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GPREL16_1 = 10, 972e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GPREL16_2 = 11, 973e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GPREL16_3 = 12, 974e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_HL16 = 13, 975e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_B13_PCREL = 14, 976e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_B9_PCREL = 15, 977e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_B32_PCREL_X = 16, 978e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_32_6_X = 17, 979e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_B22_PCREL_X = 18, 980e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_B15_PCREL_X = 19, 981e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_B13_PCREL_X = 20, 982e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_B9_PCREL_X = 21, 983e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_B7_PCREL_X = 22, 984e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_16_X = 23, 985e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_12_X = 24, 986e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_11_X = 25, 987e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_10_X = 26, 988e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_9_X = 27, 989e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_8_X = 28, 990e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_7_X = 29, 991e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_6_X = 30, 992e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_32_PCREL = 31, 993e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_COPY = 32, 994e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GLOB_DAT = 33, 995e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_JMP_SLOT = 34, 996e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_RELATIVE = 35, 997e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_PLT_B22_PCREL = 36, 998e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOTREL_LO16 = 37, 999e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOTREL_HI16 = 38, 1000e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOTREL_32 = 39, 1001e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOT_LO16 = 40, 1002e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOT_HI16 = 41, 1003e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOT_32 = 42, 1004e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOT_16 = 43, 1005e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_DTPMOD_32 = 44, 1006e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_DTPREL_LO16 = 45, 1007e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_DTPREL_HI16 = 46, 1008e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_DTPREL_32 = 47, 1009e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_DTPREL_16 = 48, 1010e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GD_PLT_B22_PCREL = 49, 1011e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GD_GOT_LO16 = 50, 1012e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GD_GOT_HI16 = 51, 1013e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GD_GOT_32 = 52, 1014e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GD_GOT_16 = 53, 1015e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_LO16 = 54, 1016e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_HI16 = 55, 1017e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_32 = 56, 1018e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_GOT_LO16 = 57, 1019e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_GOT_HI16 = 58, 1020e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_GOT_32 = 59, 1021e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_GOT_16 = 60, 1022e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_TPREL_LO16 = 61, 1023e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_TPREL_HI16 = 62, 1024e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_TPREL_32 = 63, 1025e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_TPREL_16 = 64, 1026e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_6_PCREL_X = 65, 1027e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOTREL_32_6_X = 66, 1028e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOTREL_16_X = 67, 1029e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOTREL_11_X = 68, 1030e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOT_32_6_X = 69, 1031e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOT_16_X = 70, 1032e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GOT_11_X = 71, 1033e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_DTPREL_32_6_X = 72, 1034e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_DTPREL_16_X = 73, 1035e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_DTPREL_11_X = 74, 1036e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GD_GOT_32_6_X = 75, 1037e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GD_GOT_16_X = 76, 1038e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_GD_GOT_11_X = 77, 1039e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_32_6_X = 78, 1040e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_16_X = 79, 1041e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_GOT_32_6_X = 80, 1042e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_GOT_16_X = 81, 1043e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_IE_GOT_11_X = 82, 1044e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_TPREL_32_6_X = 83, 1045e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_TPREL_16_X = 84, 1046e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_HEX_TPREL_11_X = 85 1047e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1048e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1049e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// ELF Relocation types for S390/zSeries 1050e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1051e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_NONE = 0, 1052e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_8 = 1, 1053e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_12 = 2, 1054e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_16 = 3, 1055e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_32 = 4, 1056e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PC32 = 5, 1057e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOT12 = 6, 1058e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOT32 = 7, 1059e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PLT32 = 8, 1060e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_COPY = 9, 1061e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GLOB_DAT = 10, 1062e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_JMP_SLOT = 11, 1063e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_RELATIVE = 12, 1064e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTOFF = 13, 1065e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTPC = 14, 1066e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOT16 = 15, 1067e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PC16 = 16, 1068e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PC16DBL = 17, 1069e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PLT16DBL = 18, 1070e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PC32DBL = 19, 1071e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PLT32DBL = 20, 1072e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTPCDBL = 21, 1073e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_64 = 22, 1074e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PC64 = 23, 1075e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOT64 = 24, 1076e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PLT64 = 25, 1077e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTENT = 26, 1078e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTOFF16 = 27, 1079e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTOFF64 = 28, 1080e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTPLT12 = 29, 1081e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTPLT16 = 30, 1082e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTPLT32 = 31, 1083e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTPLT64 = 32, 1084e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTPLTENT = 33, 1085e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PLTOFF16 = 34, 1086e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PLTOFF32 = 35, 1087e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_PLTOFF64 = 36, 1088e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_LOAD = 37, 1089e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_GDCALL = 38, 1090e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_LDCALL = 39, 1091e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_GD32 = 40, 1092e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_GD64 = 41, 1093e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_GOTIE12 = 42, 1094e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_GOTIE32 = 43, 1095e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_GOTIE64 = 44, 1096e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_LDM32 = 45, 1097e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_LDM64 = 46, 1098e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_IE32 = 47, 1099e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_IE64 = 48, 1100e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_IEENT = 49, 1101e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_LE32 = 50, 1102e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_LE64 = 51, 1103e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_LDO32 = 52, 1104e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_LDO64 = 53, 1105e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_DTPMOD = 54, 1106e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_DTPOFF = 55, 1107e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_TPOFF = 56, 1108e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_20 = 57, 1109e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOT20 = 58, 1110e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_GOTPLT20 = 59, 1111e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_TLS_GOTIE20 = 60, 1112e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_390_IRELATIVE = 61 1113e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1114e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1115e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// ELF Relocation type for Sparc. 1116e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1117e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_NONE = 0, 1118e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_8 = 1, 1119e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_16 = 2, 1120e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_32 = 3, 1121e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_DISP8 = 4, 1122e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_DISP16 = 5, 1123e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_DISP32 = 6, 1124e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_WDISP30 = 7, 1125e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_WDISP22 = 8, 1126e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_HI22 = 9, 1127e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_22 = 10, 1128e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_13 = 11, 1129e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_LO10 = 12, 1130e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_GOT10 = 13, 1131e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_GOT13 = 14, 1132e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_GOT22 = 15, 1133e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_PC10 = 16, 1134e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_PC22 = 17, 1135e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_WPLT30 = 18, 1136e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_COPY = 19, 1137e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_GLOB_DAT = 20, 1138e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_JMP_SLOT = 21, 1139e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_RELATIVE = 22, 1140e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_UA32 = 23, 1141e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_PLT32 = 24, 1142e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_HIPLT22 = 25, 1143e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_LOPLT10 = 26, 1144e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_PCPLT32 = 27, 1145e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_PCPLT22 = 28, 1146e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_PCPLT10 = 29, 1147e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_10 = 30, 1148e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_11 = 31, 1149e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_64 = 32, 1150e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_OLO10 = 33, 1151e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_HH22 = 34, 1152e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_HM10 = 35, 1153e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_LM22 = 36, 1154e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_PC_HH22 = 37, 1155e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_PC_HM10 = 38, 1156e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_PC_LM22 = 39, 1157e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_WDISP16 = 40, 1158e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_WDISP19 = 41, 1159e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_7 = 43, 1160e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_5 = 44, 1161e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_6 = 45, 1162e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_DISP64 = 46, 1163e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_PLT64 = 47, 1164e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_HIX22 = 48, 1165e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_LOX10 = 49, 1166e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_H44 = 50, 1167e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_M44 = 51, 1168e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_L44 = 52, 1169e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_REGISTER = 53, 1170e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_UA64 = 54, 1171e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_UA16 = 55, 1172e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_GD_HI22 = 56, 1173e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_GD_LO10 = 57, 1174e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_GD_ADD = 58, 1175e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_GD_CALL = 59, 1176e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_LDM_HI22 = 60, 1177e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_LDM_LO10 = 61, 1178e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_LDM_ADD = 62, 1179e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_LDM_CALL = 63, 1180e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_LDO_HIX22 = 64, 1181e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_LDO_LOX10 = 65, 1182e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_LDO_ADD = 66, 1183e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_IE_HI22 = 67, 1184e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_IE_LO10 = 68, 1185e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_IE_LD = 69, 1186e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_IE_LDX = 70, 1187e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_IE_ADD = 71, 1188e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_LE_HIX22 = 72, 1189e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_LE_LOX10 = 73, 1190e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_DTPMOD32 = 74, 1191e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_DTPMOD64 = 75, 1192e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_DTPOFF32 = 76, 1193e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_DTPOFF64 = 77, 1194e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_TPOFF32 = 78, 1195e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_TLS_TPOFF64 = 79, 1196e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_GOTDATA_HIX22 = 80, 1197e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_GOTDATA_LOX22 = 81, 1198e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_GOTDATA_OP_HIX22 = 82, 1199e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_GOTDATA_OP_LOX22 = 83, 1200e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom R_SPARC_GOTDATA_OP = 84 1201e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1202e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1203e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Section header. 1204e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf32_Shdr { 1205e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word sh_name; // Section name (index into string table) 1206e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word sh_type; // Section type (SHT_*) 1207e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word sh_flags; // Section flags (SHF_*) 1208e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Addr sh_addr; // Address where section is to be loaded 1209e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Off sh_offset; // File offset of section data, in bytes 1210e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word sh_size; // Size of section, in bytes 1211e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word sh_link; // Section type-specific header table index link 1212e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word sh_info; // Section type-specific extra information 1213e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word sh_addralign; // Section address alignment 1214e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word sh_entsize; // Size of records contained within the section 1215e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1216e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1217e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Section header for ELF64 - same fields as ELF32, different types. 1218e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf64_Shdr { 1219e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word sh_name; 1220e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word sh_type; 1221e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Xword sh_flags; 1222e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Addr sh_addr; 1223e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Off sh_offset; 1224e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Xword sh_size; 1225e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word sh_link; 1226e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word sh_info; 1227e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Xword sh_addralign; 1228e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Xword sh_entsize; 1229e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1230e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1231e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Special section indices. 1232e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1233e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_UNDEF = 0, // Undefined, missing, irrelevant, or meaningless 1234e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_LORESERVE = 0xff00, // Lowest reserved index 1235e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_LOPROC = 0xff00, // Lowest processor-specific index 1236e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_HIPROC = 0xff1f, // Highest processor-specific index 1237e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_LOOS = 0xff20, // Lowest operating system-specific index 1238e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_HIOS = 0xff3f, // Highest operating system-specific index 1239e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_ABS = 0xfff1, // Symbol has absolute value; does not need relocation 1240e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_COMMON = 0xfff2, // FORTRAN COMMON or C external global variables 1241e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_XINDEX = 0xffff, // Mark that the index is >= SHN_LORESERVE 1242e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHN_HIRESERVE = 0xffff // Highest reserved index 1243e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1244e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1245e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Section types. 1246e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum : unsigned { 1247e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_NULL = 0, // No associated section (inactive entry). 1248e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_PROGBITS = 1, // Program-defined contents. 1249e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_SYMTAB = 2, // Symbol table. 1250e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_STRTAB = 3, // String table. 1251e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_RELA = 4, // Relocation entries; explicit addends. 1252e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_HASH = 5, // Symbol hash table. 1253e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_DYNAMIC = 6, // Information for dynamic linking. 1254e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_NOTE = 7, // Information about the file. 1255e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_NOBITS = 8, // Data occupies no space in the file. 1256e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_REL = 9, // Relocation entries; no explicit addends. 1257e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_SHLIB = 10, // Reserved. 1258e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_DYNSYM = 11, // Symbol table. 1259e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_INIT_ARRAY = 14, // Pointers to initialization functions. 1260e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_FINI_ARRAY = 15, // Pointers to termination functions. 1261e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_PREINIT_ARRAY = 16, // Pointers to pre-init functions. 1262e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_GROUP = 17, // Section group. 1263e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_SYMTAB_SHNDX = 18, // Indices for SHN_XINDEX entries. 1264e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_LOOS = 0x60000000, // Lowest operating system-specific type. 1265e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_GNU_ATTRIBUTES= 0x6ffffff5, // Object attributes. 1266e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_GNU_HASH = 0x6ffffff6, // GNU-style hash table. 1267e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_GNU_verdef = 0x6ffffffd, // GNU version definitions. 1268e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_GNU_verneed = 0x6ffffffe, // GNU version references. 1269e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_GNU_versym = 0x6fffffff, // GNU symbol versions table. 1270e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_HIOS = 0x6fffffff, // Highest operating system-specific type. 1271e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_LOPROC = 0x70000000, // Lowest processor arch-specific type. 1272e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Fixme: All this is duplicated in MCSectionELF. Why?? 1273e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Exception Index table 1274e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_ARM_EXIDX = 0x70000001U, 1275e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // BPABI DLL dynamic linking pre-emption map 1276e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_ARM_PREEMPTMAP = 0x70000002U, 1277e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Object file compatibility attributes 1278e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_ARM_ATTRIBUTES = 0x70000003U, 1279e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_ARM_DEBUGOVERLAY = 0x70000004U, 1280e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_ARM_OVERLAYSECTION = 0x70000005U, 1281e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_HEX_ORDERED = 0x70000000, // Link editor is to sort the entries in 1282e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // this section based on their sizes 1283e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_X86_64_UNWIND = 0x70000001, // Unwind information 1284e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1285e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_MIPS_REGINFO = 0x70000006, // Register usage information 1286e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_MIPS_OPTIONS = 0x7000000d, // General options 1287316a2186b7fa9e03187d45ac0fa320f4dff1f3dfDouglas Leung SHT_MIPS_ABIFLAGS = 0x7000002a, // Abiflags options 1288e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1289e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_HIPROC = 0x7fffffff, // Highest processor arch-specific type. 1290e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_LOUSER = 0x80000000, // Lowest type reserved for applications. 1291e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHT_HIUSER = 0xffffffff // Highest type reserved for applications. 1292e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1293e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1294e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Section flags. 1295e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum : unsigned { 1296e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Section data should be writable during execution. 1297e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_WRITE = 0x1, 1298e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1299e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Section occupies memory during program execution. 1300e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_ALLOC = 0x2, 1301e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1302e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Section contains executable machine instructions. 1303e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_EXECINSTR = 0x4, 1304e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1305e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // The data in this section may be merged. 1306e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_MERGE = 0x10, 1307e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1308e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // The data in this section is null-terminated strings. 1309e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_STRINGS = 0x20, 1310e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1311e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // A field in this section holds a section header table index. 1312e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_INFO_LINK = 0x40U, 1313e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1314e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Adds special ordering requirements for link editors. 1315e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_LINK_ORDER = 0x80U, 1316e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1317e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // This section requires special OS-specific processing to avoid incorrect 1318e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // behavior. 1319e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_OS_NONCONFORMING = 0x100U, 1320e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1321e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // This section is a member of a section group. 1322e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_GROUP = 0x200U, 1323e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1324e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // This section holds Thread-Local Storage. 1325e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_TLS = 0x400U, 1326e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1327e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // This section is excluded from the final executable or shared library. 1328e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_EXCLUDE = 0x80000000U, 1329e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1330e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Start of target-specific flags. 1331e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1332e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom /// XCORE_SHF_CP_SECTION - All sections with the "c" flag are grouped 1333e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom /// together by the linker to form the constant pool and the cp register is 1334e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom /// set to the start of the constant pool by the boot code. 1335e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom XCORE_SHF_CP_SECTION = 0x800U, 1336e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1337e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom /// XCORE_SHF_DP_SECTION - All sections with the "d" flag are grouped 1338e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom /// together by the linker to form the data section and the dp register is 1339e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom /// set to the start of the section by the boot code. 1340e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom XCORE_SHF_DP_SECTION = 0x1000U, 1341e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1342e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_MASKOS = 0x0ff00000, 1343e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1344e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Bits indicating processor-specific flags. 1345e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_MASKPROC = 0xf0000000, 1346e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1347e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // If an object file section does not have this flag set, then it may not hold 1348e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // more than 2GB and can be freely referred to in objects using smaller code 1349e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // models. Otherwise, only objects using larger code models can refer to them. 1350e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // For example, a medium code model object can refer to data in a section that 1351e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // sets this flag besides being able to refer to data in a section that does 1352e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // not set it; likewise, a small code model object can refer only to code in a 1353e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // section that does not set this flag. 1354e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_X86_64_LARGE = 0x10000000, 1355e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1356e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // All sections with the GPREL flag are grouped into a global data area 1357e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // for faster accesses 1358e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_HEX_GPREL = 0x10000000, 1359e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1360e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Section contains text/data which may be replicated in other sections. 1361e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Linker must retain only one copy. 1362e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_MIPS_NODUPES = 0x01000000, 1363e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1364e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Linker must generate implicit hidden weak names. 1365e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_MIPS_NAMES = 0x02000000, 1366e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1367e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Section data local to process. 1368e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_MIPS_LOCAL = 0x04000000, 1369e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1370e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Do not strip this section. 1371e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_MIPS_NOSTRIP = 0x08000000, 1372e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1373e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Section must be part of global data area. 1374e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_MIPS_GPREL = 0x10000000, 1375e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1376e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // This section should be merged. 1377e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_MIPS_MERGE = 0x20000000, 1378e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1379e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Address size to be inferred from section entry size. 1380e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_MIPS_ADDR = 0x40000000, 1381e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1382e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Section data is string data by default. 1383e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SHF_MIPS_STRING = 0x80000000 1384e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1385e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1386e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Section Group Flags 1387e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum : unsigned { 1388e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom GRP_COMDAT = 0x1, 1389e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom GRP_MASKOS = 0x0ff00000, 1390e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom GRP_MASKPROC = 0xf0000000 1391e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1392e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1393e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Symbol table entries for ELF32. 1394e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf32_Sym { 1395e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word st_name; // Symbol name (index into string table) 1396e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Addr st_value; // Value or address associated with the symbol 1397e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word st_size; // Size of the symbol 1398e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char st_info; // Symbol's type and binding attributes 1399e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char st_other; // Must be zero; reserved 1400e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Half st_shndx; // Which section (header table index) it's defined in 1401e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1402e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // These accessors and mutators correspond to the ELF32_ST_BIND, 1403e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // ELF32_ST_TYPE, and ELF32_ST_INFO macros defined in the ELF specification: 1404e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char getBinding() const { return st_info >> 4; } 1405e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char getType() const { return st_info & 0x0f; } 1406e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setBinding(unsigned char b) { setBindingAndType(b, getType()); } 1407e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setType(unsigned char t) { setBindingAndType(getBinding(), t); } 1408e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setBindingAndType(unsigned char b, unsigned char t) { 1409e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom st_info = (b << 4) + (t & 0x0f); 1410e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } 1411e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1412e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1413e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// BEGIN android-added for <elf.h> compat 1414e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstatic inline unsigned char ELF32_ST_TYPE(unsigned char st_info) { return st_info & 0x0f; } 141562d1ca3182a6cbb921799825f43ad36821233fd7Tong Shenstatic inline unsigned char ELF64_ST_TYPE(unsigned char st_info) { return st_info & 0x0f; } 1416e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// END android-added for <elf.h> compat 1417e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1418e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Symbol table entries for ELF64. 1419e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf64_Sym { 1420e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word st_name; // Symbol name (index into string table) 1421e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char st_info; // Symbol's type and binding attributes 1422e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char st_other; // Must be zero; reserved 1423e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Half st_shndx; // Which section (header tbl index) it's defined in 1424e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Addr st_value; // Value or address associated with the symbol 1425e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Xword st_size; // Size of the symbol 1426e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1427e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // These accessors and mutators are identical to those defined for ELF32 1428e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // symbol table entries. 1429e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char getBinding() const { return st_info >> 4; } 1430e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char getType() const { return st_info & 0x0f; } 1431e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setBinding(unsigned char b) { setBindingAndType(b, getType()); } 1432e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setType(unsigned char t) { setBindingAndType(getBinding(), t); } 1433e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setBindingAndType(unsigned char b, unsigned char t) { 1434e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom st_info = (b << 4) + (t & 0x0f); 1435e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } 1436e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1437e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1438e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// The size (in bytes) of symbol table entries. 1439e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1440e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SYMENTRY_SIZE32 = 16, // 32-bit symbol entry size 1441e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom SYMENTRY_SIZE64 = 24 // 64-bit symbol entry size. 1442e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1443e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1444e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Symbol bindings. 1445e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1446e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STB_LOCAL = 0, // Local symbol, not visible outside obj file containing def 1447e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STB_GLOBAL = 1, // Global symbol, visible to all object files being combined 1448e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STB_WEAK = 2, // Weak symbol, like global but lower-precedence 1449e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STB_LOOS = 10, // Lowest operating system-specific binding type 1450e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STB_HIOS = 12, // Highest operating system-specific binding type 1451e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STB_LOPROC = 13, // Lowest processor-specific binding type 1452e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STB_HIPROC = 15 // Highest processor-specific binding type 1453e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1454e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1455e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Symbol types. 1456e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1457e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_NOTYPE = 0, // Symbol's type is not specified 1458e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_OBJECT = 1, // Symbol is a data object (variable, array, etc.) 1459e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_FUNC = 2, // Symbol is executable code (function, etc.) 1460e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_SECTION = 3, // Symbol refers to a section 1461e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_FILE = 4, // Local, absolute symbol that refers to a file 1462e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_COMMON = 5, // An uninitialized common block 1463e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_TLS = 6, // Thread local data object 1464e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_LOOS = 7, // Lowest operating system-specific symbol type 1465e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_HIOS = 8, // Highest operating system-specific symbol type 1466e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_GNU_IFUNC = 10, // GNU indirect function 1467e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_LOPROC = 13, // Lowest processor-specific symbol type 1468e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STT_HIPROC = 15 // Highest processor-specific symbol type 1469e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1470e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1471e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1472e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STV_DEFAULT = 0, // Visibility is specified by binding type 1473e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STV_INTERNAL = 1, // Defined by processor supplements 1474e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STV_HIDDEN = 2, // Not visible to other components 1475e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STV_PROTECTED = 3 // Visible in other components but not preemptable 1476e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1477e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1478e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Symbol number. 1479e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1480e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom STN_UNDEF = 0 1481e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1482e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1483e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Relocation entry, without explicit addend. 1484e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf32_Rel { 1485e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Addr r_offset; // Location (file byte offset, or program virtual addr) 1486e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word r_info; // Symbol table index and type of relocation to apply 1487e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1488e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // These accessors and mutators correspond to the ELF32_R_SYM, ELF32_R_TYPE, 1489e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // and ELF32_R_INFO macros defined in the ELF specification: 1490e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word getSymbol() const { return (r_info >> 8); } 1491e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char getType() const { return (unsigned char) (r_info & 0x0ff); } 1492e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setSymbol(Elf32_Word s) { setSymbolAndType(s, getType()); } 1493e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setType(unsigned char t) { setSymbolAndType(getSymbol(), t); } 1494e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setSymbolAndType(Elf32_Word s, unsigned char t) { 1495e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom r_info = (s << 8) + t; 1496e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } 1497e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1498e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1499e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Relocation entry with explicit addend. 1500e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf32_Rela { 1501e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Addr r_offset; // Location (file byte offset, or program virtual addr) 1502e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word r_info; // Symbol table index and type of relocation to apply 1503e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Sword r_addend; // Compute value for relocatable field by adding this 1504e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1505e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // These accessors and mutators correspond to the ELF32_R_SYM, ELF32_R_TYPE, 1506e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // and ELF32_R_INFO macros defined in the ELF specification: 1507e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word getSymbol() const { return (r_info >> 8); } 1508e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom unsigned char getType() const { return (unsigned char) (r_info & 0x0ff); } 1509e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setSymbol(Elf32_Word s) { setSymbolAndType(s, getType()); } 1510e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setType(unsigned char t) { setSymbolAndType(getSymbol(), t); } 1511e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setSymbolAndType(Elf32_Word s, unsigned char t) { 1512e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom r_info = (s << 8) + t; 1513e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } 1514e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1515e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1516e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Relocation entry, without explicit addend. 1517e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf64_Rel { 1518e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Addr r_offset; // Location (file byte offset, or program virtual addr). 1519e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Xword r_info; // Symbol table index and type of relocation to apply. 1520e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1521e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // These accessors and mutators correspond to the ELF64_R_SYM, ELF64_R_TYPE, 1522e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // and ELF64_R_INFO macros defined in the ELF specification: 1523e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word getSymbol() const { return (r_info >> 32); } 1524e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word getType() const { 1525e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom return (Elf64_Word) (r_info & 0xffffffffL); 1526e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } 1527e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setSymbol(Elf64_Word s) { setSymbolAndType(s, getType()); } 1528e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setType(Elf64_Word t) { setSymbolAndType(getSymbol(), t); } 1529e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setSymbolAndType(Elf64_Word s, Elf64_Word t) { 1530e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom r_info = ((Elf64_Xword)s << 32) + (t&0xffffffffL); 1531e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } 1532e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1533e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1534e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Relocation entry with explicit addend. 1535e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf64_Rela { 1536e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Addr r_offset; // Location (file byte offset, or program virtual addr). 1537e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Xword r_info; // Symbol table index and type of relocation to apply. 1538e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Sxword r_addend; // Compute value for relocatable field by adding this. 1539e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1540e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // These accessors and mutators correspond to the ELF64_R_SYM, ELF64_R_TYPE, 1541e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // and ELF64_R_INFO macros defined in the ELF specification: 1542e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word getSymbol() const { return (r_info >> 32); } 1543e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word getType() const { 1544e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom return (Elf64_Word) (r_info & 0xffffffffL); 1545e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } 1546e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setSymbol(Elf64_Word s) { setSymbolAndType(s, getType()); } 1547e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setType(Elf64_Word t) { setSymbolAndType(getSymbol(), t); } 1548e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom void setSymbolAndType(Elf64_Word s, Elf64_Word t) { 1549e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom r_info = ((Elf64_Xword)s << 32) + (t&0xffffffffL); 1550e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } 1551e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1552e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1553e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Program header for ELF32. 1554e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf32_Phdr { 1555e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word p_type; // Type of segment 1556e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Off p_offset; // File offset where segment is located, in bytes 1557e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Addr p_vaddr; // Virtual address of beginning of segment 1558e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Addr p_paddr; // Physical address of beginning of segment (OS-specific) 1559e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word p_filesz; // Num. of bytes in file image of segment (may be zero) 1560e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word p_memsz; // Num. of bytes in mem image of segment (may be zero) 1561e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word p_flags; // Segment flags 1562e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word p_align; // Segment alignment constraint 1563e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1564e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1565e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Program header for ELF64. 1566e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf64_Phdr { 1567e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word p_type; // Type of segment 1568e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Word p_flags; // Segment flags 1569e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Off p_offset; // File offset where segment is located, in bytes 1570e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Addr p_vaddr; // Virtual address of beginning of segment 1571e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Addr p_paddr; // Physical addr of beginning of segment (OS-specific) 1572e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Xword p_filesz; // Num. of bytes in file image of segment (may be zero) 1573e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Xword p_memsz; // Num. of bytes in mem image of segment (may be zero) 1574e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Xword p_align; // Segment alignment constraint 1575e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1576e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1577e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Segment types. 1578e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1579e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_NULL = 0, // Unused segment. 1580e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_LOAD = 1, // Loadable segment. 1581e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_DYNAMIC = 2, // Dynamic linking information. 1582e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_INTERP = 3, // Interpreter pathname. 1583e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_NOTE = 4, // Auxiliary information. 1584e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_SHLIB = 5, // Reserved. 1585e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_PHDR = 6, // The program header table itself. 1586e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_TLS = 7, // The thread-local storage template. 1587e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_LOOS = 0x60000000, // Lowest operating system-specific pt entry type. 1588e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_HIOS = 0x6fffffff, // Highest operating system-specific pt entry type. 1589e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_LOPROC = 0x70000000, // Lowest processor-specific program hdr entry type. 1590e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_HIPROC = 0x7fffffff, // Highest processor-specific program hdr entry type. 1591e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1592e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // x86-64 program header types. 1593e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // These all contain stack unwind tables. 1594e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_GNU_EH_FRAME = 0x6474e550, 1595e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_SUNW_EH_FRAME = 0x6474e550, 1596e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_SUNW_UNWIND = 0x6464e550, 1597e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1598e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_GNU_STACK = 0x6474e551, // Indicates stack executability. 1599e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_GNU_RELRO = 0x6474e552, // Read-only after relocation. 1600e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1601e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // ARM program header types. 1602e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_ARM_ARCHEXT = 0x70000000, // Platform architecture compatibility info 1603e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // These all contain stack unwind tables. 1604e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_ARM_EXIDX = 0x70000001, 1605e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_ARM_UNWIND = 0x70000001, 1606e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1607e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // MIPS program header types. 1608e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_MIPS_REGINFO = 0x70000000, // Register usage information. 1609e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PT_MIPS_RTPROC = 0x70000001, // Runtime procedure table. 1610316a2186b7fa9e03187d45ac0fa320f4dff1f3dfDouglas Leung PT_MIPS_OPTIONS = 0x70000002, // Options segment. 1611316a2186b7fa9e03187d45ac0fa320f4dff1f3dfDouglas Leung PT_MIPS_ABIFLAGS = 0x70000003 // Abiflags segment. 1612e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1613e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1614e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Segment flag bits. 1615e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum : unsigned { 1616e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PF_X = 1, // Execute 1617e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PF_W = 2, // Write 1618e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PF_R = 4, // Read 1619e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PF_MASKOS = 0x0ff00000,// Bits for operating system-specific semantics. 1620e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom PF_MASKPROC = 0xf0000000 // Bits for processor-specific semantics. 1621e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1622e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1623e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Dynamic table entry for ELF32. 1624e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf32_Dyn 1625e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom{ 1626e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Sword d_tag; // Type of dynamic table entry. 1627e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom union 1628e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom { 1629e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Word d_val; // Integer value of entry. 1630e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf32_Addr d_ptr; // Pointer value of entry. 1631e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } d_un; 1632e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1633e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1634e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Dynamic table entry for ELF64. 1635e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromstruct Elf64_Dyn 1636e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom{ 1637e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Sxword d_tag; // Type of dynamic table entry. 1638e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom union 1639e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom { 1640e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Xword d_val; // Integer value of entry. 1641e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom Elf64_Addr d_ptr; // Pointer value of entry. 1642e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom } d_un; 1643e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1644e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1645e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Dynamic table entry tags. 1646e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1647e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_NULL = 0, // Marks end of dynamic array. 1648e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_NEEDED = 1, // String table offset of needed library. 1649e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_PLTRELSZ = 2, // Size of relocation entries in PLT. 1650e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_PLTGOT = 3, // Address associated with linkage table. 1651e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_HASH = 4, // Address of symbolic hash table. 1652e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_STRTAB = 5, // Address of dynamic string table. 1653e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_SYMTAB = 6, // Address of dynamic symbol table. 1654e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_RELA = 7, // Address of relocation table (Rela entries). 1655e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_RELASZ = 8, // Size of Rela relocation table. 1656e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_RELAENT = 9, // Size of a Rela relocation entry. 1657e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_STRSZ = 10, // Total size of the string table. 1658e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_SYMENT = 11, // Size of a symbol table entry. 1659e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_INIT = 12, // Address of initialization function. 1660e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_FINI = 13, // Address of termination function. 1661e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_SONAME = 14, // String table offset of a shared objects name. 1662e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_RPATH = 15, // String table offset of library search path. 1663e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_SYMBOLIC = 16, // Changes symbol resolution algorithm. 1664e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_REL = 17, // Address of relocation table (Rel entries). 1665e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_RELSZ = 18, // Size of Rel relocation table. 1666e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_RELENT = 19, // Size of a Rel relocation entry. 1667e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_PLTREL = 20, // Type of relocation entry used for linking. 1668e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_DEBUG = 21, // Reserved for debugger. 1669e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_TEXTREL = 22, // Relocations exist for non-writable segments. 1670e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_JMPREL = 23, // Address of relocations associated with PLT. 1671e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_BIND_NOW = 24, // Process all relocations before execution. 1672e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_INIT_ARRAY = 25, // Pointer to array of initialization functions. 1673e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_FINI_ARRAY = 26, // Pointer to array of termination functions. 1674e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_INIT_ARRAYSZ = 27, // Size of DT_INIT_ARRAY. 1675e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_FINI_ARRAYSZ = 28, // Size of DT_FINI_ARRAY. 1676e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_RUNPATH = 29, // String table offset of lib search path. 1677e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_FLAGS = 30, // Flags. 1678e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_ENCODING = 32, // Values from here to DT_LOOS follow the rules 1679e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // for the interpretation of the d_un union. 1680e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1681e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_PREINIT_ARRAY = 32, // Pointer to array of preinit functions. 1682e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_PREINIT_ARRAYSZ = 33, // Size of the DT_PREINIT_ARRAY array. 1683e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1684e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_LOOS = 0x60000000, // Start of environment specific tags. 1685e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_HIOS = 0x6FFFFFFF, // End of environment specific tags. 1686e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_LOPROC = 0x70000000, // Start of processor specific tags. 1687e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_HIPROC = 0x7FFFFFFF, // End of processor specific tags. 1688e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1689e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_GNU_HASH = 0x6FFFFEF5, // Reference to the GNU hash table. 1690e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_RELACOUNT = 0x6FFFFFF9, // ELF32_Rela count. 1691e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_RELCOUNT = 0x6FFFFFFA, // ELF32_Rel count. 1692e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1693e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_FLAGS_1 = 0X6FFFFFFB, // Flags_1. 1694e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_VERSYM = 0x6FFFFFF0, // The address of .gnu.version section. 1695e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_VERDEF = 0X6FFFFFFC, // The address of the version definition table. 1696e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_VERDEFNUM = 0X6FFFFFFD, // The number of entries in DT_VERDEF. 1697e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_VERNEED = 0X6FFFFFFE, // The address of the version Dependency table. 1698e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_VERNEEDNUM = 0X6FFFFFFF, // The number of entries in DT_VERNEED. 1699e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1700e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // Mips specific dynamic table entry tags. 1701e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_RLD_VERSION = 0x70000001, // 32 bit version number for runtime 1702e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // linker interface. 1703e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_TIME_STAMP = 0x70000002, // Time stamp. 1704e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_ICHECKSUM = 0x70000003, // Checksum of external strings 1705e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // and common sizes. 1706e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_IVERSION = 0x70000004, // Index of version string 1707e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // in string table. 1708e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_FLAGS = 0x70000005, // 32 bits of flags. 1709e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_BASE_ADDRESS = 0x70000006, // Base address of the segment. 1710e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_MSYM = 0x70000007, // Address of .msym section. 1711e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_CONFLICT = 0x70000008, // Address of .conflict section. 1712e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_LIBLIST = 0x70000009, // Address of .liblist section. 1713e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_LOCAL_GOTNO = 0x7000000a, // Number of local global offset 1714e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // table entries. 1715e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_CONFLICTNO = 0x7000000b, // Number of entries 1716e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // in the .conflict section. 1717e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_LIBLISTNO = 0x70000010, // Number of entries 1718e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // in the .liblist section. 1719e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_SYMTABNO = 0x70000011, // Number of entries 1720e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // in the .dynsym section. 1721e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_UNREFEXTNO = 0x70000012, // Index of first external dynamic symbol 1722e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // not referenced locally. 1723e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_GOTSYM = 0x70000013, // Index of first dynamic symbol 1724e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // in global offset table. 1725e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_HIPAGENO = 0x70000014, // Number of page table entries 1726e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // in global offset table. 1727e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_RLD_MAP = 0x70000016, // Address of run time loader map, 1728e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // used for debugging. 1729e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_DELTA_CLASS = 0x70000017, // Delta C++ class definition. 1730e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_DELTA_CLASS_NO = 0x70000018, // Number of entries 1731e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // in DT_MIPS_DELTA_CLASS. 1732e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_DELTA_INSTANCE = 0x70000019, // Delta C++ class instances. 1733e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_DELTA_INSTANCE_NO = 0x7000001A, // Number of entries 1734e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // in DT_MIPS_DELTA_INSTANCE. 1735e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_DELTA_RELOC = 0x7000001B, // Delta relocations. 1736e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_DELTA_RELOC_NO = 0x7000001C, // Number of entries 1737e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // in DT_MIPS_DELTA_RELOC. 1738e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_DELTA_SYM = 0x7000001D, // Delta symbols that Delta 1739e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // relocations refer to. 1740e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_DELTA_SYM_NO = 0x7000001E, // Number of entries 1741e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // in DT_MIPS_DELTA_SYM. 1742e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_DELTA_CLASSSYM = 0x70000020, // Delta symbols that hold 1743e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // class declarations. 1744e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_DELTA_CLASSSYM_NO = 0x70000021, // Number of entries 1745e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // in DT_MIPS_DELTA_CLASSSYM. 1746e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_CXX_FLAGS = 0x70000022, // Flags indicating information 1747e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // about C++ flavor. 1748e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_PIXIE_INIT = 0x70000023, // Pixie information. 1749e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_SYMBOL_LIB = 0x70000024, // Address of .MIPS.symlib 1750e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_LOCALPAGE_GOTIDX = 0x70000025, // The GOT index of the first PTE 1751e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // for a segment 1752e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_LOCAL_GOTIDX = 0x70000026, // The GOT index of the first PTE 1753e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // for a local symbol 1754e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_HIDDEN_GOTIDX = 0x70000027, // The GOT index of the first PTE 1755e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // for a hidden symbol 1756e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_PROTECTED_GOTIDX = 0x70000028, // The GOT index of the first PTE 1757e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // for a protected symbol 1758e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_OPTIONS = 0x70000029, // Address of `.MIPS.options'. 1759e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_INTERFACE = 0x7000002A, // Address of `.interface'. 1760e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_DYNSTR_ALIGN = 0x7000002B, // Unknown. 1761e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_INTERFACE_SIZE = 0x7000002C, // Size of the .interface section. 1762e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_RLD_TEXT_RESOLVE_ADDR = 0x7000002D, // Size of rld_text_resolve 1763e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // function stored in the GOT. 1764e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_PERF_SUFFIX = 0x7000002E, // Default suffix of DSO to be added 1765e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // by rld on dlopen() calls. 1766e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_COMPACT_SIZE = 0x7000002F, // Size of compact relocation 1767e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // section (O32). 1768e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_GP_VALUE = 0x70000030, // GP value for auxiliary GOTs. 1769e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_AUX_DYNAMIC = 0x70000031, // Address of auxiliary .dynamic. 1770e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_PLTGOT = 0x70000032, // Address of the base of the PLTGOT. 1771e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DT_MIPS_RWPLT = 0x70000034 // Points to the base 1772e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // of a writable PLT. 1773e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1774e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1775e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// DT_FLAGS values. 1776e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1777e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_ORIGIN = 0x01, // The object may reference $ORIGIN. 1778e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_SYMBOLIC = 0x02, // Search the shared lib before searching the exe. 1779e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_TEXTREL = 0x04, // Relocations may modify a non-writable segment. 1780e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_BIND_NOW = 0x08, // Process all relocations on load. 1781e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_STATIC_TLS = 0x10 // Reject attempts to load dynamically. 1782e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1783e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1784e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// State flags selectable in the `d_un.d_val' element of the DT_FLAGS_1 entry. 1785e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1786e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_NOW = 0x00000001, // Set RTLD_NOW for this object. 1787e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_GLOBAL = 0x00000002, // Set RTLD_GLOBAL for this object. 1788e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_GROUP = 0x00000004, // Set RTLD_GROUP for this object. 1789e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_NODELETE = 0x00000008, // Set RTLD_NODELETE for this object. 1790e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_LOADFLTR = 0x00000010, // Trigger filtee loading at runtime. 1791e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_INITFIRST = 0x00000020, // Set RTLD_INITFIRST for this object. 1792e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_NOOPEN = 0x00000040, // Set RTLD_NOOPEN for this object. 1793e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_ORIGIN = 0x00000080, // $ORIGIN must be handled. 1794e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_DIRECT = 0x00000100, // Direct binding enabled. 1795e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_TRANS = 0x00000200, 1796e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_INTERPOSE = 0x00000400, // Object is used to interpose. 1797e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_NODEFLIB = 0x00000800, // Ignore default lib search path. 1798e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_NODUMP = 0x00001000, // Object can't be dldump'ed. 1799e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_CONFALT = 0x00002000, // Configuration alternative created. 1800e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_ENDFILTEE = 0x00004000, // Filtee terminates filters search. 1801e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_DISPRELDNE = 0x00008000, // Disp reloc applied at build time. 1802e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom DF_1_DISPRELPND = 0x00010000 // Disp reloc applied at run-time. 1803e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1804e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1805e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// DT_MIPS_FLAGS values. 1806e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1807e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_NONE = 0x00000000, // No flags. 1808e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_QUICKSTART = 0x00000001, // Uses shortcut pointers. 1809e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_NOTPOT = 0x00000002, // Hash size is not a power of two. 1810e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHS_NO_LIBRARY_REPLACEMENT = 0x00000004, // Ignore LD_LIBRARY_PATH. 1811e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_NO_MOVE = 0x00000008, // DSO address may not be relocated. 1812e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_SGI_ONLY = 0x00000010, // SGI specific features. 1813e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_GUARANTEE_INIT = 0x00000020, // Guarantee that .init will finish 1814e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // executing before any non-init 1815e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // code in DSO is called. 1816e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_DELTA_C_PLUS_PLUS = 0x00000040, // Contains Delta C++ code. 1817e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_GUARANTEE_START_INIT = 0x00000080, // Guarantee that .init will start 1818e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // executing before any non-init 1819e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // code in DSO is called. 1820e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_PIXIE = 0x00000100, // Generated by pixie. 1821e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_DEFAULT_DELAY_LOAD = 0x00000200, // Delay-load DSO by default. 1822e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_REQUICKSTART = 0x00000400, // Object may be requickstarted 1823e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_REQUICKSTARTED = 0x00000800, // Object has been requickstarted 1824e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_CORD = 0x00001000, // Generated by cord. 1825e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_NO_UNRES_UNDEF = 0x00002000, // Object contains no unresolved 1826e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom // undef symbols. 1827e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom RHF_RLD_ORDER_SAFE = 0x00004000 // Symbol table is in a safe order. 1828e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1829e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1830e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// ElfXX_VerDef structure version (GNU versioning) 1831e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1832e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom VER_DEF_NONE = 0, 1833e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom VER_DEF_CURRENT = 1 1834e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1835e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1836e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// VerDef Flags (ElfXX_VerDef::vd_flags) 1837e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1838e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom VER_FLG_BASE = 0x1, 1839e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom VER_FLG_WEAK = 0x2, 1840e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom VER_FLG_INFO = 0x4 1841e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1842e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1843e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// Special constants for the version table. (SHT_GNU_versym/.gnu.version) 1844e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1845e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom VER_NDX_LOCAL = 0, // Unversioned local symbol 1846e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom VER_NDX_GLOBAL = 1, // Unversioned global symbol 1847e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom VERSYM_VERSION = 0x7fff, // Version Index mask 1848e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom VERSYM_HIDDEN = 0x8000 // Hidden bit (non-default version) 1849e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1850e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1851e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// ElfXX_VerNeed structure version (GNU versioning) 1852e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstromenum { 1853e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom VER_NEED_NONE = 0, 1854e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom VER_NEED_CURRENT = 1 1855e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom}; 1856e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom 1857533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbeckystruct ElfTypes32 { 1858533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Addr Addr; 1859533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Off Off; 1860533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Half Half; 1861533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Word Word; 1862533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Sword Sword; 1863533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Ehdr Ehdr; 1864533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Shdr Shdr; 1865533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Sym Sym; 1866533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Rel Rel; 1867533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Rela Rela; 1868533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Phdr Phdr; 1869533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf32_Dyn Dyn; 1870533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky}; 1871533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky 1872533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbeckystruct ElfTypes64 { 1873533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Addr Addr; 1874533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Off Off; 1875533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Half Half; 1876533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Word Word; 1877533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Sword Sword; 1878533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Xword Xword; 1879533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Sxword Sxword; 1880533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Ehdr Ehdr; 1881533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Shdr Shdr; 1882533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Sym Sym; 1883533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Rel Rel; 1884533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Rela Rela; 1885533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Phdr Phdr; 1886533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky typedef Elf64_Dyn Dyn; 1887533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky}; 1888533c207f9d2da6d913c4b10f6f757fe9d6367b10David Srbecky 1889e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// BEGIN android-changed 1890e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom#endif // ART_RUNTIME_ELF_H_ 1891e130ee6fe902315062ce17f8ce115b1dc506576dBrian Carlstrom// END android-changed 1892