15796c8dcSSimon Schubert /* ELF support for BFD. 2*ef5ccd6cSJohn Marino Copyright 1991-2013 Free Software Foundation, Inc. 35796c8dcSSimon Schubert 45796c8dcSSimon Schubert Written by Fred Fish @ Cygnus Support, from information published 55796c8dcSSimon Schubert in "UNIX System V Release 4, Programmers Guide: ANSI C and 65796c8dcSSimon Schubert Programming Support Tools". 75796c8dcSSimon Schubert 85796c8dcSSimon Schubert This file is part of BFD, the Binary File Descriptor library. 95796c8dcSSimon Schubert 105796c8dcSSimon Schubert This program is free software; you can redistribute it and/or modify 115796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by 12cf7f2e2dSJohn Marino the Free Software Foundation; either version 3 of the License, or 135796c8dcSSimon Schubert (at your option) any later version. 145796c8dcSSimon Schubert 155796c8dcSSimon Schubert This program is distributed in the hope that it will be useful, 165796c8dcSSimon Schubert but WITHOUT ANY WARRANTY; without even the implied warranty of 175796c8dcSSimon Schubert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 185796c8dcSSimon Schubert GNU General Public License for more details. 195796c8dcSSimon Schubert 205796c8dcSSimon Schubert You should have received a copy of the GNU General Public License 215796c8dcSSimon Schubert along with this program; if not, write to the Free Software 22cf7f2e2dSJohn Marino Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 23cf7f2e2dSJohn Marino MA 02110-1301, USA. */ 245796c8dcSSimon Schubert 255796c8dcSSimon Schubert /* This file is part of ELF support for BFD, and contains the portions 265796c8dcSSimon Schubert that are common to both the internal and external representations. 275796c8dcSSimon Schubert For example, ELFMAG0 is the byte 0x7F in both the internal (in-memory) 285796c8dcSSimon Schubert and external (in-file) representations. */ 295796c8dcSSimon Schubert 305796c8dcSSimon Schubert #ifndef _ELF_COMMON_H 315796c8dcSSimon Schubert #define _ELF_COMMON_H 325796c8dcSSimon Schubert 335796c8dcSSimon Schubert /* Fields in e_ident[]. */ 345796c8dcSSimon Schubert 355796c8dcSSimon Schubert #define EI_MAG0 0 /* File identification byte 0 index */ 365796c8dcSSimon Schubert #define ELFMAG0 0x7F /* Magic number byte 0 */ 375796c8dcSSimon Schubert 385796c8dcSSimon Schubert #define EI_MAG1 1 /* File identification byte 1 index */ 395796c8dcSSimon Schubert #define ELFMAG1 'E' /* Magic number byte 1 */ 405796c8dcSSimon Schubert 415796c8dcSSimon Schubert #define EI_MAG2 2 /* File identification byte 2 index */ 425796c8dcSSimon Schubert #define ELFMAG2 'L' /* Magic number byte 2 */ 435796c8dcSSimon Schubert 445796c8dcSSimon Schubert #define EI_MAG3 3 /* File identification byte 3 index */ 455796c8dcSSimon Schubert #define ELFMAG3 'F' /* Magic number byte 3 */ 465796c8dcSSimon Schubert 475796c8dcSSimon Schubert #define EI_CLASS 4 /* File class */ 485796c8dcSSimon Schubert #define ELFCLASSNONE 0 /* Invalid class */ 495796c8dcSSimon Schubert #define ELFCLASS32 1 /* 32-bit objects */ 505796c8dcSSimon Schubert #define ELFCLASS64 2 /* 64-bit objects */ 515796c8dcSSimon Schubert 525796c8dcSSimon Schubert #define EI_DATA 5 /* Data encoding */ 535796c8dcSSimon Schubert #define ELFDATANONE 0 /* Invalid data encoding */ 545796c8dcSSimon Schubert #define ELFDATA2LSB 1 /* 2's complement, little endian */ 555796c8dcSSimon Schubert #define ELFDATA2MSB 2 /* 2's complement, big endian */ 565796c8dcSSimon Schubert 575796c8dcSSimon Schubert #define EI_VERSION 6 /* File version */ 585796c8dcSSimon Schubert 595796c8dcSSimon Schubert #define EI_OSABI 7 /* Operating System/ABI indication */ 605796c8dcSSimon Schubert #define ELFOSABI_NONE 0 /* UNIX System V ABI */ 615796c8dcSSimon Schubert #define ELFOSABI_HPUX 1 /* HP-UX operating system */ 625796c8dcSSimon Schubert #define ELFOSABI_NETBSD 2 /* NetBSD */ 63a45ae5f8SJohn Marino #define ELFOSABI_GNU 3 /* GNU */ 64a45ae5f8SJohn Marino #define ELFOSABI_LINUX 3 /* Alias for ELFOSABI_GNU */ 655796c8dcSSimon Schubert #define ELFOSABI_SOLARIS 6 /* Solaris */ 665796c8dcSSimon Schubert #define ELFOSABI_AIX 7 /* AIX */ 675796c8dcSSimon Schubert #define ELFOSABI_IRIX 8 /* IRIX */ 685796c8dcSSimon Schubert #define ELFOSABI_FREEBSD 9 /* FreeBSD */ 695796c8dcSSimon Schubert #define ELFOSABI_TRU64 10 /* TRU64 UNIX */ 705796c8dcSSimon Schubert #define ELFOSABI_MODESTO 11 /* Novell Modesto */ 715796c8dcSSimon Schubert #define ELFOSABI_OPENBSD 12 /* OpenBSD */ 725796c8dcSSimon Schubert #define ELFOSABI_OPENVMS 13 /* OpenVMS */ 735796c8dcSSimon Schubert #define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */ 745796c8dcSSimon Schubert #define ELFOSABI_AROS 15 /* AROS */ 75cf7f2e2dSJohn Marino #define ELFOSABI_FENIXOS 16 /* FenixOS */ 76cf7f2e2dSJohn Marino #define ELFOSABI_C6000_ELFABI 64 /* Bare-metal TMS320C6000 */ 77cf7f2e2dSJohn Marino #define ELFOSABI_C6000_LINUX 65 /* Linux TMS320C6000 */ 785796c8dcSSimon Schubert #define ELFOSABI_ARM 97 /* ARM */ 795796c8dcSSimon Schubert #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ 805796c8dcSSimon Schubert 815796c8dcSSimon Schubert #define EI_ABIVERSION 8 /* ABI version */ 825796c8dcSSimon Schubert 835796c8dcSSimon Schubert #define EI_PAD 9 /* Start of padding bytes */ 845796c8dcSSimon Schubert 855796c8dcSSimon Schubert 865796c8dcSSimon Schubert /* Values for e_type, which identifies the object file type. */ 875796c8dcSSimon Schubert 885796c8dcSSimon Schubert #define ET_NONE 0 /* No file type */ 895796c8dcSSimon Schubert #define ET_REL 1 /* Relocatable file */ 905796c8dcSSimon Schubert #define ET_EXEC 2 /* Executable file */ 915796c8dcSSimon Schubert #define ET_DYN 3 /* Shared object file */ 925796c8dcSSimon Schubert #define ET_CORE 4 /* Core file */ 935796c8dcSSimon Schubert #define ET_LOOS 0xFE00 /* Operating system-specific */ 945796c8dcSSimon Schubert #define ET_HIOS 0xFEFF /* Operating system-specific */ 955796c8dcSSimon Schubert #define ET_LOPROC 0xFF00 /* Processor-specific */ 965796c8dcSSimon Schubert #define ET_HIPROC 0xFFFF /* Processor-specific */ 975796c8dcSSimon Schubert 985796c8dcSSimon Schubert /* Values for e_machine, which identifies the architecture. These numbers 995796c8dcSSimon Schubert are officially assigned by registry@sco.com. See below for a list of 1005796c8dcSSimon Schubert ad-hoc numbers used during initial development. */ 1015796c8dcSSimon Schubert 1025796c8dcSSimon Schubert #define EM_NONE 0 /* No machine */ 1035796c8dcSSimon Schubert #define EM_M32 1 /* AT&T WE 32100 */ 1045796c8dcSSimon Schubert #define EM_SPARC 2 /* SUN SPARC */ 1055796c8dcSSimon Schubert #define EM_386 3 /* Intel 80386 */ 1065796c8dcSSimon Schubert #define EM_68K 4 /* Motorola m68k family */ 1075796c8dcSSimon Schubert #define EM_88K 5 /* Motorola m88k family */ 1085796c8dcSSimon Schubert #define EM_486 6 /* Intel 80486 *//* Reserved for future use */ 1095796c8dcSSimon Schubert #define EM_860 7 /* Intel 80860 */ 1105796c8dcSSimon Schubert #define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ 1115796c8dcSSimon Schubert #define EM_S370 9 /* IBM System/370 */ 1125796c8dcSSimon Schubert #define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft) Deprecated */ 1135796c8dcSSimon Schubert #define EM_res011 11 /* Reserved */ 1145796c8dcSSimon Schubert #define EM_res012 12 /* Reserved */ 1155796c8dcSSimon Schubert #define EM_res013 13 /* Reserved */ 1165796c8dcSSimon Schubert #define EM_res014 14 /* Reserved */ 1175796c8dcSSimon Schubert #define EM_PARISC 15 /* HPPA */ 1185796c8dcSSimon Schubert #define EM_res016 16 /* Reserved */ 1195796c8dcSSimon Schubert #define EM_VPP550 17 /* Fujitsu VPP500 */ 1205796c8dcSSimon Schubert #define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ 1215796c8dcSSimon Schubert #define EM_960 19 /* Intel 80960 */ 1225796c8dcSSimon Schubert #define EM_PPC 20 /* PowerPC */ 1235796c8dcSSimon Schubert #define EM_PPC64 21 /* 64-bit PowerPC */ 1245796c8dcSSimon Schubert #define EM_S390 22 /* IBM S/390 */ 1255796c8dcSSimon Schubert #define EM_SPU 23 /* Sony/Toshiba/IBM SPU */ 1265796c8dcSSimon Schubert #define EM_res024 24 /* Reserved */ 1275796c8dcSSimon Schubert #define EM_res025 25 /* Reserved */ 1285796c8dcSSimon Schubert #define EM_res026 26 /* Reserved */ 1295796c8dcSSimon Schubert #define EM_res027 27 /* Reserved */ 1305796c8dcSSimon Schubert #define EM_res028 28 /* Reserved */ 1315796c8dcSSimon Schubert #define EM_res029 29 /* Reserved */ 1325796c8dcSSimon Schubert #define EM_res030 30 /* Reserved */ 1335796c8dcSSimon Schubert #define EM_res031 31 /* Reserved */ 1345796c8dcSSimon Schubert #define EM_res032 32 /* Reserved */ 1355796c8dcSSimon Schubert #define EM_res033 33 /* Reserved */ 1365796c8dcSSimon Schubert #define EM_res034 34 /* Reserved */ 1375796c8dcSSimon Schubert #define EM_res035 35 /* Reserved */ 1385796c8dcSSimon Schubert #define EM_V800 36 /* NEC V800 series */ 1395796c8dcSSimon Schubert #define EM_FR20 37 /* Fujitsu FR20 */ 1405796c8dcSSimon Schubert #define EM_RH32 38 /* TRW RH32 */ 1415796c8dcSSimon Schubert #define EM_MCORE 39 /* Motorola M*Core */ /* May also be taken by Fujitsu MMA */ 1425796c8dcSSimon Schubert #define EM_RCE 39 /* Old name for MCore */ 1435796c8dcSSimon Schubert #define EM_ARM 40 /* ARM */ 1445796c8dcSSimon Schubert #define EM_OLD_ALPHA 41 /* Digital Alpha */ 1455796c8dcSSimon Schubert #define EM_SH 42 /* Renesas (formerly Hitachi) / SuperH SH */ 1465796c8dcSSimon Schubert #define EM_SPARCV9 43 /* SPARC v9 64-bit */ 1475796c8dcSSimon Schubert #define EM_TRICORE 44 /* Siemens Tricore embedded processor */ 1485796c8dcSSimon Schubert #define EM_ARC 45 /* ARC Cores */ 1495796c8dcSSimon Schubert #define EM_H8_300 46 /* Renesas (formerly Hitachi) H8/300 */ 1505796c8dcSSimon Schubert #define EM_H8_300H 47 /* Renesas (formerly Hitachi) H8/300H */ 1515796c8dcSSimon Schubert #define EM_H8S 48 /* Renesas (formerly Hitachi) H8S */ 1525796c8dcSSimon Schubert #define EM_H8_500 49 /* Renesas (formerly Hitachi) H8/500 */ 1535796c8dcSSimon Schubert #define EM_IA_64 50 /* Intel IA-64 Processor */ 1545796c8dcSSimon Schubert #define EM_MIPS_X 51 /* Stanford MIPS-X */ 1555796c8dcSSimon Schubert #define EM_COLDFIRE 52 /* Motorola Coldfire */ 1565796c8dcSSimon Schubert #define EM_68HC12 53 /* Motorola M68HC12 */ 1575796c8dcSSimon Schubert #define EM_MMA 54 /* Fujitsu Multimedia Accelerator */ 1585796c8dcSSimon Schubert #define EM_PCP 55 /* Siemens PCP */ 1595796c8dcSSimon Schubert #define EM_NCPU 56 /* Sony nCPU embedded RISC processor */ 160a45ae5f8SJohn Marino #define EM_NDR1 57 /* Denso NDR1 microprocessor */ 1615796c8dcSSimon Schubert #define EM_STARCORE 58 /* Motorola Star*Core processor */ 1625796c8dcSSimon Schubert #define EM_ME16 59 /* Toyota ME16 processor */ 1635796c8dcSSimon Schubert #define EM_ST100 60 /* STMicroelectronics ST100 processor */ 1645796c8dcSSimon Schubert #define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */ 1655796c8dcSSimon Schubert #define EM_X86_64 62 /* Advanced Micro Devices X86-64 processor */ 1665796c8dcSSimon Schubert #define EM_PDSP 63 /* Sony DSP Processor */ 1675796c8dcSSimon Schubert #define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */ 1685796c8dcSSimon Schubert #define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */ 1695796c8dcSSimon Schubert #define EM_FX66 66 /* Siemens FX66 microcontroller */ 1705796c8dcSSimon Schubert #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */ 1715796c8dcSSimon Schubert #define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */ 1725796c8dcSSimon Schubert #define EM_68HC16 69 /* Motorola MC68HC16 Microcontroller */ 1735796c8dcSSimon Schubert #define EM_68HC11 70 /* Motorola MC68HC11 Microcontroller */ 1745796c8dcSSimon Schubert #define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */ 1755796c8dcSSimon Schubert #define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */ 1765796c8dcSSimon Schubert #define EM_SVX 73 /* Silicon Graphics SVx */ 1775796c8dcSSimon Schubert #define EM_ST19 74 /* STMicroelectronics ST19 8-bit cpu */ 1785796c8dcSSimon Schubert #define EM_VAX 75 /* Digital VAX */ 1795796c8dcSSimon Schubert #define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ 1805796c8dcSSimon Schubert #define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded cpu */ 1815796c8dcSSimon Schubert #define EM_FIREPATH 78 /* Element 14 64-bit DSP processor */ 1825796c8dcSSimon Schubert #define EM_ZSP 79 /* LSI Logic's 16-bit DSP processor */ 1835796c8dcSSimon Schubert #define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */ 1845796c8dcSSimon Schubert #define EM_HUANY 81 /* Harvard's machine-independent format */ 1855796c8dcSSimon Schubert #define EM_PRISM 82 /* SiTera Prism */ 1865796c8dcSSimon Schubert #define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */ 1875796c8dcSSimon Schubert #define EM_FR30 84 /* Fujitsu FR30 */ 1885796c8dcSSimon Schubert #define EM_D10V 85 /* Mitsubishi D10V */ 1895796c8dcSSimon Schubert #define EM_D30V 86 /* Mitsubishi D30V */ 190c50c785cSJohn Marino #define EM_V850 87 /* Renesas V850 (formerly NEC V850) */ 1915796c8dcSSimon Schubert #define EM_M32R 88 /* Renesas M32R (formerly Mitsubishi M32R) */ 1925796c8dcSSimon Schubert #define EM_MN10300 89 /* Matsushita MN10300 */ 1935796c8dcSSimon Schubert #define EM_MN10200 90 /* Matsushita MN10200 */ 1945796c8dcSSimon Schubert #define EM_PJ 91 /* picoJava */ 1955796c8dcSSimon Schubert #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ 1965796c8dcSSimon Schubert #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ 1975796c8dcSSimon Schubert #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ 1985796c8dcSSimon Schubert #define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */ 1995796c8dcSSimon Schubert #define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */ 2005796c8dcSSimon Schubert #define EM_NS32K 97 /* National Semiconductor 32000 series */ 2015796c8dcSSimon Schubert #define EM_TPC 98 /* Tenor Network TPC processor */ 2025796c8dcSSimon Schubert #define EM_SNP1K 99 /* Trebia SNP 1000 processor */ 2035796c8dcSSimon Schubert #define EM_ST200 100 /* STMicroelectronics ST200 microcontroller */ 2045796c8dcSSimon Schubert #define EM_IP2K 101 /* Ubicom IP2022 micro controller */ 2055796c8dcSSimon Schubert #define EM_MAX 102 /* MAX Processor */ 2065796c8dcSSimon Schubert #define EM_CR 103 /* National Semiconductor CompactRISC */ 2075796c8dcSSimon Schubert #define EM_F2MC16 104 /* Fujitsu F2MC16 */ 2085796c8dcSSimon Schubert #define EM_MSP430 105 /* TI msp430 micro controller */ 2095796c8dcSSimon Schubert #define EM_BLACKFIN 106 /* ADI Blackfin */ 2105796c8dcSSimon Schubert #define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */ 2115796c8dcSSimon Schubert #define EM_SEP 108 /* Sharp embedded microprocessor */ 2125796c8dcSSimon Schubert #define EM_ARCA 109 /* Arca RISC Microprocessor */ 2135796c8dcSSimon Schubert #define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */ 2145796c8dcSSimon Schubert #define EM_EXCESS 111 /* eXcess: 16/32/64-bit configurable embedded CPU */ 2155796c8dcSSimon Schubert #define EM_DXP 112 /* Icera Semiconductor Inc. Deep Execution Processor */ 2165796c8dcSSimon Schubert #define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */ 2175796c8dcSSimon Schubert #define EM_CRX 114 /* National Semiconductor CRX */ 2185796c8dcSSimon Schubert #define EM_XGATE 115 /* Motorola XGATE embedded processor */ 2195796c8dcSSimon Schubert #define EM_C166 116 /* Infineon C16x/XC16x processor */ 2205796c8dcSSimon Schubert #define EM_M16C 117 /* Renesas M16C series microprocessors */ 2215796c8dcSSimon Schubert #define EM_DSPIC30F 118 /* Microchip Technology dsPIC30F Digital Signal Controller */ 2225796c8dcSSimon Schubert #define EM_CE 119 /* Freescale Communication Engine RISC core */ 2235796c8dcSSimon Schubert #define EM_M32C 120 /* Renesas M32C series microprocessors */ 2245796c8dcSSimon Schubert #define EM_res121 121 /* Reserved */ 2255796c8dcSSimon Schubert #define EM_res122 122 /* Reserved */ 2265796c8dcSSimon Schubert #define EM_res123 123 /* Reserved */ 2275796c8dcSSimon Schubert #define EM_res124 124 /* Reserved */ 2285796c8dcSSimon Schubert #define EM_res125 125 /* Reserved */ 2295796c8dcSSimon Schubert #define EM_res126 126 /* Reserved */ 2305796c8dcSSimon Schubert #define EM_res127 127 /* Reserved */ 2315796c8dcSSimon Schubert #define EM_res128 128 /* Reserved */ 2325796c8dcSSimon Schubert #define EM_res129 129 /* Reserved */ 2335796c8dcSSimon Schubert #define EM_res130 130 /* Reserved */ 2345796c8dcSSimon Schubert #define EM_TSK3000 131 /* Altium TSK3000 core */ 2355796c8dcSSimon Schubert #define EM_RS08 132 /* Freescale RS08 embedded processor */ 2365796c8dcSSimon Schubert #define EM_res133 133 /* Reserved */ 2375796c8dcSSimon Schubert #define EM_ECOG2 134 /* Cyan Technology eCOG2 microprocessor */ 2385796c8dcSSimon Schubert #define EM_SCORE 135 /* Sunplus Score */ 2395796c8dcSSimon Schubert #define EM_SCORE7 135 /* Sunplus S+core7 RISC processor */ 2405796c8dcSSimon Schubert #define EM_DSP24 136 /* New Japan Radio (NJR) 24-bit DSP Processor */ 2415796c8dcSSimon Schubert #define EM_VIDEOCORE3 137 /* Broadcom VideoCore III processor */ 2425796c8dcSSimon Schubert #define EM_LATTICEMICO32 138 /* RISC processor for Lattice FPGA architecture */ 2435796c8dcSSimon Schubert #define EM_SE_C17 139 /* Seiko Epson C17 family */ 244cf7f2e2dSJohn Marino #define EM_TI_C6000 140 /* Texas Instruments TMS320C6000 DSP family */ 245cf7f2e2dSJohn Marino #define EM_TI_C2000 141 /* Texas Instruments TMS320C2000 DSP family */ 246cf7f2e2dSJohn Marino #define EM_TI_C5500 142 /* Texas Instruments TMS320C55x DSP family */ 2475796c8dcSSimon Schubert #define EM_res143 143 /* Reserved */ 2485796c8dcSSimon Schubert #define EM_res144 144 /* Reserved */ 2495796c8dcSSimon Schubert #define EM_res145 145 /* Reserved */ 2505796c8dcSSimon Schubert #define EM_res146 146 /* Reserved */ 2515796c8dcSSimon Schubert #define EM_res147 147 /* Reserved */ 2525796c8dcSSimon Schubert #define EM_res148 148 /* Reserved */ 2535796c8dcSSimon Schubert #define EM_res149 149 /* Reserved */ 2545796c8dcSSimon Schubert #define EM_res150 150 /* Reserved */ 2555796c8dcSSimon Schubert #define EM_res151 151 /* Reserved */ 2565796c8dcSSimon Schubert #define EM_res152 152 /* Reserved */ 2575796c8dcSSimon Schubert #define EM_res153 153 /* Reserved */ 2585796c8dcSSimon Schubert #define EM_res154 154 /* Reserved */ 2595796c8dcSSimon Schubert #define EM_res155 155 /* Reserved */ 2605796c8dcSSimon Schubert #define EM_res156 156 /* Reserved */ 2615796c8dcSSimon Schubert #define EM_res157 157 /* Reserved */ 2625796c8dcSSimon Schubert #define EM_res158 158 /* Reserved */ 2635796c8dcSSimon Schubert #define EM_res159 159 /* Reserved */ 2645796c8dcSSimon Schubert #define EM_MMDSP_PLUS 160 /* STMicroelectronics 64bit VLIW Data Signal Processor */ 2655796c8dcSSimon Schubert #define EM_CYPRESS_M8C 161 /* Cypress M8C microprocessor */ 2665796c8dcSSimon Schubert #define EM_R32C 162 /* Renesas R32C series microprocessors */ 2675796c8dcSSimon Schubert #define EM_TRIMEDIA 163 /* NXP Semiconductors TriMedia architecture family */ 2685796c8dcSSimon Schubert #define EM_QDSP6 164 /* QUALCOMM DSP6 Processor */ 2695796c8dcSSimon Schubert #define EM_8051 165 /* Intel 8051 and variants */ 2705796c8dcSSimon Schubert #define EM_STXP7X 166 /* STMicroelectronics STxP7x family */ 2715796c8dcSSimon Schubert #define EM_NDS32 167 /* Andes Technology compact code size embedded RISC processor family */ 2725796c8dcSSimon Schubert #define EM_ECOG1 168 /* Cyan Technology eCOG1X family */ 2735796c8dcSSimon Schubert #define EM_ECOG1X 168 /* Cyan Technology eCOG1X family */ 2745796c8dcSSimon Schubert #define EM_MAXQ30 169 /* Dallas Semiconductor MAXQ30 Core Micro-controllers */ 2755796c8dcSSimon Schubert #define EM_XIMO16 170 /* New Japan Radio (NJR) 16-bit DSP Processor */ 2765796c8dcSSimon Schubert #define EM_MANIK 171 /* M2000 Reconfigurable RISC Microprocessor */ 2775796c8dcSSimon Schubert #define EM_CRAYNV2 172 /* Cray Inc. NV2 vector architecture */ 2785796c8dcSSimon Schubert #define EM_RX 173 /* Renesas RX family */ 279*ef5ccd6cSJohn Marino #define EM_METAG 174 /* Imagination Technologies Meta processor architecture */ 2805796c8dcSSimon Schubert #define EM_MCST_ELBRUS 175 /* MCST Elbrus general purpose hardware architecture */ 2815796c8dcSSimon Schubert #define EM_ECOG16 176 /* Cyan Technology eCOG16 family */ 2825796c8dcSSimon Schubert #define EM_CR16 177 /* National Semiconductor CompactRISC 16-bit processor */ 2835796c8dcSSimon Schubert #define EM_ETPU 178 /* Freescale Extended Time Processing Unit */ 2845796c8dcSSimon Schubert #define EM_SLE9X 179 /* Infineon Technologies SLE9X core */ 2855796c8dcSSimon Schubert #define EM_L1OM 180 /* Intel L1OM */ 286a45ae5f8SJohn Marino #define EM_K1OM 181 /* Intel K1OM */ 2875796c8dcSSimon Schubert #define EM_INTEL182 182 /* Reserved by Intel */ 288*ef5ccd6cSJohn Marino #define EM_AARCH64 183 /* ARM 64-bit architecture */ 289*ef5ccd6cSJohn Marino #define EM_ARM184 184 /* Reserved by ARM */ 2905796c8dcSSimon Schubert #define EM_AVR32 185 /* Atmel Corporation 32-bit microprocessor family */ 2915796c8dcSSimon Schubert #define EM_STM8 186 /* STMicroeletronics STM8 8-bit microcontroller */ 2925796c8dcSSimon Schubert #define EM_TILE64 187 /* Tilera TILE64 multicore architecture family */ 2935796c8dcSSimon Schubert #define EM_TILEPRO 188 /* Tilera TILEPro multicore architecture family */ 2945796c8dcSSimon Schubert #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze 32-bit RISC soft processor core */ 295cf7f2e2dSJohn Marino #define EM_CUDA 190 /* NVIDIA CUDA architecture */ 296a45ae5f8SJohn Marino #define EM_TILEGX 191 /* Tilera TILE-Gx multicore architecture family */ 297a45ae5f8SJohn Marino #define EM_RL78 197 /* Renesas RL78 family. */ 298a45ae5f8SJohn Marino #define EM_78K0R 199 /* Renesas 78K0R. */ 2995796c8dcSSimon Schubert 3005796c8dcSSimon Schubert /* If it is necessary to assign new unofficial EM_* values, please pick large 3015796c8dcSSimon Schubert random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision 3025796c8dcSSimon Schubert with official or non-GNU unofficial values. 3035796c8dcSSimon Schubert 3045796c8dcSSimon Schubert NOTE: Do not just increment the most recent number by one. 3055796c8dcSSimon Schubert Somebody else somewhere will do exactly the same thing, and you 3065796c8dcSSimon Schubert will have a collision. Instead, pick a random number. 3075796c8dcSSimon Schubert 3085796c8dcSSimon Schubert Normally, each entity or maintainer responsible for a machine with an 3095796c8dcSSimon Schubert unofficial e_machine number should eventually ask registry@sco.com for 3105796c8dcSSimon Schubert an officially blessed number to be added to the list above. */ 3115796c8dcSSimon Schubert 3125796c8dcSSimon Schubert /* Old version of Sparc v9, from before the ABI; 3135796c8dcSSimon Schubert This should be removed shortly. */ 3145796c8dcSSimon Schubert #define EM_OLD_SPARCV9 11 3155796c8dcSSimon Schubert 3165796c8dcSSimon Schubert /* Old version of PowerPC, this should be removed shortly. */ 3175796c8dcSSimon Schubert #define EM_PPC_OLD 17 3185796c8dcSSimon Schubert 3195796c8dcSSimon Schubert /* picoJava */ 3205796c8dcSSimon Schubert #define EM_PJ_OLD 99 3215796c8dcSSimon Schubert 3225796c8dcSSimon Schubert /* Old, unofficial value for National Semiconductor CompactRISC - CR16 */ 3235796c8dcSSimon Schubert #define EM_CR16_OLD 115 3245796c8dcSSimon Schubert 3255796c8dcSSimon Schubert /* AVR magic number. Written in the absense of an ABI. */ 3265796c8dcSSimon Schubert #define EM_AVR_OLD 0x1057 3275796c8dcSSimon Schubert 3285796c8dcSSimon Schubert /* MSP430 magic number. Written in the absense of everything. */ 3295796c8dcSSimon Schubert #define EM_MSP430_OLD 0x1059 3305796c8dcSSimon Schubert 3315796c8dcSSimon Schubert /* Morpho MT. Written in the absense of an ABI. */ 3325796c8dcSSimon Schubert #define EM_MT 0x2530 3335796c8dcSSimon Schubert 3345796c8dcSSimon Schubert /* FR30 magic number - no EABI available. */ 3355796c8dcSSimon Schubert #define EM_CYGNUS_FR30 0x3330 3365796c8dcSSimon Schubert 3375796c8dcSSimon Schubert /* OpenRISC magic number. Written in the absense of an ABI. */ 3385796c8dcSSimon Schubert #define EM_OPENRISC_OLD 0x3426 3395796c8dcSSimon Schubert 3405796c8dcSSimon Schubert /* DLX magic number. Written in the absense of an ABI. */ 3415796c8dcSSimon Schubert #define EM_DLX 0x5aa5 3425796c8dcSSimon Schubert 3435796c8dcSSimon Schubert /* FRV magic number - no EABI available??. */ 3445796c8dcSSimon Schubert #define EM_CYGNUS_FRV 0x5441 3455796c8dcSSimon Schubert 3465796c8dcSSimon Schubert /* Infineon Technologies 16-bit microcontroller with C166-V2 core. */ 3475796c8dcSSimon Schubert #define EM_XC16X 0x4688 3485796c8dcSSimon Schubert 3495796c8dcSSimon Schubert /* D10V backend magic number. Written in the absence of an ABI. */ 3505796c8dcSSimon Schubert #define EM_CYGNUS_D10V 0x7650 3515796c8dcSSimon Schubert 3525796c8dcSSimon Schubert /* D30V backend magic number. Written in the absence of an ABI. */ 3535796c8dcSSimon Schubert #define EM_CYGNUS_D30V 0x7676 3545796c8dcSSimon Schubert 3555796c8dcSSimon Schubert /* Ubicom IP2xxx; Written in the absense of an ABI. */ 3565796c8dcSSimon Schubert #define EM_IP2K_OLD 0x8217 3575796c8dcSSimon Schubert 3585796c8dcSSimon Schubert /* (Deprecated) Temporary number for the OpenRISC processor. */ 3595796c8dcSSimon Schubert #define EM_OR32 0x8472 3605796c8dcSSimon Schubert 3615796c8dcSSimon Schubert /* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */ 3625796c8dcSSimon Schubert #define EM_CYGNUS_POWERPC 0x9025 3635796c8dcSSimon Schubert 3645796c8dcSSimon Schubert /* Alpha backend magic number. Written in the absence of an ABI. */ 3655796c8dcSSimon Schubert #define EM_ALPHA 0x9026 3665796c8dcSSimon Schubert 3675796c8dcSSimon Schubert /* Cygnus M32R ELF backend. Written in the absence of an ABI. */ 3685796c8dcSSimon Schubert #define EM_CYGNUS_M32R 0x9041 3695796c8dcSSimon Schubert 3705796c8dcSSimon Schubert /* V850 backend magic number. Written in the absense of an ABI. */ 3715796c8dcSSimon Schubert #define EM_CYGNUS_V850 0x9080 3725796c8dcSSimon Schubert 3735796c8dcSSimon Schubert /* old S/390 backend magic number. Written in the absence of an ABI. */ 3745796c8dcSSimon Schubert #define EM_S390_OLD 0xa390 3755796c8dcSSimon Schubert 3765796c8dcSSimon Schubert /* Old, unofficial value for Xtensa. */ 3775796c8dcSSimon Schubert #define EM_XTENSA_OLD 0xabc7 3785796c8dcSSimon Schubert 3795796c8dcSSimon Schubert #define EM_XSTORMY16 0xad45 3805796c8dcSSimon Schubert 3815796c8dcSSimon Schubert /* mn10200 and mn10300 backend magic numbers. 3825796c8dcSSimon Schubert Written in the absense of an ABI. */ 3835796c8dcSSimon Schubert #define EM_CYGNUS_MN10300 0xbeef 3845796c8dcSSimon Schubert #define EM_CYGNUS_MN10200 0xdead 3855796c8dcSSimon Schubert 3865796c8dcSSimon Schubert /* Renesas M32C and M16C. */ 3875796c8dcSSimon Schubert #define EM_M32C_OLD 0xFEB0 3885796c8dcSSimon Schubert 3895796c8dcSSimon Schubert /* Vitesse IQ2000. */ 3905796c8dcSSimon Schubert #define EM_IQ2000 0xFEBA 3915796c8dcSSimon Schubert 3925796c8dcSSimon Schubert /* NIOS magic number - no EABI available. */ 3935796c8dcSSimon Schubert #define EM_NIOS32 0xFEBB 3945796c8dcSSimon Schubert 3955796c8dcSSimon Schubert #define EM_CYGNUS_MEP 0xF00D /* Toshiba MeP */ 3965796c8dcSSimon Schubert 3975796c8dcSSimon Schubert #define EM_MOXIE 0xFEED /* Moxie */ 3985796c8dcSSimon Schubert 3995796c8dcSSimon Schubert /* Old Sunplus S+core7 backend magic number. Written in the absence of an ABI. */ 4005796c8dcSSimon Schubert #define EM_SCORE_OLD 95 4015796c8dcSSimon Schubert 4025796c8dcSSimon Schubert #define EM_MICROBLAZE_OLD 0xbaab /* Old MicroBlaze */ 4035796c8dcSSimon Schubert 404a45ae5f8SJohn Marino #define EM_ADAPTEVA_EPIPHANY 0x1223 /* Adapteva's Epiphany architecture. */ 405a45ae5f8SJohn Marino 4065796c8dcSSimon Schubert /* See the above comment before you add a new EM_* value here. */ 4075796c8dcSSimon Schubert 4085796c8dcSSimon Schubert /* Values for e_version. */ 4095796c8dcSSimon Schubert 4105796c8dcSSimon Schubert #define EV_NONE 0 /* Invalid ELF version */ 4115796c8dcSSimon Schubert #define EV_CURRENT 1 /* Current version */ 4125796c8dcSSimon Schubert 413cf7f2e2dSJohn Marino /* Value for e_phnum. */ 414cf7f2e2dSJohn Marino #define PN_XNUM 0xffff /* Extended numbering */ 415cf7f2e2dSJohn Marino 4165796c8dcSSimon Schubert /* Values for program header, p_type field. */ 4175796c8dcSSimon Schubert 4185796c8dcSSimon Schubert #define PT_NULL 0 /* Program header table entry unused */ 4195796c8dcSSimon Schubert #define PT_LOAD 1 /* Loadable program segment */ 4205796c8dcSSimon Schubert #define PT_DYNAMIC 2 /* Dynamic linking information */ 4215796c8dcSSimon Schubert #define PT_INTERP 3 /* Program interpreter */ 4225796c8dcSSimon Schubert #define PT_NOTE 4 /* Auxiliary information */ 4235796c8dcSSimon Schubert #define PT_SHLIB 5 /* Reserved, unspecified semantics */ 4245796c8dcSSimon Schubert #define PT_PHDR 6 /* Entry for header table itself */ 4255796c8dcSSimon Schubert #define PT_TLS 7 /* Thread local storage segment */ 4265796c8dcSSimon Schubert #define PT_LOOS 0x60000000 /* OS-specific */ 4275796c8dcSSimon Schubert #define PT_HIOS 0x6fffffff /* OS-specific */ 4285796c8dcSSimon Schubert #define PT_LOPROC 0x70000000 /* Processor-specific */ 4295796c8dcSSimon Schubert #define PT_HIPROC 0x7FFFFFFF /* Processor-specific */ 4305796c8dcSSimon Schubert 4315796c8dcSSimon Schubert #define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) /* Frame unwind information */ 4325796c8dcSSimon Schubert #define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */ 4335796c8dcSSimon Schubert #define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */ 4345796c8dcSSimon Schubert #define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */ 4355796c8dcSSimon Schubert 4365796c8dcSSimon Schubert /* Program segment permissions, in program header p_flags field. */ 4375796c8dcSSimon Schubert 4385796c8dcSSimon Schubert #define PF_X (1 << 0) /* Segment is executable */ 4395796c8dcSSimon Schubert #define PF_W (1 << 1) /* Segment is writable */ 4405796c8dcSSimon Schubert #define PF_R (1 << 2) /* Segment is readable */ 4415796c8dcSSimon Schubert /* #define PF_MASKOS 0x0F000000 *//* OS-specific reserved bits */ 4425796c8dcSSimon Schubert #define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ 4435796c8dcSSimon Schubert #define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */ 4445796c8dcSSimon Schubert 4455796c8dcSSimon Schubert /* Values for section header, sh_type field. */ 4465796c8dcSSimon Schubert 4475796c8dcSSimon Schubert #define SHT_NULL 0 /* Section header table entry unused */ 4485796c8dcSSimon Schubert #define SHT_PROGBITS 1 /* Program specific (private) data */ 4495796c8dcSSimon Schubert #define SHT_SYMTAB 2 /* Link editing symbol table */ 4505796c8dcSSimon Schubert #define SHT_STRTAB 3 /* A string table */ 4515796c8dcSSimon Schubert #define SHT_RELA 4 /* Relocation entries with addends */ 4525796c8dcSSimon Schubert #define SHT_HASH 5 /* A symbol hash table */ 4535796c8dcSSimon Schubert #define SHT_DYNAMIC 6 /* Information for dynamic linking */ 4545796c8dcSSimon Schubert #define SHT_NOTE 7 /* Information that marks file */ 4555796c8dcSSimon Schubert #define SHT_NOBITS 8 /* Section occupies no space in file */ 4565796c8dcSSimon Schubert #define SHT_REL 9 /* Relocation entries, no addends */ 4575796c8dcSSimon Schubert #define SHT_SHLIB 10 /* Reserved, unspecified semantics */ 4585796c8dcSSimon Schubert #define SHT_DYNSYM 11 /* Dynamic linking symbol table */ 4595796c8dcSSimon Schubert 4605796c8dcSSimon Schubert #define SHT_INIT_ARRAY 14 /* Array of ptrs to init functions */ 4615796c8dcSSimon Schubert #define SHT_FINI_ARRAY 15 /* Array of ptrs to finish functions */ 4625796c8dcSSimon Schubert #define SHT_PREINIT_ARRAY 16 /* Array of ptrs to pre-init funcs */ 4635796c8dcSSimon Schubert #define SHT_GROUP 17 /* Section contains a section group */ 4645796c8dcSSimon Schubert #define SHT_SYMTAB_SHNDX 18 /* Indicies for SHN_XINDEX entries */ 4655796c8dcSSimon Schubert 4665796c8dcSSimon Schubert #define SHT_LOOS 0x60000000 /* First of OS specific semantics */ 4675796c8dcSSimon Schubert #define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ 4685796c8dcSSimon Schubert 4695796c8dcSSimon Schubert #define SHT_GNU_INCREMENTAL_INPUTS 0x6fff4700 /* incremental build data */ 4705796c8dcSSimon Schubert #define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes */ 4715796c8dcSSimon Schubert #define SHT_GNU_HASH 0x6ffffff6 /* GNU style symbol hash table */ 4725796c8dcSSimon Schubert #define SHT_GNU_LIBLIST 0x6ffffff7 /* List of prelink dependencies */ 4735796c8dcSSimon Schubert 4745796c8dcSSimon Schubert /* The next three section types are defined by Solaris, and are named 4755796c8dcSSimon Schubert SHT_SUNW*. We use them in GNU code, so we also define SHT_GNU* 4765796c8dcSSimon Schubert versions. */ 4775796c8dcSSimon Schubert #define SHT_SUNW_verdef 0x6ffffffd /* Versions defined by file */ 4785796c8dcSSimon Schubert #define SHT_SUNW_verneed 0x6ffffffe /* Versions needed by file */ 4795796c8dcSSimon Schubert #define SHT_SUNW_versym 0x6fffffff /* Symbol versions */ 4805796c8dcSSimon Schubert 4815796c8dcSSimon Schubert #define SHT_GNU_verdef SHT_SUNW_verdef 4825796c8dcSSimon Schubert #define SHT_GNU_verneed SHT_SUNW_verneed 4835796c8dcSSimon Schubert #define SHT_GNU_versym SHT_SUNW_versym 4845796c8dcSSimon Schubert 4855796c8dcSSimon Schubert #define SHT_LOPROC 0x70000000 /* Processor-specific semantics, lo */ 4865796c8dcSSimon Schubert #define SHT_HIPROC 0x7FFFFFFF /* Processor-specific semantics, hi */ 4875796c8dcSSimon Schubert #define SHT_LOUSER 0x80000000 /* Application-specific semantics */ 4885796c8dcSSimon Schubert /* #define SHT_HIUSER 0x8FFFFFFF *//* Application-specific semantics */ 4895796c8dcSSimon Schubert #define SHT_HIUSER 0xFFFFFFFF /* New value, defined in Oct 4, 1999 Draft */ 4905796c8dcSSimon Schubert 4915796c8dcSSimon Schubert /* Values for section header, sh_flags field. */ 4925796c8dcSSimon Schubert 4935796c8dcSSimon Schubert #define SHF_WRITE (1 << 0) /* Writable data during execution */ 4945796c8dcSSimon Schubert #define SHF_ALLOC (1 << 1) /* Occupies memory during execution */ 4955796c8dcSSimon Schubert #define SHF_EXECINSTR (1 << 2) /* Executable machine instructions */ 4965796c8dcSSimon Schubert #define SHF_MERGE (1 << 4) /* Data in this section can be merged */ 4975796c8dcSSimon Schubert #define SHF_STRINGS (1 << 5) /* Contains null terminated character strings */ 4985796c8dcSSimon Schubert #define SHF_INFO_LINK (1 << 6) /* sh_info holds section header table index */ 4995796c8dcSSimon Schubert #define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */ 5005796c8dcSSimon Schubert #define SHF_OS_NONCONFORMING (1 << 8) /* OS specific processing required */ 5015796c8dcSSimon Schubert #define SHF_GROUP (1 << 9) /* Member of a section group */ 5025796c8dcSSimon Schubert #define SHF_TLS (1 << 10) /* Thread local storage section */ 5035796c8dcSSimon Schubert 5045796c8dcSSimon Schubert /* #define SHF_MASKOS 0x0F000000 *//* OS-specific semantics */ 5055796c8dcSSimon Schubert #define SHF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ 5065796c8dcSSimon Schubert #define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */ 5075796c8dcSSimon Schubert 508cf7f2e2dSJohn Marino /* This used to be implemented as a processor specific section flag. 509cf7f2e2dSJohn Marino We just make it generic. */ 510cf7f2e2dSJohn Marino #define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude 511cf7f2e2dSJohn Marino this section from executable 512cf7f2e2dSJohn Marino and shared library that it 513cf7f2e2dSJohn Marino builds when those objects 514cf7f2e2dSJohn Marino are not to be further 515cf7f2e2dSJohn Marino relocated. */ 516cf7f2e2dSJohn Marino 5175796c8dcSSimon Schubert /* Values of note segment descriptor types for core files. */ 5185796c8dcSSimon Schubert 5195796c8dcSSimon Schubert #define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ 5205796c8dcSSimon Schubert #define NT_FPREGSET 2 /* Contains copy of fpregset struct */ 5215796c8dcSSimon Schubert #define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ 5225796c8dcSSimon Schubert #define NT_TASKSTRUCT 4 /* Contains copy of task struct */ 5235796c8dcSSimon Schubert #define NT_AUXV 6 /* Contains copy of Elfxx_auxv_t */ 5245796c8dcSSimon Schubert #define NT_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */ 5255796c8dcSSimon Schubert /* note name must be "LINUX". */ 5265796c8dcSSimon Schubert #define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ 5275796c8dcSSimon Schubert /* note name must be "LINUX". */ 5285796c8dcSSimon Schubert #define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ 5295796c8dcSSimon Schubert /* note name must be "LINUX". */ 530*ef5ccd6cSJohn Marino #define NT_386_TLS 0x200 /* x86 TLS information */ 531*ef5ccd6cSJohn Marino /* note name must be "LINUX". */ 532*ef5ccd6cSJohn Marino #define NT_386_IOPERM 0x201 /* x86 io permissions */ 533*ef5ccd6cSJohn Marino /* note name must be "LINUX". */ 534cf7f2e2dSJohn Marino #define NT_X86_XSTATE 0x202 /* x86 XSAVE extended state */ 535cf7f2e2dSJohn Marino /* note name must be "LINUX". */ 536cf7f2e2dSJohn Marino #define NT_S390_HIGH_GPRS 0x300 /* S/390 upper halves of GPRs */ 537cf7f2e2dSJohn Marino /* note name must be "LINUX". */ 538cf7f2e2dSJohn Marino #define NT_S390_TIMER 0x301 /* S390 timer */ 539cf7f2e2dSJohn Marino /* note name must be "LINUX". */ 540cf7f2e2dSJohn Marino #define NT_S390_TODCMP 0x302 /* S390 TOD clock comparator */ 541cf7f2e2dSJohn Marino /* note name must be "LINUX". */ 542cf7f2e2dSJohn Marino #define NT_S390_TODPREG 0x303 /* S390 TOD programmable register */ 543cf7f2e2dSJohn Marino /* note name must be "LINUX". */ 544cf7f2e2dSJohn Marino #define NT_S390_CTRS 0x304 /* S390 control registers */ 545cf7f2e2dSJohn Marino /* note name must be "LINUX". */ 546cf7f2e2dSJohn Marino #define NT_S390_PREFIX 0x305 /* S390 prefix register */ 547cf7f2e2dSJohn Marino /* note name must be "LINUX". */ 548a45ae5f8SJohn Marino #define NT_S390_LAST_BREAK 0x306 /* S390 breaking event address */ 549a45ae5f8SJohn Marino /* note name must be "LINUX". */ 550a45ae5f8SJohn Marino #define NT_S390_SYSTEM_CALL 0x307 /* S390 system call restart data */ 551a45ae5f8SJohn Marino /* note name must be "LINUX". */ 552*ef5ccd6cSJohn Marino #define NT_S390_TDB 0x308 /* S390 transaction diagnostic block */ 553a45ae5f8SJohn Marino /* note name must be "LINUX". */ 554*ef5ccd6cSJohn Marino #define NT_ARM_VFP 0x400 /* ARM VFP registers */ 555*ef5ccd6cSJohn Marino /* The following definitions should really use NT_AARCH_..., but defined 556*ef5ccd6cSJohn Marino this way for compatibility with Linux. */ 557*ef5ccd6cSJohn Marino #define NT_ARM_TLS 0x401 /* AArch TLS registers */ 558*ef5ccd6cSJohn Marino /* note name must be "LINUX". */ 559*ef5ccd6cSJohn Marino #define NT_ARM_HW_BREAK 0x402 /* AArch hardware breakpoint registers */ 560*ef5ccd6cSJohn Marino /* note name must be "LINUX". */ 561*ef5ccd6cSJohn Marino #define NT_ARM_HW_WATCH 0x403 /* AArch hardware watchpoint registers */ 562*ef5ccd6cSJohn Marino /* note name must be "LINUX". */ 563*ef5ccd6cSJohn Marino #define NT_SIGINFO 0x53494749 /* Fields of siginfo_t. */ 564*ef5ccd6cSJohn Marino #define NT_FILE 0x46494c45 /* Description of mapped files. */ 5655796c8dcSSimon Schubert 5665796c8dcSSimon Schubert /* Note segments for core files on dir-style procfs systems. */ 5675796c8dcSSimon Schubert 5685796c8dcSSimon Schubert #define NT_PSTATUS 10 /* Has a struct pstatus */ 5695796c8dcSSimon Schubert #define NT_FPREGS 12 /* Has a struct fpregset */ 5705796c8dcSSimon Schubert #define NT_PSINFO 13 /* Has a struct psinfo */ 5715796c8dcSSimon Schubert #define NT_LWPSTATUS 16 /* Has a struct lwpstatus_t */ 5725796c8dcSSimon Schubert #define NT_LWPSINFO 17 /* Has a struct lwpsinfo_t */ 5735796c8dcSSimon Schubert #define NT_WIN32PSTATUS 18 /* Has a struct win32_pstatus */ 5745796c8dcSSimon Schubert 575a45ae5f8SJohn Marino /* Note segment for SystemTap probes. */ 576a45ae5f8SJohn Marino #define NT_STAPSDT 3 5775796c8dcSSimon Schubert 5785796c8dcSSimon Schubert /* Note segments for core files on NetBSD systems. Note name 5795796c8dcSSimon Schubert must start with "NetBSD-CORE". */ 5805796c8dcSSimon Schubert 5815796c8dcSSimon Schubert #define NT_NETBSDCORE_PROCINFO 1 /* Has a struct procinfo */ 5825796c8dcSSimon Schubert #define NT_NETBSDCORE_FIRSTMACH 32 /* start of machdep note types */ 5835796c8dcSSimon Schubert 5845796c8dcSSimon Schubert 5855796c8dcSSimon Schubert /* Note segments for core files on OpenBSD systems. Note name is 5865796c8dcSSimon Schubert "OpenBSD". */ 5875796c8dcSSimon Schubert 5885796c8dcSSimon Schubert #define NT_OPENBSD_PROCINFO 10 5895796c8dcSSimon Schubert #define NT_OPENBSD_AUXV 11 5905796c8dcSSimon Schubert #define NT_OPENBSD_REGS 20 5915796c8dcSSimon Schubert #define NT_OPENBSD_FPREGS 21 5925796c8dcSSimon Schubert #define NT_OPENBSD_XFPREGS 22 5935796c8dcSSimon Schubert #define NT_OPENBSD_WCOOKIE 23 5945796c8dcSSimon Schubert 5955796c8dcSSimon Schubert 5965796c8dcSSimon Schubert /* Note segments for core files on SPU systems. Note name 5975796c8dcSSimon Schubert must start with "SPU/". */ 5985796c8dcSSimon Schubert 5995796c8dcSSimon Schubert #define NT_SPU 1 6005796c8dcSSimon Schubert 6015796c8dcSSimon Schubert /* Values of note segment descriptor types for object files. */ 6025796c8dcSSimon Schubert 6035796c8dcSSimon Schubert #define NT_VERSION 1 /* Contains a version string. */ 6045796c8dcSSimon Schubert #define NT_ARCH 2 /* Contains an architecture string. */ 6055796c8dcSSimon Schubert 6065796c8dcSSimon Schubert /* Values for notes in non-core files using name "GNU". */ 6075796c8dcSSimon Schubert 6085796c8dcSSimon Schubert #define NT_GNU_ABI_TAG 1 6095796c8dcSSimon Schubert #define NT_GNU_HWCAP 2 /* Used by ld.so and kernel vDSO. */ 6105796c8dcSSimon Schubert #define NT_GNU_BUILD_ID 3 /* Generated by ld --build-id. */ 6115796c8dcSSimon Schubert #define NT_GNU_GOLD_VERSION 4 /* Generated by gold. */ 6125796c8dcSSimon Schubert 6135796c8dcSSimon Schubert /* Values used in GNU .note.ABI-tag notes (NT_GNU_ABI_TAG). */ 6145796c8dcSSimon Schubert #define GNU_ABI_TAG_LINUX 0 6155796c8dcSSimon Schubert #define GNU_ABI_TAG_HURD 1 6165796c8dcSSimon Schubert #define GNU_ABI_TAG_SOLARIS 2 6175796c8dcSSimon Schubert #define GNU_ABI_TAG_FREEBSD 3 6185796c8dcSSimon Schubert #define GNU_ABI_TAG_NETBSD 4 6195796c8dcSSimon Schubert 6205796c8dcSSimon Schubert /* Values for NetBSD .note.netbsd.ident notes. Note name is "NetBSD". */ 6215796c8dcSSimon Schubert 6225796c8dcSSimon Schubert #define NT_NETBSD_IDENT 1 6235796c8dcSSimon Schubert 6245796c8dcSSimon Schubert /* Values for OpenBSD .note.openbsd.ident notes. Note name is "OpenBSD". */ 6255796c8dcSSimon Schubert 6265796c8dcSSimon Schubert #define NT_OPENBSD_IDENT 1 6275796c8dcSSimon Schubert 6285796c8dcSSimon Schubert /* Values for FreeBSD .note.ABI-tag notes. Note name is "FreeBSD". */ 6295796c8dcSSimon Schubert 6305796c8dcSSimon Schubert #define NT_FREEBSD_ABI_TAG 1 6315796c8dcSSimon Schubert 63269e0f06dSSimon Schubert /* Values for DragonFly .note.ABI-tag notes. Note name is "DragonFly". */ 63369e0f06dSSimon Schubert 63469e0f06dSSimon Schubert #define NT_DRAGONFLY_ABI_TAG 1 63569e0f06dSSimon Schubert 6365796c8dcSSimon Schubert /* These three macros disassemble and assemble a symbol table st_info field, 6375796c8dcSSimon Schubert which contains the symbol binding and symbol type. The STB_ and STT_ 6385796c8dcSSimon Schubert defines identify the binding and type. */ 6395796c8dcSSimon Schubert 6405796c8dcSSimon Schubert #define ELF_ST_BIND(val) (((unsigned int)(val)) >> 4) 6415796c8dcSSimon Schubert #define ELF_ST_TYPE(val) ((val) & 0xF) 6425796c8dcSSimon Schubert #define ELF_ST_INFO(bind,type) (((bind) << 4) + ((type) & 0xF)) 6435796c8dcSSimon Schubert 6445796c8dcSSimon Schubert /* The 64bit and 32bit versions of these macros are identical, but 6455796c8dcSSimon Schubert the ELF spec defines them, so here they are. */ 6465796c8dcSSimon Schubert #define ELF32_ST_BIND ELF_ST_BIND 6475796c8dcSSimon Schubert #define ELF32_ST_TYPE ELF_ST_TYPE 6485796c8dcSSimon Schubert #define ELF32_ST_INFO ELF_ST_INFO 6495796c8dcSSimon Schubert #define ELF64_ST_BIND ELF_ST_BIND 6505796c8dcSSimon Schubert #define ELF64_ST_TYPE ELF_ST_TYPE 6515796c8dcSSimon Schubert #define ELF64_ST_INFO ELF_ST_INFO 6525796c8dcSSimon Schubert 6535796c8dcSSimon Schubert /* This macro disassembles and assembles a symbol's visibility into 6545796c8dcSSimon Schubert the st_other field. The STV_ defines specify the actual visibility. */ 6555796c8dcSSimon Schubert 6565796c8dcSSimon Schubert #define ELF_ST_VISIBILITY(v) ((v) & 0x3) 6575796c8dcSSimon Schubert /* The remaining bits in the st_other field are not currently used. 6585796c8dcSSimon Schubert They should be set to zero. */ 6595796c8dcSSimon Schubert 6605796c8dcSSimon Schubert #define ELF32_ST_VISIBILITY ELF_ST_VISIBILITY 6615796c8dcSSimon Schubert #define ELF64_ST_VISIBILITY ELF_ST_VISIBILITY 6625796c8dcSSimon Schubert 6635796c8dcSSimon Schubert 6645796c8dcSSimon Schubert #define STN_UNDEF 0 /* Undefined symbol index */ 6655796c8dcSSimon Schubert 6665796c8dcSSimon Schubert #define STB_LOCAL 0 /* Symbol not visible outside obj */ 6675796c8dcSSimon Schubert #define STB_GLOBAL 1 /* Symbol visible outside obj */ 6685796c8dcSSimon Schubert #define STB_WEAK 2 /* Like globals, lower precedence */ 6695796c8dcSSimon Schubert #define STB_LOOS 10 /* OS-specific semantics */ 6705796c8dcSSimon Schubert #define STB_GNU_UNIQUE 10 /* Symbol is unique in namespace */ 6715796c8dcSSimon Schubert #define STB_HIOS 12 /* OS-specific semantics */ 6725796c8dcSSimon Schubert #define STB_LOPROC 13 /* Processor-specific semantics */ 6735796c8dcSSimon Schubert #define STB_HIPROC 15 /* Processor-specific semantics */ 6745796c8dcSSimon Schubert 6755796c8dcSSimon Schubert #define STT_NOTYPE 0 /* Symbol type is unspecified */ 6765796c8dcSSimon Schubert #define STT_OBJECT 1 /* Symbol is a data object */ 6775796c8dcSSimon Schubert #define STT_FUNC 2 /* Symbol is a code object */ 6785796c8dcSSimon Schubert #define STT_SECTION 3 /* Symbol associated with a section */ 6795796c8dcSSimon Schubert #define STT_FILE 4 /* Symbol gives a file name */ 6805796c8dcSSimon Schubert #define STT_COMMON 5 /* An uninitialised common block */ 6815796c8dcSSimon Schubert #define STT_TLS 6 /* Thread local data object */ 6825796c8dcSSimon Schubert #define STT_RELC 8 /* Complex relocation expression */ 6835796c8dcSSimon Schubert #define STT_SRELC 9 /* Signed Complex relocation expression */ 6845796c8dcSSimon Schubert #define STT_LOOS 10 /* OS-specific semantics */ 6855796c8dcSSimon Schubert #define STT_GNU_IFUNC 10 /* Symbol is an indirect code object */ 6865796c8dcSSimon Schubert #define STT_HIOS 12 /* OS-specific semantics */ 6875796c8dcSSimon Schubert #define STT_LOPROC 13 /* Processor-specific semantics */ 6885796c8dcSSimon Schubert #define STT_HIPROC 15 /* Processor-specific semantics */ 6895796c8dcSSimon Schubert 6905796c8dcSSimon Schubert /* The following constants control how a symbol may be accessed once it has 6915796c8dcSSimon Schubert become part of an executable or shared library. */ 6925796c8dcSSimon Schubert 6935796c8dcSSimon Schubert #define STV_DEFAULT 0 /* Visibility is specified by binding type */ 6945796c8dcSSimon Schubert #define STV_INTERNAL 1 /* OS specific version of STV_HIDDEN */ 6955796c8dcSSimon Schubert #define STV_HIDDEN 2 /* Can only be seen inside currect component */ 6965796c8dcSSimon Schubert #define STV_PROTECTED 3 /* Treat as STB_LOCAL inside current component */ 6975796c8dcSSimon Schubert 6985796c8dcSSimon Schubert /* Relocation info handling macros. */ 6995796c8dcSSimon Schubert 7005796c8dcSSimon Schubert #define ELF32_R_SYM(i) ((i) >> 8) 7015796c8dcSSimon Schubert #define ELF32_R_TYPE(i) ((i) & 0xff) 7025796c8dcSSimon Schubert #define ELF32_R_INFO(s,t) (((s) << 8) + ((t) & 0xff)) 7035796c8dcSSimon Schubert 7045796c8dcSSimon Schubert #define ELF64_R_SYM(i) ((i) >> 32) 7055796c8dcSSimon Schubert #define ELF64_R_TYPE(i) ((i) & 0xffffffff) 7065796c8dcSSimon Schubert #define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 31 << 1) + (bfd_vma) (t)) 7075796c8dcSSimon Schubert 7085796c8dcSSimon Schubert /* Dynamic section tags. */ 7095796c8dcSSimon Schubert 7105796c8dcSSimon Schubert #define DT_NULL 0 7115796c8dcSSimon Schubert #define DT_NEEDED 1 7125796c8dcSSimon Schubert #define DT_PLTRELSZ 2 7135796c8dcSSimon Schubert #define DT_PLTGOT 3 7145796c8dcSSimon Schubert #define DT_HASH 4 7155796c8dcSSimon Schubert #define DT_STRTAB 5 7165796c8dcSSimon Schubert #define DT_SYMTAB 6 7175796c8dcSSimon Schubert #define DT_RELA 7 7185796c8dcSSimon Schubert #define DT_RELASZ 8 7195796c8dcSSimon Schubert #define DT_RELAENT 9 7205796c8dcSSimon Schubert #define DT_STRSZ 10 7215796c8dcSSimon Schubert #define DT_SYMENT 11 7225796c8dcSSimon Schubert #define DT_INIT 12 7235796c8dcSSimon Schubert #define DT_FINI 13 7245796c8dcSSimon Schubert #define DT_SONAME 14 7255796c8dcSSimon Schubert #define DT_RPATH 15 7265796c8dcSSimon Schubert #define DT_SYMBOLIC 16 7275796c8dcSSimon Schubert #define DT_REL 17 7285796c8dcSSimon Schubert #define DT_RELSZ 18 7295796c8dcSSimon Schubert #define DT_RELENT 19 7305796c8dcSSimon Schubert #define DT_PLTREL 20 7315796c8dcSSimon Schubert #define DT_DEBUG 21 7325796c8dcSSimon Schubert #define DT_TEXTREL 22 7335796c8dcSSimon Schubert #define DT_JMPREL 23 7345796c8dcSSimon Schubert #define DT_BIND_NOW 24 7355796c8dcSSimon Schubert #define DT_INIT_ARRAY 25 7365796c8dcSSimon Schubert #define DT_FINI_ARRAY 26 7375796c8dcSSimon Schubert #define DT_INIT_ARRAYSZ 27 7385796c8dcSSimon Schubert #define DT_FINI_ARRAYSZ 28 7395796c8dcSSimon Schubert #define DT_RUNPATH 29 7405796c8dcSSimon Schubert #define DT_FLAGS 30 7415796c8dcSSimon Schubert #define DT_ENCODING 32 7425796c8dcSSimon Schubert #define DT_PREINIT_ARRAY 32 7435796c8dcSSimon Schubert #define DT_PREINIT_ARRAYSZ 33 7445796c8dcSSimon Schubert 7455796c8dcSSimon Schubert /* Note, the Oct 4, 1999 draft of the ELF ABI changed the values 7465796c8dcSSimon Schubert for DT_LOOS and DT_HIOS. Some implementations however, use 7475796c8dcSSimon Schubert values outside of the new range (see below). */ 7485796c8dcSSimon Schubert #define OLD_DT_LOOS 0x60000000 7495796c8dcSSimon Schubert #define DT_LOOS 0x6000000d 7505796c8dcSSimon Schubert #define DT_HIOS 0x6ffff000 7515796c8dcSSimon Schubert #define OLD_DT_HIOS 0x6fffffff 7525796c8dcSSimon Schubert 7535796c8dcSSimon Schubert #define DT_LOPROC 0x70000000 7545796c8dcSSimon Schubert #define DT_HIPROC 0x7fffffff 7555796c8dcSSimon Schubert 7565796c8dcSSimon Schubert /* The next 2 dynamic tag ranges, integer value range (DT_VALRNGLO to 7575796c8dcSSimon Schubert DT_VALRNGHI) and virtual address range (DT_ADDRRNGLO to DT_ADDRRNGHI), 7585796c8dcSSimon Schubert are used on Solaris. We support them everywhere. Note these values 7595796c8dcSSimon Schubert lie outside of the (new) range for OS specific values. This is a 7605796c8dcSSimon Schubert deliberate special case and we maintain it for backwards compatability. 7615796c8dcSSimon Schubert */ 7625796c8dcSSimon Schubert #define DT_VALRNGLO 0x6ffffd00 7635796c8dcSSimon Schubert #define DT_GNU_PRELINKED 0x6ffffdf5 7645796c8dcSSimon Schubert #define DT_GNU_CONFLICTSZ 0x6ffffdf6 7655796c8dcSSimon Schubert #define DT_GNU_LIBLISTSZ 0x6ffffdf7 7665796c8dcSSimon Schubert #define DT_CHECKSUM 0x6ffffdf8 7675796c8dcSSimon Schubert #define DT_PLTPADSZ 0x6ffffdf9 7685796c8dcSSimon Schubert #define DT_MOVEENT 0x6ffffdfa 7695796c8dcSSimon Schubert #define DT_MOVESZ 0x6ffffdfb 7705796c8dcSSimon Schubert #define DT_FEATURE 0x6ffffdfc 7715796c8dcSSimon Schubert #define DT_POSFLAG_1 0x6ffffdfd 7725796c8dcSSimon Schubert #define DT_SYMINSZ 0x6ffffdfe 7735796c8dcSSimon Schubert #define DT_SYMINENT 0x6ffffdff 7745796c8dcSSimon Schubert #define DT_VALRNGHI 0x6ffffdff 7755796c8dcSSimon Schubert 7765796c8dcSSimon Schubert #define DT_ADDRRNGLO 0x6ffffe00 7775796c8dcSSimon Schubert #define DT_GNU_HASH 0x6ffffef5 7785796c8dcSSimon Schubert #define DT_TLSDESC_PLT 0x6ffffef6 7795796c8dcSSimon Schubert #define DT_TLSDESC_GOT 0x6ffffef7 7805796c8dcSSimon Schubert #define DT_GNU_CONFLICT 0x6ffffef8 7815796c8dcSSimon Schubert #define DT_GNU_LIBLIST 0x6ffffef9 7825796c8dcSSimon Schubert #define DT_CONFIG 0x6ffffefa 7835796c8dcSSimon Schubert #define DT_DEPAUDIT 0x6ffffefb 7845796c8dcSSimon Schubert #define DT_AUDIT 0x6ffffefc 7855796c8dcSSimon Schubert #define DT_PLTPAD 0x6ffffefd 7865796c8dcSSimon Schubert #define DT_MOVETAB 0x6ffffefe 7875796c8dcSSimon Schubert #define DT_SYMINFO 0x6ffffeff 7885796c8dcSSimon Schubert #define DT_ADDRRNGHI 0x6ffffeff 7895796c8dcSSimon Schubert 7905796c8dcSSimon Schubert #define DT_RELACOUNT 0x6ffffff9 7915796c8dcSSimon Schubert #define DT_RELCOUNT 0x6ffffffa 7925796c8dcSSimon Schubert #define DT_FLAGS_1 0x6ffffffb 7935796c8dcSSimon Schubert #define DT_VERDEF 0x6ffffffc 7945796c8dcSSimon Schubert #define DT_VERDEFNUM 0x6ffffffd 7955796c8dcSSimon Schubert #define DT_VERNEED 0x6ffffffe 7965796c8dcSSimon Schubert #define DT_VERNEEDNUM 0x6fffffff 7975796c8dcSSimon Schubert 7985796c8dcSSimon Schubert /* This tag is a GNU extension to the Solaris version scheme. */ 7995796c8dcSSimon Schubert #define DT_VERSYM 0x6ffffff0 8005796c8dcSSimon Schubert 8015796c8dcSSimon Schubert #define DT_LOPROC 0x70000000 8025796c8dcSSimon Schubert #define DT_HIPROC 0x7fffffff 8035796c8dcSSimon Schubert 8045796c8dcSSimon Schubert /* These section tags are used on Solaris. We support them 8055796c8dcSSimon Schubert everywhere, and hope they do not conflict. */ 8065796c8dcSSimon Schubert 8075796c8dcSSimon Schubert #define DT_AUXILIARY 0x7ffffffd 8085796c8dcSSimon Schubert #define DT_USED 0x7ffffffe 8095796c8dcSSimon Schubert #define DT_FILTER 0x7fffffff 8105796c8dcSSimon Schubert 8115796c8dcSSimon Schubert 8125796c8dcSSimon Schubert /* Values used in DT_FEATURE .dynamic entry. */ 8135796c8dcSSimon Schubert #define DTF_1_PARINIT 0x00000001 8145796c8dcSSimon Schubert /* From 8155796c8dcSSimon Schubert 8165796c8dcSSimon Schubert http://docs.sun.com:80/ab2/coll.45.13/LLM/@Ab2PageView/21165?Ab2Lang=C&Ab2Enc=iso-8859-1 8175796c8dcSSimon Schubert 8185796c8dcSSimon Schubert DTF_1_CONFEXP is the same as DTF_1_PARINIT. It is a typo. The value 8195796c8dcSSimon Schubert defined here is the same as the one in <sys/link.h> on Solaris 8. */ 8205796c8dcSSimon Schubert #define DTF_1_CONFEXP 0x00000002 8215796c8dcSSimon Schubert 8225796c8dcSSimon Schubert /* Flag values used in the DT_POSFLAG_1 .dynamic entry. */ 8235796c8dcSSimon Schubert #define DF_P1_LAZYLOAD 0x00000001 8245796c8dcSSimon Schubert #define DF_P1_GROUPPERM 0x00000002 8255796c8dcSSimon Schubert 8265796c8dcSSimon Schubert /* Flag value in in the DT_FLAGS_1 .dynamic entry. */ 8275796c8dcSSimon Schubert #define DF_1_NOW 0x00000001 8285796c8dcSSimon Schubert #define DF_1_GLOBAL 0x00000002 8295796c8dcSSimon Schubert #define DF_1_GROUP 0x00000004 8305796c8dcSSimon Schubert #define DF_1_NODELETE 0x00000008 8315796c8dcSSimon Schubert #define DF_1_LOADFLTR 0x00000010 8325796c8dcSSimon Schubert #define DF_1_INITFIRST 0x00000020 8335796c8dcSSimon Schubert #define DF_1_NOOPEN 0x00000040 8345796c8dcSSimon Schubert #define DF_1_ORIGIN 0x00000080 8355796c8dcSSimon Schubert #define DF_1_DIRECT 0x00000100 8365796c8dcSSimon Schubert #define DF_1_TRANS 0x00000200 8375796c8dcSSimon Schubert #define DF_1_INTERPOSE 0x00000400 8385796c8dcSSimon Schubert #define DF_1_NODEFLIB 0x00000800 8395796c8dcSSimon Schubert #define DF_1_NODUMP 0x00001000 840*ef5ccd6cSJohn Marino #define DF_1_CONFALT 0x00002000 841*ef5ccd6cSJohn Marino #define DF_1_ENDFILTEE 0x00004000 842*ef5ccd6cSJohn Marino #define DF_1_DISPRELDNE 0x00008000 843*ef5ccd6cSJohn Marino #define DF_1_DISPRELPND 0x00010000 844*ef5ccd6cSJohn Marino #define DF_1_NODIRECT 0x00020000 845*ef5ccd6cSJohn Marino #define DF_1_IGNMULDEF 0x00040000 846*ef5ccd6cSJohn Marino #define DF_1_NOKSYMS 0x00080000 847*ef5ccd6cSJohn Marino #define DF_1_NOHDR 0x00100000 848*ef5ccd6cSJohn Marino #define DF_1_EDITED 0x00200000 849*ef5ccd6cSJohn Marino #define DF_1_NORELOC 0x00400000 850*ef5ccd6cSJohn Marino #define DF_1_SYMINTPOSE 0x00800000 851*ef5ccd6cSJohn Marino #define DF_1_GLOBAUDIT 0x01000000 852*ef5ccd6cSJohn Marino #define DF_1_SINGLETON 0x02000000 8535796c8dcSSimon Schubert 8545796c8dcSSimon Schubert /* Flag values for the DT_FLAGS entry. */ 8555796c8dcSSimon Schubert #define DF_ORIGIN (1 << 0) 8565796c8dcSSimon Schubert #define DF_SYMBOLIC (1 << 1) 8575796c8dcSSimon Schubert #define DF_TEXTREL (1 << 2) 8585796c8dcSSimon Schubert #define DF_BIND_NOW (1 << 3) 8595796c8dcSSimon Schubert #define DF_STATIC_TLS (1 << 4) 8605796c8dcSSimon Schubert 8615796c8dcSSimon Schubert /* These constants are used for the version number of a Elf32_Verdef 8625796c8dcSSimon Schubert structure. */ 8635796c8dcSSimon Schubert 8645796c8dcSSimon Schubert #define VER_DEF_NONE 0 8655796c8dcSSimon Schubert #define VER_DEF_CURRENT 1 8665796c8dcSSimon Schubert 8675796c8dcSSimon Schubert /* These constants appear in the vd_flags field of a Elf32_Verdef 868cf7f2e2dSJohn Marino structure. 869cf7f2e2dSJohn Marino 870cf7f2e2dSJohn Marino Cf. the Solaris Linker and Libraries Guide, Ch. 7, Object File Format, 871cf7f2e2dSJohn Marino Versioning Sections, for a description: 872cf7f2e2dSJohn Marino 873cf7f2e2dSJohn Marino http://docs.sun.com/app/docs/doc/819-0690/chapter6-93046?l=en&a=view */ 8745796c8dcSSimon Schubert 8755796c8dcSSimon Schubert #define VER_FLG_BASE 0x1 8765796c8dcSSimon Schubert #define VER_FLG_WEAK 0x2 877cf7f2e2dSJohn Marino #define VER_FLG_INFO 0x4 8785796c8dcSSimon Schubert 8795796c8dcSSimon Schubert /* These special constants can be found in an Elf32_Versym field. */ 8805796c8dcSSimon Schubert 8815796c8dcSSimon Schubert #define VER_NDX_LOCAL 0 8825796c8dcSSimon Schubert #define VER_NDX_GLOBAL 1 8835796c8dcSSimon Schubert 8845796c8dcSSimon Schubert /* These constants are used for the version number of a Elf32_Verneed 8855796c8dcSSimon Schubert structure. */ 8865796c8dcSSimon Schubert 8875796c8dcSSimon Schubert #define VER_NEED_NONE 0 8885796c8dcSSimon Schubert #define VER_NEED_CURRENT 1 8895796c8dcSSimon Schubert 8905796c8dcSSimon Schubert /* This flag appears in a Versym structure. It means that the symbol 8915796c8dcSSimon Schubert is hidden, and is only visible with an explicit version number. 8925796c8dcSSimon Schubert This is a GNU extension. */ 8935796c8dcSSimon Schubert 8945796c8dcSSimon Schubert #define VERSYM_HIDDEN 0x8000 8955796c8dcSSimon Schubert 8965796c8dcSSimon Schubert /* This is the mask for the rest of the Versym information. */ 8975796c8dcSSimon Schubert 8985796c8dcSSimon Schubert #define VERSYM_VERSION 0x7fff 8995796c8dcSSimon Schubert 9005796c8dcSSimon Schubert /* This is a special token which appears as part of a symbol name. It 9015796c8dcSSimon Schubert indictes that the rest of the name is actually the name of a 9025796c8dcSSimon Schubert version node, and is not part of the actual name. This is a GNU 9035796c8dcSSimon Schubert extension. For example, the symbol name `stat@ver2' is taken to 9045796c8dcSSimon Schubert mean the symbol `stat' in version `ver2'. */ 9055796c8dcSSimon Schubert 9065796c8dcSSimon Schubert #define ELF_VER_CHR '@' 9075796c8dcSSimon Schubert 9085796c8dcSSimon Schubert /* Possible values for si_boundto. */ 9095796c8dcSSimon Schubert 9105796c8dcSSimon Schubert #define SYMINFO_BT_SELF 0xffff /* Symbol bound to self */ 9115796c8dcSSimon Schubert #define SYMINFO_BT_PARENT 0xfffe /* Symbol bound to parent */ 9125796c8dcSSimon Schubert #define SYMINFO_BT_LOWRESERVE 0xff00 /* Beginning of reserved entries */ 9135796c8dcSSimon Schubert 9145796c8dcSSimon Schubert /* Possible bitmasks for si_flags. */ 9155796c8dcSSimon Schubert 9165796c8dcSSimon Schubert #define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */ 9175796c8dcSSimon Schubert #define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */ 9185796c8dcSSimon Schubert #define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */ 9195796c8dcSSimon Schubert #define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy loaded */ 9205796c8dcSSimon Schubert 9215796c8dcSSimon Schubert /* Syminfo version values. */ 9225796c8dcSSimon Schubert 9235796c8dcSSimon Schubert #define SYMINFO_NONE 0 9245796c8dcSSimon Schubert #define SYMINFO_CURRENT 1 9255796c8dcSSimon Schubert #define SYMINFO_NUM 2 9265796c8dcSSimon Schubert 9275796c8dcSSimon Schubert /* Section Group Flags. */ 9285796c8dcSSimon Schubert 9295796c8dcSSimon Schubert #define GRP_COMDAT 0x1 /* A COMDAT group */ 9305796c8dcSSimon Schubert 9315796c8dcSSimon Schubert /* Auxv a_type values. */ 9325796c8dcSSimon Schubert 9335796c8dcSSimon Schubert #define AT_NULL 0 /* End of vector */ 9345796c8dcSSimon Schubert #define AT_IGNORE 1 /* Entry should be ignored */ 9355796c8dcSSimon Schubert #define AT_EXECFD 2 /* File descriptor of program */ 9365796c8dcSSimon Schubert #define AT_PHDR 3 /* Program headers for program */ 9375796c8dcSSimon Schubert #define AT_PHENT 4 /* Size of program header entry */ 9385796c8dcSSimon Schubert #define AT_PHNUM 5 /* Number of program headers */ 9395796c8dcSSimon Schubert #define AT_PAGESZ 6 /* System page size */ 9405796c8dcSSimon Schubert #define AT_BASE 7 /* Base address of interpreter */ 9415796c8dcSSimon Schubert #define AT_FLAGS 8 /* Flags */ 9425796c8dcSSimon Schubert #define AT_ENTRY 9 /* Entry point of program */ 9435796c8dcSSimon Schubert #define AT_NOTELF 10 /* Program is not ELF */ 9445796c8dcSSimon Schubert #define AT_UID 11 /* Real uid */ 9455796c8dcSSimon Schubert #define AT_EUID 12 /* Effective uid */ 9465796c8dcSSimon Schubert #define AT_GID 13 /* Real gid */ 9475796c8dcSSimon Schubert #define AT_EGID 14 /* Effective gid */ 9485796c8dcSSimon Schubert #define AT_CLKTCK 17 /* Frequency of times() */ 9495796c8dcSSimon Schubert #define AT_PLATFORM 15 /* String identifying platform. */ 9505796c8dcSSimon Schubert #define AT_HWCAP 16 /* Machine dependent hints about 9515796c8dcSSimon Schubert processor capabilities. */ 9525796c8dcSSimon Schubert #define AT_FPUCW 18 /* Used FPU control word. */ 9535796c8dcSSimon Schubert #define AT_DCACHEBSIZE 19 /* Data cache block size. */ 9545796c8dcSSimon Schubert #define AT_ICACHEBSIZE 20 /* Instruction cache block size. */ 9555796c8dcSSimon Schubert #define AT_UCACHEBSIZE 21 /* Unified cache block size. */ 9565796c8dcSSimon Schubert #define AT_IGNOREPPC 22 /* Entry should be ignored */ 9575796c8dcSSimon Schubert #define AT_SECURE 23 /* Boolean, was exec setuid-like? */ 9585796c8dcSSimon Schubert #define AT_BASE_PLATFORM 24 /* String identifying real platform, 9595796c8dcSSimon Schubert may differ from AT_PLATFORM. */ 9605796c8dcSSimon Schubert #define AT_RANDOM 25 /* Address of 16 random bytes. */ 9615796c8dcSSimon Schubert #define AT_EXECFN 31 /* Filename of executable. */ 9625796c8dcSSimon Schubert /* Pointer to the global system page used for system calls and other 9635796c8dcSSimon Schubert nice things. */ 9645796c8dcSSimon Schubert #define AT_SYSINFO 32 9655796c8dcSSimon Schubert #define AT_SYSINFO_EHDR 33 /* Pointer to ELF header of system-supplied DSO. */ 9665796c8dcSSimon Schubert 967*ef5ccd6cSJohn Marino /* More complete cache descriptions than AT_[DIU]CACHEBSIZE. If the 968*ef5ccd6cSJohn Marino value is -1, then the cache doesn't exist. Otherwise: 969*ef5ccd6cSJohn Marino 970*ef5ccd6cSJohn Marino bit 0-3: Cache set-associativity; 0 means fully associative. 971*ef5ccd6cSJohn Marino bit 4-7: Log2 of cacheline size. 972*ef5ccd6cSJohn Marino bit 8-31: Size of the entire cache >> 8. */ 973*ef5ccd6cSJohn Marino 974*ef5ccd6cSJohn Marino #define AT_L1I_CACHESHAPE 34 975*ef5ccd6cSJohn Marino #define AT_L1D_CACHESHAPE 35 976*ef5ccd6cSJohn Marino #define AT_L2_CACHESHAPE 36 977*ef5ccd6cSJohn Marino #define AT_L3_CACHESHAPE 37 978*ef5ccd6cSJohn Marino 9795796c8dcSSimon Schubert #define AT_SUN_UID 2000 /* Effective user ID. */ 9805796c8dcSSimon Schubert #define AT_SUN_RUID 2001 /* Real user ID. */ 9815796c8dcSSimon Schubert #define AT_SUN_GID 2002 /* Effective group ID. */ 9825796c8dcSSimon Schubert #define AT_SUN_RGID 2003 /* Real group ID. */ 9835796c8dcSSimon Schubert #define AT_SUN_LDELF 2004 /* Dynamic linker's ELF header. */ 9845796c8dcSSimon Schubert #define AT_SUN_LDSHDR 2005 /* Dynamic linker's section headers. */ 9855796c8dcSSimon Schubert #define AT_SUN_LDNAME 2006 /* String giving name of dynamic linker. */ 9865796c8dcSSimon Schubert #define AT_SUN_LPAGESZ 2007 /* Large pagesize. */ 9875796c8dcSSimon Schubert #define AT_SUN_PLATFORM 2008 /* Platform name string. */ 9885796c8dcSSimon Schubert #define AT_SUN_HWCAP 2009 /* Machine dependent hints about 9895796c8dcSSimon Schubert processor capabilities. */ 9905796c8dcSSimon Schubert #define AT_SUN_IFLUSH 2010 /* Should flush icache? */ 9915796c8dcSSimon Schubert #define AT_SUN_CPU 2011 /* CPU name string. */ 9925796c8dcSSimon Schubert #define AT_SUN_EMUL_ENTRY 2012 /* COFF entry point address. */ 9935796c8dcSSimon Schubert #define AT_SUN_EMUL_EXECFD 2013 /* COFF executable file descriptor. */ 9945796c8dcSSimon Schubert #define AT_SUN_EXECNAME 2014 /* Canonicalized file name given to execve. */ 9955796c8dcSSimon Schubert #define AT_SUN_MMU 2015 /* String for name of MMU module. */ 9965796c8dcSSimon Schubert #define AT_SUN_LDDATA 2016 /* Dynamic linker's data segment address. */ 9975796c8dcSSimon Schubert #define AT_SUN_AUXFLAGS 2017 /* AF_SUN_ flags passed from the kernel. */ 9985796c8dcSSimon Schubert 9995796c8dcSSimon Schubert 10005796c8dcSSimon Schubert #endif /* _ELF_COMMON_H */ 1001