00001 /* This file defines standard ELF types, structures, and macros.
00002 Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
00003 This file is part of the GNU C Library.
00004
00005 The GNU C Library is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU Lesser General Public
00007 License as published by the Free Software Foundation; either
00008 version 2.1 of the License, or (at your option) any later version.
00009
00010 The GNU C Library is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00013 Lesser General Public License for more details.
00014
00015 You should have received a copy of the GNU Lesser General Public
00016 License along with the GNU C Library; if not, write to the Free
00017 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018 02111-1307 USA. */
00019
00020 #ifndef _ELF_H
00021 #define _ELF_H 1
00022
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026
00027 #include <stdint.h>
00028
00029
00030
00031
00032
00033 /* Standard ELF types. */
00034
00035 /* Type for a 16-bit quantity. */
00036 typedef uint16_t Elf32_Half;
00037 typedef uint16_t Elf64_Half;
00038
00039 /* Types for signed and unsigned 32-bit quantities. */
00040 typedef uint32_t Elf32_Word;
00041 typedef int32_t Elf32_Sword;
00042 typedef uint32_t Elf64_Word;
00043 typedef int32_t Elf64_Sword;
00044
00045 /* Types for signed and unsigned 64-bit quantities. */
00046 typedef uint64_t Elf32_Xword;
00047 typedef int64_t Elf32_Sxword;
00048 typedef uint64_t Elf64_Xword;
00049 typedef int64_t Elf64_Sxword;
00050
00051 /* Type of addresses. */
00052 typedef uint32_t Elf32_Addr;
00053 typedef uint64_t Elf64_Addr;
00054
00055 /* Type of file offsets. */
00056 typedef uint32_t Elf32_Off;
00057 typedef uint64_t Elf64_Off;
00058
00059 /* Type for section indices, which are 16-bit quantities. */
00060 typedef uint16_t Elf32_Section;
00061 typedef uint16_t Elf64_Section;
00062
00063 /* Type for version symbol information. */
00064 typedef Elf32_Half Elf32_Versym;
00065 typedef Elf64_Half Elf64_Versym;
00066
00067
00068 /* The ELF file header. This appears at the start of every ELF file. */
00069
00070 #define EI_NIDENT (16)
00071
00072 typedef struct
00073 {
00074 unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */
00075 Elf32_Half e_type; /* Object file type */
00076 Elf32_Half e_machine; /* Architecture */
00077 Elf32_Word e_version; /* Object file version */
00078 Elf32_Addr e_entry; /* Entry point virtual address */
00079 Elf32_Off e_phoff; /* Program header table file offset */
00080 Elf32_Off e_shoff; /* Section header table file offset */
00081 Elf32_Word e_flags; /* Processor-specific flags */
00082 Elf32_Half e_ehsize; /* ELF header size in bytes */
00083 Elf32_Half e_phentsize; /* Program header table entry size */
00084 Elf32_Half e_phnum; /* Program header table entry count */
00085 Elf32_Half e_shentsize; /* Section header table entry size */
00086 Elf32_Half e_shnum; /* Section header table entry count */
00087 Elf32_Half e_shstrndx; /* Section header string table index */
00088 } Elf32_Ehdr;
00089
00090 typedef struct
00091 {
00092 unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */
00093 Elf64_Half e_type; /* Object file type */
00094 Elf64_Half e_machine; /* Architecture */
00095 Elf64_Word e_version; /* Object file version */
00096 Elf64_Addr e_entry; /* Entry point virtual address */
00097 Elf64_Off e_phoff; /* Program header table file offset */
00098 Elf64_Off e_shoff; /* Section header table file offset */
00099 Elf64_Word e_flags; /* Processor-specific flags */
00100 Elf64_Half e_ehsize; /* ELF header size in bytes */
00101 Elf64_Half e_phentsize; /* Program header table entry size */
00102 Elf64_Half e_phnum; /* Program header table entry count */
00103 Elf64_Half e_shentsize; /* Section header table entry size */
00104 Elf64_Half e_shnum; /* Section header table entry count */
00105 Elf64_Half e_shstrndx; /* Section header string table index */
00106 } Elf64_Ehdr;
00107
00108 /* Fields in the e_ident array. The EI_* macros are indices into the
00109 array. The macros under each EI_* macro are the values the byte
00110 may have. */
00111
00112 #define EI_MAG0 0 /* File identification byte 0 index */
00113 #define ELFMAG0 0x7f /* Magic number byte 0 */
00114
00115 #define EI_MAG1 1 /* File identification byte 1 index */
00116 #define ELFMAG1 'E' /* Magic number byte 1 */
00117
00118 #define EI_MAG2 2 /* File identification byte 2 index */
00119 #define ELFMAG2 'L' /* Magic number byte 2 */
00120
00121 #define EI_MAG3 3 /* File identification byte 3 index */
00122 #define ELFMAG3 'F' /* Magic number byte 3 */
00123
00124 /* Conglomeration of the identification bytes, for easy testing as a word. */
00125 #define ELFMAG "\177ELF"
00126 #define SELFMAG 4
00127
00128 #define EI_CLASS 4 /* File class byte index */
00129 #define ELFCLASSNONE 0 /* Invalid class */
00130 #define ELFCLASS32 1 /* 32-bit objects */
00131 #define ELFCLASS64 2 /* 64-bit objects */
00132 #define ELFCLASSNUM 3
00133
00134 #define EI_DATA 5 /* Data encoding byte index */
00135 #define ELFDATANONE 0 /* Invalid data encoding */
00136 #define ELFDATA2LSB 1 /* 2's complement, little endian */
00137 #define ELFDATA2MSB 2 /* 2's complement, big endian */
00138 #define ELFDATANUM 3
00139
00140 #define EI_VERSION 6 /* File version byte index */
00141 /* Value must be EV_CURRENT */
00142
00143 #define EI_OSABI 7 /* OS ABI identification */
00144 #define ELFOSABI_NONE 0 /* UNIX System V ABI */
00145 #define ELFOSABI_SYSV 0 /* Alias. */
00146 #define ELFOSABI_HPUX 1 /* HP-UX */
00147 #define ELFOSABI_NETBSD 2 /* NetBSD. */
00148 #define ELFOSABI_LINUX 3 /* Linux. */
00149 #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */
00150 #define ELFOSABI_AIX 7 /* IBM AIX. */
00151 #define ELFOSABI_IRIX 8 /* SGI Irix. */
00152 #define ELFOSABI_FREEBSD 9 /* FreeBSD. */
00153 #define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */
00154 #define ELFOSABI_MODESTO 11 /* Novell Modesto. */
00155 #define ELFOSABI_OPENBSD 12 /* OpenBSD. */
00156 #define ELFOSABI_ARM 97 /* ARM */
00157 #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
00158
00159 #define EI_ABIVERSION 8 /* ABI version */
00160
00161 #define EI_PAD 9 /* Byte index of padding bytes */
00162
00163 /* Legal values for e_type (object file type). */
00164
00165 #define ET_NONE 0 /* No file type */
00166 #define ET_REL 1 /* Relocatable file */
00167 #define ET_EXEC 2 /* Executable file */
00168 #define ET_DYN 3 /* Shared object file */
00169 #define ET_CORE 4 /* Core file */
00170 #define ET_NUM 5 /* Number of defined types */
00171 #define ET_LOOS 0xfe00 /* OS-specific range start */
00172 #define ET_HIOS 0xfeff /* OS-specific range end */
00173 #define ET_LOPROC 0xff00 /* Processor-specific range start */
00174 #define ET_HIPROC 0xffff /* Processor-specific range end */
00175
00176 /* Legal values for e_machine (architecture). */
00177
00178 #define EM_NONE 0 /* No machine */
00179 #define EM_M32 1 /* AT&T WE 32100 */
00180 #define EM_SPARC 2 /* SUN SPARC */
00181 #define EM_386 3 /* Intel 80386 */
00182 #define EM_68K 4 /* Motorola m68k family */
00183 #define EM_88K 5 /* Motorola m88k family */
00184 #define EM_860 7 /* Intel 80860 */
00185 #define EM_MIPS 8 /* MIPS R3000 big-endian */
00186 #define EM_S370 9 /* IBM System/370 */
00187 #define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */
00188
00189 #define EM_PARISC 15 /* HPPA */
00190 #define EM_VPP500 17 /* Fujitsu VPP500 */
00191 #define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
00192 #define EM_960 19 /* Intel 80960 */
00193 #define EM_PPC 20 /* PowerPC */
00194 #define EM_PPC64 21 /* PowerPC 64-bit */
00195 #define EM_S390 22 /* IBM S390 */
00196
00197 #define EM_V800 36 /* NEC V800 series */
00198 #define EM_FR20 37 /* Fujitsu FR20 */
00199 #define EM_RH32 38 /* TRW RH-32 */
00200 #define EM_RCE 39 /* Motorola RCE */
00201 #define EM_ARM 40 /* ARM */
00202 #define EM_FAKE_ALPHA 41 /* Digital Alpha */
00203 #define EM_SH 42 /* Hitachi SH */
00204 #define EM_SPARCV9 43 /* SPARC v9 64-bit */
00205 #define EM_TRICORE 44 /* Siemens Tricore */
00206 #define EM_ARC 45 /* Argonaut RISC Core */
00207 #define EM_H8_300 46 /* Hitachi H8/300 */
00208 #define EM_H8_300H 47 /* Hitachi H8/300H */
00209 #define EM_H8S 48 /* Hitachi H8S */
00210 #define EM_H8_500 49 /* Hitachi H8/500 */
00211 #define EM_IA_64 50 /* Intel Merced */
00212 #define EM_MIPS_X 51 /* Stanford MIPS-X */
00213 #define EM_COLDFIRE 52 /* Motorola Coldfire */
00214 #define EM_68HC12 53 /* Motorola M68HC12 */
00215 #define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator*/
00216 #define EM_PCP 55 /* Siemens PCP */
00217 #define EM_NCPU 56 /* Sony nCPU embeeded RISC */
00218 #define EM_NDR1 57 /* Denso NDR1 microprocessor */
00219 #define EM_STARCORE 58 /* Motorola Start*Core processor */
00220 #define EM_ME16 59 /* Toyota ME16 processor */
00221 #define EM_ST100 60 /* STMicroelectronic ST100 processor */
00222 #define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/
00223 #define EM_X86_64 62 /* AMD x86-64 architecture */
00224 #define EM_PDSP 63 /* Sony DSP Processor */
00225
00226 #define EM_FX66 66 /* Siemens FX66 microcontroller */
00227 #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */
00228 #define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */
00229 #define EM_68HC16 69 /* Motorola MC68HC16 microcontroller */
00230 #define EM_68HC11 70 /* Motorola MC68HC11 microcontroller */
00231 #define EM_68HC08 71 /* Motorola MC68HC08 microcontroller */
00232 #define EM_68HC05 72 /* Motorola MC68HC05 microcontroller */
00233 #define EM_SVX 73 /* Silicon Graphics SVx */
00234 #define EM_AT19 74 /* STMicroelectronics ST19 8 bit mc */
00235 #define EM_VAX 75 /* Digital VAX */
00236 #define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
00237 #define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded processor */
00238 #define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor */
00239 #define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor */
00240 #define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */
00241 #define EM_HUANY 81 /* Harvard University machine-independent object files */
00242 #define EM_PRISM 82 /* SiTera Prism */
00243 #define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */
00244 #define EM_FR30 84 /* Fujitsu FR30 */
00245 #define EM_D10V 85 /* Mitsubishi D10V */
00246 #define EM_D30V 86 /* Mitsubishi D30V */
00247 #define EM_V850 87 /* NEC v850 */
00248 #define EM_M32R 88 /* Mitsubishi M32R */
00249 #define EM_MN10300 89 /* Matsushita MN10300 */
00250 #define EM_MN10200 90 /* Matsushita MN10200 */
00251 #define EM_PJ 91 /* picoJava */
00252 #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
00253 #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
00254 #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
00255 #define EM_NUM 95
00256
00257 /* If it is necessary to assign new unofficial EM_* values, please
00258 pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the
00259 chances of collision with official or non-GNU unofficial values. */
00260
00261 #define EM_ALPHA 0x9026
00262
00263 /* Legal values for e_version (version). */
00264
00265 #define EV_NONE 0 /* Invalid ELF version */
00266 #define EV_CURRENT 1 /* Current version */
00267 #define EV_NUM 2
00268
00269 /* Section header. */
00270
00271 typedef struct
00272 {
00273 Elf32_Word sh_name; /* Section name (string tbl index) */
00274 Elf32_Word sh_type; /* Section type */
00275 Elf32_Word sh_flags; /* Section flags */
00276 Elf32_Addr sh_addr; /* Section virtual addr at execution */
00277 Elf32_Off sh_offset; /* Section file offset */
00278 Elf32_Word sh_size; /* Section size in bytes */
00279 Elf32_Word sh_link; /* Link to another section */
00280 Elf32_Word sh_info; /* Additional section information */
00281 Elf32_Word sh_addralign; /* Section alignment */
00282 Elf32_Word sh_entsize; /* Entry size if section holds table */
00283 } Elf32_Shdr;
00284
00285 typedef struct
00286 {
00287 Elf64_Word sh_name; /* Section name (string tbl index) */
00288 Elf64_Word sh_type; /* Section type */
00289 Elf64_Xword sh_flags; /* Section flags */
00290 Elf64_Addr sh_addr; /* Section virtual addr at execution */
00291 Elf64_Off sh_offset; /* Section file offset */
00292 Elf64_Xword sh_size; /* Section size in bytes */
00293 Elf64_Word sh_link; /* Link to another section */
00294 Elf64_Word sh_info; /* Additional section information */
00295 Elf64_Xword sh_addralign; /* Section alignment */
00296 Elf64_Xword sh_entsize; /* Entry size if section holds table */
00297 } Elf64_Shdr;
00298
00299 /* Special section indices. */
00300
00301 #define SHN_UNDEF 0 /* Undefined section */
00302 #define SHN_LORESERVE 0xff00 /* Start of reserved indices */
00303 #define SHN_LOPROC 0xff00 /* Start of processor-specific */
00304 #define SHN_HIPROC 0xff1f /* End of processor-specific */
00305 #define SHN_LOOS 0xff20 /* Start of OS-specific */
00306 #define SHN_HIOS 0xff3f /* End of OS-specific */
00307 #define SHN_ABS 0xfff1 /* Associated symbol is absolute */
00308 #define SHN_COMMON 0xfff2 /* Associated symbol is common */
00309 #define SHN_XINDEX 0xffff /* Index is in extra table. */
00310 #define SHN_HIRESERVE 0xffff /* End of reserved indices */
00311
00312 /* Legal values for sh_type (section type). */
00313
00314 #define SHT_NULL 0 /* Section header table entry unused */
00315 #define SHT_PROGBITS 1 /* Program data */
00316 #define SHT_SYMTAB 2 /* Symbol table */
00317 #define SHT_STRTAB 3 /* String table */
00318 #define SHT_RELA 4 /* Relocation entries with addends */
00319 #define SHT_HASH 5 /* Symbol hash table */
00320 #define SHT_DYNAMIC 6 /* Dynamic linking information */
00321 #define SHT_NOTE 7 /* Notes */
00322 #define SHT_NOBITS 8 /* Program space with no data (bss) */
00323 #define SHT_REL 9 /* Relocation entries, no addends */
00324 #define SHT_SHLIB 10 /* Reserved */
00325 #define SHT_DYNSYM 11 /* Dynamic linker symbol table */
00326 #define SHT_INIT_ARRAY 14 /* Array of constructors */
00327 #define SHT_FINI_ARRAY 15 /* Array of destructors */
00328 #define SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */
00329 #define SHT_GROUP 17 /* Section group */
00330 #define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */
00331 #define SHT_NUM 19 /* Number of defined types. */
00332 #define SHT_LOOS 0x60000000 /* Start OS-specific */
00333 #define SHT_GNU_LIBLIST 0x6ffffff7 /* Prelink library list */
00334 #define SHT_CHECKSUM 0x6ffffff8 /* Checksum for DSO content. */
00335 #define SHT_LOSUNW 0x6ffffffa /* Sun-specific low bound. */
00336 #define SHT_SUNW_move 0x6ffffffa
00337 #define SHT_SUNW_COMDAT 0x6ffffffb
00338 #define SHT_SUNW_syminfo 0x6ffffffc
00339 #define SHT_GNU_verdef 0x6ffffffd /* Version definition section. */
00340 #define SHT_GNU_verneed 0x6ffffffe /* Version needs section. */
00341 #define SHT_GNU_versym 0x6fffffff /* Version symbol table. */
00342 #define SHT_HISUNW 0x6fffffff /* Sun-specific high bound. */
00343 #define SHT_HIOS 0x6fffffff /* End OS-specific type */
00344 #define SHT_LOPROC 0x70000000 /* Start of processor-specific */
00345 #define SHT_HIPROC 0x7fffffff /* End of processor-specific */
00346 #define SHT_LOUSER 0x80000000 /* Start of application-specific */
00347 #define SHT_RES 0x80000001 /* MELF: Resource type */
00348 #define SHT_HIUSER 0x8fffffff /* End of application-specific */
00349
00350 /* Legal values for sh_flags (section flags). */
00351
00352 #define SHF_WRITE (1 << 0) /* Writable */
00353 #define SHF_ALLOC (1 << 1) /* Occupies memory during execution */
00354 #define SHF_EXECINSTR (1 << 2) /* Executable */
00355 #define SHF_MERGE (1 << 4) /* Might be merged */
00356 #define SHF_STRINGS (1 << 5) /* Contains nul-terminated strings */
00357 #define SHF_INFO_LINK (1 << 6) /* `sh_info' contains SHT index */
00358 #define SHF_LINK_ORDER (1 << 7) /* Preserve order after combining */
00359 #define SHF_OS_NONCONFORMING (1 << 8) /* Non-standard OS specific handling
00360 required */
00361 #define SHF_GROUP (1 << 9) /* Section is member of a group. */
00362 #define SHF_TLS (1 << 10) /* Section hold thread-local data. */
00363 #define SHF_MASKOS 0x0ff00000 /* OS-specific. */
00364 #define SHF_MASKPROC 0xf0000000 /* Processor-specific */
00365
00366 /* Section group handling. */
00367 #define GRP_COMDAT 0x1 /* Mark group as COMDAT. */
00368
00369 /* Symbol table entry. */
00370
00371 typedef struct
00372 {
00373 Elf32_Word st_name; /* Symbol name (string tbl index) */
00374 Elf32_Addr st_value; /* Symbol value */
00375 Elf32_Word st_size; /* Symbol size */
00376 unsigned char st_info; /* Symbol type and binding */
00377 unsigned char st_other; /* Symbol visibility */
00378 Elf32_Section st_shndx; /* Section index */
00379 } Elf32_Sym;
00380
00381 typedef struct
00382 {
00383 Elf64_Word st_name; /* Symbol name (string tbl index) */
00384 unsigned char st_info; /* Symbol type and binding */
00385 unsigned char st_other; /* Symbol visibility */
00386 Elf64_Section st_shndx; /* Section index */
00387 Elf64_Addr st_value; /* Symbol value */
00388 Elf64_Xword st_size; /* Symbol size */
00389 } Elf64_Sym;
00390
00391 /* The syminfo section if available contains additional information about
00392 every dynamic symbol. */
00393
00394 typedef struct
00395 {
00396 Elf32_Half si_boundto; /* Direct bindings, symbol bound to */
00397 Elf32_Half si_flags; /* Per symbol flags */
00398 } Elf32_Syminfo;
00399
00400 typedef struct
00401 {
00402 Elf64_Half si_boundto; /* Direct bindings, symbol bound to */
00403 Elf64_Half si_flags; /* Per symbol flags */
00404 } Elf64_Syminfo;
00405
00406 /* Possible values for si_boundto. */
00407 #define SYMINFO_BT_SELF 0xffff /* Symbol bound to self */
00408 #define SYMINFO_BT_PARENT 0xfffe /* Symbol bound to parent */
00409 #define SYMINFO_BT_LOWRESERVE 0xff00 /* Beginning of reserved entries */
00410
00411 /* Possible bitmasks for si_flags. */
00412 #define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */
00413 #define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */
00414 #define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */
00415 #define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy
00416 loaded */
00417 /* Syminfo version values. */
00418 #define SYMINFO_NONE 0
00419 #define SYMINFO_CURRENT 1
00420 #define SYMINFO_NUM 2
00421
00422
00423 /* Special section index. */
00424
00425 #define SHN_UNDEF 0 /* No section, undefined symbol. */
00426
00427 /* How to extract and insert information held in the st_info field. */
00428
00429 #define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4)
00430 #define ELF32_ST_TYPE(val) ((val) & 0xf)
00431 #define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
00432
00433 /* Both Elf32_Sym and Elf64_Sym use the same one-byte st_info field. */
00434 #define ELF64_ST_BIND(val) ELF32_ST_BIND (val)
00435 #define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val)
00436 #define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type))
00437
00438 /* Legal values for ST_BIND subfield of st_info (symbol binding). */
00439
00440 #define STB_LOCAL 0 /* Local symbol */
00441 #define STB_GLOBAL 1 /* Global symbol */
00442 #define STB_WEAK 2 /* Weak symbol */
00443 #define STB_NUM 3 /* Number of defined types. */
00444 #define STB_LOOS 10 /* Start of OS-specific */
00445 #define STB_HIOS 12 /* End of OS-specific */
00446 #define STB_LOPROC 13 /* Start of processor-specific */
00447 #define STB_HIPROC 15 /* End of processor-specific */
00448
00449 /* Legal values for ST_TYPE subfield of st_info (symbol type). */
00450
00451 #define STT_NOTYPE 0 /* Symbol type is unspecified */
00452 #define STT_OBJECT 1 /* Symbol is a data object */
00453 #define STT_FUNC 2 /* Symbol is a code object */
00454 #define STT_SECTION 3 /* Symbol associated with a section */
00455 #define STT_FILE 4 /* Symbol's name is file name */
00456 #define STT_COMMON 5 /* Symbol is a common data object */
00457 #define STT_NUM 6 /* Number of defined types. */
00458 #define STT_LOOS 10 /* Start of OS-specific */
00459 #define STT_HIOS 12 /* End of OS-specific */
00460 #define STT_LOPROC 13 /* Start of processor-specific */
00461 #define STT_HIPROC 15 /* End of processor-specific */
00462
00463
00464 /* Symbol table indices are found in the hash buckets and chain table
00465 of a symbol hash table section. This special index value indicates
00466 the end of a chain, meaning no further symbols are found in that bucket. */
00467
00468 #define STN_UNDEF 0 /* End of a chain. */
00469
00470
00471 /* How to extract and insert information held in the st_other field. */
00472
00473 #define ELF32_ST_VISIBILITY(o) ((o) & 0x03)
00474
00475 /* For ELF64 the definitions are the same. */
00476 #define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o)
00477
00478 /* Symbol visibility specification encoded in the st_other field. */
00479 #define STV_DEFAULT 0 /* Default symbol visibility rules */
00480 #define STV_INTERNAL 1 /* Processor specific hidden class */
00481 #define STV_HIDDEN 2 /* Sym unavailable in other modules */
00482 #define STV_PROTECTED 3 /* Not preemptible, not exported */
00483
00484
00485 /* Relocation table entry without addend (in section of type SHT_REL). */
00486
00487 typedef struct
00488 {
00489 Elf32_Addr r_offset; /* Address */
00490 Elf32_Word r_info; /* Relocation type and symbol index */
00491 } Elf32_Rel;
00492
00493 /* I have seen two different definitions of the Elf64_Rel and
00494 Elf64_Rela structures, so we'll leave them out until Novell (or
00495 whoever) gets their act together. */
00496 /* The following, at least, is used on Sparc v9, MIPS, and Alpha. */
00497
00498 typedef struct
00499 {
00500 Elf64_Addr r_offset; /* Address */
00501 Elf64_Xword r_info; /* Relocation type and symbol index */
00502 } Elf64_Rel;
00503
00504 /* Relocation table entry with addend (in section of type SHT_RELA). */
00505
00506 typedef struct
00507 {
00508 Elf32_Addr r_offset; /* Address */
00509 Elf32_Word r_info; /* Relocation type and symbol index */
00510 Elf32_Sword r_addend; /* Addend */
00511 } Elf32_Rela;
00512
00513 typedef struct
00514 {
00515 Elf64_Addr r_offset; /* Address */
00516 Elf64_Xword r_info; /* Relocation type and symbol index */
00517 Elf64_Sxword r_addend; /* Addend */
00518 } Elf64_Rela;
00519
00520 /* How to extract and insert information held in the r_info field. */
00521
00522 #define ELF32_R_SYM(val) ((val) >> 8)
00523 #define ELF32_R_TYPE(val) ((val) & 0xff)
00524 #define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff))
00525
00526 #define ELF64_R_SYM(i) ((i) >> 32)
00527 #define ELF64_R_TYPE(i) ((i) & 0xffffffff)
00528 #define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type))
00529
00530 /* Program segment header. */
00531
00532 typedef struct
00533 {
00534 Elf32_Word p_type; /* Segment type */
00535 Elf32_Off p_offset; /* Segment file offset */
00536 Elf32_Addr p_vaddr; /* Segment virtual address */
00537 Elf32_Addr p_paddr; /* Segment physical address */
00538 Elf32_Word p_filesz; /* Segment size in file */
00539 Elf32_Word p_memsz; /* Segment size in memory */
00540 Elf32_Word p_flags; /* Segment flags */
00541 Elf32_Word p_align; /* Segment alignment */
00542 } Elf32_Phdr;
00543
00544 typedef struct
00545 {
00546 Elf64_Word p_type; /* Segment type */
00547 Elf64_Word p_flags; /* Segment flags */
00548 Elf64_Off p_offset; /* Segment file offset */
00549 Elf64_Addr p_vaddr; /* Segment virtual address */
00550 Elf64_Addr p_paddr; /* Segment physical address */
00551 Elf64_Xword p_filesz; /* Segment size in file */
00552 Elf64_Xword p_memsz; /* Segment size in memory */
00553 Elf64_Xword p_align; /* Segment alignment */
00554 } Elf64_Phdr;
00555
00556 /* Legal values for p_type (segment type). */
00557
00558 #define PT_NULL 0 /* Program header table entry unused */
00559 #define PT_LOAD 1 /* Loadable program segment */
00560 #define PT_DYNAMIC 2 /* Dynamic linking information */
00561 #define PT_INTERP 3 /* Program interpreter */
00562 #define PT_NOTE 4 /* Auxiliary information */
00563 #define PT_SHLIB 5 /* Reserved */
00564 #define PT_PHDR 6 /* Entry for header table itself */
00565 #define PT_TLS 7 /* Thread-local storage segment */
00566 #define PT_NUM 8 /* Number of defined types */
00567 #define PT_LOOS 0x60000000 /* Start of OS-specific */
00568 #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
00569 #define PT_HIOS 0x6fffffff /* End of OS-specific */
00570 #define PT_LOPROC 0x70000000 /* Start of processor-specific */
00571 #define PT_HIPROC 0x7fffffff /* End of processor-specific */
00572
00573 /* Legal values for p_flags (segment flags). */
00574
00575 #define PF_X (1 << 0) /* Segment is executable */
00576 #define PF_W (1 << 1) /* Segment is writable */
00577 #define PF_R (1 << 2) /* Segment is readable */
00578 #define PF_MASKOS 0x0ff00000 /* OS-specific */
00579 #define PF_MASKPROC 0xf0000000 /* Processor-specific */
00580
00581 /* Legal values for note segment descriptor types for core files. */
00582
00583 #define NT_PRSTATUS 1 /* Contains copy of prstatus struct */
00584 #define NT_FPREGSET 2 /* Contains copy of fpregset struct */
00585 #define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */
00586 #define NT_PRXREG 4 /* Contains copy of prxregset struct */
00587 #define NT_PLATFORM 5 /* String from sysinfo(SI_PLATFORM) */
00588 #define NT_AUXV 6 /* Contains copy of auxv array */
00589 #define NT_GWINDOWS 7 /* Contains copy of gwindows struct */
00590 #define NT_PSTATUS 10 /* Contains copy of pstatus struct */
00591 #define NT_PSINFO 13 /* Contains copy of psinfo struct */
00592 #define NT_PRCRED 14 /* Contains copy of prcred struct */
00593 #define NT_UTSNAME 15 /* Contains copy of utsname struct */
00594 #define NT_LWPSTATUS 16 /* Contains copy of lwpstatus struct */
00595 #define NT_LWPSINFO 17 /* Contains copy of lwpinfo struct */
00596 #define NT_PRFPXREG 20 /* Contains copy of fprxregset struct*/
00597
00598 /* Legal values for the note segment descriptor types for object files. */
00599
00600 #define NT_VERSION 1 /* Contains a version string. */
00601
00602
00603 /* Dynamic section entry. */
00604
00605 typedef struct
00606 {
00607 Elf32_Sword d_tag; /* Dynamic entry type */
00608 union
00609 {
00610 Elf32_Word d_val; /* Integer value */
00611 Elf32_Addr d_ptr; /* Address value */
00612 } d_un;
00613 } Elf32_Dyn;
00614
00615 typedef struct
00616 {
00617 Elf64_Sxword d_tag; /* Dynamic entry type */
00618 union
00619 {
00620 Elf64_Xword d_val; /* Integer value */
00621 Elf64_Addr d_ptr; /* Address value */
00622 } d_un;
00623 } Elf64_Dyn;
00624
00625 /* Legal values for d_tag (dynamic entry type). */
00626
00627 #define DT_NULL 0 /* Marks end of dynamic section */
00628 #define DT_NEEDED 1 /* Name of needed library */
00629 #define DT_PLTRELSZ 2 /* Size in bytes of PLT relocs */
00630 #define DT_PLTGOT 3 /* Processor defined value */
00631 #define DT_HASH 4 /* Address of symbol hash table */
00632 #define DT_STRTAB 5 /* Address of string table */
00633 #define DT_SYMTAB 6 /* Address of symbol table */
00634 #define DT_RELA 7 /* Address of Rela relocs */
00635 #define DT_RELASZ 8 /* Total size of Rela relocs */
00636 #define DT_RELAENT 9 /* Size of one Rela reloc */
00637 #define DT_STRSZ 10 /* Size of string table */
00638 #define DT_SYMENT 11 /* Size of one symbol table entry */
00639 #define DT_INIT 12 /* Address of init function */
00640 #define DT_FINI 13 /* Address of termination function */
00641 #define DT_SONAME 14 /* Name of shared object */
00642 #define DT_RPATH 15 /* Library search path (deprecated) */
00643 #define DT_SYMBOLIC 16 /* Start symbol search here */
00644 #define DT_REL 17 /* Address of Rel relocs */
00645 #define DT_RELSZ 18 /* Total size of Rel relocs */
00646 #define DT_RELENT 19 /* Size of one Rel reloc */
00647 #define DT_PLTREL 20 /* Type of reloc in PLT */
00648 #define DT_DEBUG 21 /* For debugging; unspecified */
00649 #define DT_TEXTREL 22 /* Reloc might modify .text */
00650 #define DT_JMPREL 23 /* Address of PLT relocs */
00651 #define DT_BIND_NOW 24 /* Process relocations of object */
00652 #define DT_INIT_ARRAY 25 /* Array with addresses of init fct */
00653 #define DT_FINI_ARRAY 26 /* Array with addresses of fini fct */
00654 #define DT_INIT_ARRAYSZ 27 /* Size in bytes of DT_INIT_ARRAY */
00655 #define DT_FINI_ARRAYSZ 28 /* Size in bytes of DT_FINI_ARRAY */
00656 #define DT_RUNPATH 29 /* Library search path */
00657 #define DT_FLAGS 30 /* Flags for the object being loaded */
00658 #define DT_ENCODING 32 /* Start of encoded range */
00659 #define DT_PREINIT_ARRAY 32 /* Array with addresses of preinit fct*/
00660 #define DT_PREINIT_ARRAYSZ 33 /* size in bytes of DT_PREINIT_ARRAY */
00661 #define DT_NUM 34 /* Number used */
00662 #define DT_LOOS 0x60000000 /* Start of OS-specific */
00663 #define DT_HIOS 0x6fffffff /* End of OS-specific */
00664 #define DT_LOPROC 0x70000000 /* Start of processor-specific */
00665 #define DT_HIPROC 0x7fffffff /* End of processor-specific */
00666 #define DT_PROCNUM DT_MIPS_NUM /* Most used by any processor */
00667
00668 /* DT_* entries which fall between DT_VALRNGHI & DT_VALRNGLO use the
00669 Dyn.d_un.d_val field of the Elf*_Dyn structure. This follows Sun's
00670 approach. */
00671 #define DT_VALRNGLO 0x6ffffd00
00672 #define DT_GNU_PRELINKED 0x6ffffdf5 /* Prelinking timestamp */
00673 #define DT_GNU_CONFLICTSZ 0x6ffffdf6 /* Size of conflict section */
00674 #define DT_GNU_LIBLISTSZ 0x6ffffdf7 /* Size of library list */
00675 #define DT_CHECKSUM 0x6ffffdf8
00676 #define DT_PLTPADSZ 0x6ffffdf9
00677 #define DT_MOVEENT 0x6ffffdfa
00678 #define DT_MOVESZ 0x6ffffdfb
00679 #define DT_FEATURE_1 0x6ffffdfc /* Feature selection (DTF_*). */
00680 #define DT_POSFLAG_1 0x6ffffdfd /* Flags for DT_* entries, effecting
00681 the following DT_* entry. */
00682 #define DT_SYMINSZ 0x6ffffdfe /* Size of syminfo table (in bytes) */
00683 #define DT_SYMINENT 0x6ffffdff /* Entry size of syminfo */
00684 #define DT_VALRNGHI 0x6ffffdff
00685
00686 /* DT_* entries which fall between DT_ADDRRNGHI & DT_ADDRRNGLO use the
00687 Dyn.d_un.d_ptr field of the Elf*_Dyn structure.
00688
00689 If any adjustment is made to the ELF object after it has been
00690 built these entries will need to be adjusted. */
00691 #define DT_ADDRRNGLO 0x6ffffe00
00692 #define DT_GNU_CONFLICT 0x6ffffef8 /* Start of conflict section */
00693 #define DT_GNU_LIBLIST 0x6ffffef9 /* Library list */
00694 #define DT_CONFIG 0x6ffffefa /* Configuration information. */
00695 #define DT_DEPAUDIT 0x6ffffefb /* Dependency auditing. */
00696 #define DT_AUDIT 0x6ffffefc /* Object auditing. */
00697 #define DT_PLTPAD 0x6ffffefd /* PLT padding. */
00698 #define DT_MOVETAB 0x6ffffefe /* Move table. */
00699 #define DT_SYMINFO 0x6ffffeff /* Syminfo table. */
00700 #define DT_ADDRRNGHI 0x6ffffeff
00701
00702 /* The versioning entry types. The next are defined as part of the
00703 GNU extension. */
00704 #define DT_VERSYM 0x6ffffff0
00705
00706 #define DT_RELACOUNT 0x6ffffff9
00707 #define DT_RELCOUNT 0x6ffffffa
00708
00709 /* These were chosen by Sun. */
00710 #define DT_FLAGS_1 0x6ffffffb /* State flags, see DF_1_* below. */
00711 #define DT_VERDEF 0x6ffffffc /* Address of version definition
00712 table */
00713 #define DT_VERDEFNUM 0x6ffffffd /* Number of version definitions */
00714 #define DT_VERNEED 0x6ffffffe /* Address of table with needed
00715 versions */
00716 #define DT_VERNEEDNUM 0x6fffffff /* Number of needed versions */
00717 #define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */
00718 #define DT_VERSIONTAGNUM 16
00719
00720 /* Sun added these machine-independent extensions in the "processor-specific"
00721 range. Be compatible. */
00722 #define DT_AUXILIARY 0x7ffffffd /* Shared object to load before self */
00723 #define DT_FILTER 0x7fffffff /* Shared object to get values from */
00724 #define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1)
00725 #define DT_EXTRANUM 3
00726
00727 /* Values of `d_un.d_val' in the DT_FLAGS entry. */
00728 #define DF_ORIGIN 0x00000001 /* Object may use DF_ORIGIN */
00729 #define DF_SYMBOLIC 0x00000002 /* Symbol resolutions starts here */
00730 #define DF_TEXTREL 0x00000004 /* Object contains text relocations */
00731 #define DF_BIND_NOW 0x00000008 /* No lazy binding for this object */
00732
00733 /* State flags selectable in the `d_un.d_val' element of the DT_FLAGS_1
00734 entry in the dynamic section. */
00735 #define DF_1_NOW 0x00000001 /* Set RTLD_NOW for this object. */
00736 #define DF_1_GLOBAL 0x00000002 /* Set RTLD_GLOBAL for this object. */
00737 #define DF_1_GROUP 0x00000004 /* Set RTLD_GROUP for this object. */
00738 #define DF_1_NODELETE 0x00000008 /* Set RTLD_NODELETE for this object.*/
00739 #define DF_1_LOADFLTR 0x00000010 /* Trigger filtee loading at runtime.*/
00740 #define DF_1_INITFIRST 0x00000020 /* Set RTLD_INITFIRST for this object*/
00741 #define DF_1_NOOPEN 0x00000040 /* Set RTLD_NOOPEN for this object. */
00742 #define DF_1_ORIGIN 0x00000080 /* $ORIGIN must be handled. */
00743 #define DF_1_DIRECT 0x00000100 /* Direct binding enabled. */
00744 #define DF_1_TRANS 0x00000200
00745 #define DF_1_INTERPOSE 0x00000400 /* Object is used to interpose. */
00746 #define DF_1_NODEFLIB 0x00000800 /* Ignore default lib search path. */
00747 #define DF_1_NODUMP 0x00001000 /* Object can't be dldump'ed. */
00748 #define DF_1_CONFALT 0x00002000 /* Configuration alternative created.*/
00749 #define DF_1_ENDFILTEE 0x00004000 /* Filtee terminates filters search. */
00750 #define DF_1_DISPRELDNE 0x00008000 /* Disp reloc applied at build time. */
00751 #define DF_1_DISPRELPND 0x00010000 /* Disp reloc applied at run-time. */
00752
00753 /* Flags for the feature selection in DT_FEATURE_1. */
00754 #define DTF_1_PARINIT 0x00000001
00755 #define DTF_1_CONFEXP 0x00000002
00756
00757 /* Flags in the DT_POSFLAG_1 entry effecting only the next DT_* entry. */
00758 #define DF_P1_LAZYLOAD 0x00000001 /* Lazyload following object. */
00759 #define DF_P1_GROUPPERM 0x00000002 /* Symbols from next object are not
00760 generally available. */
00761
00762 /* Version definition sections. */
00763
00764 typedef struct
00765 {
00766 Elf32_Half vd_version; /* Version revision */
00767 Elf32_Half vd_flags; /* Version information */
00768 Elf32_Half vd_ndx; /* Version Index */
00769 Elf32_Half vd_cnt; /* Number of associated aux entries */
00770 Elf32_Word vd_hash; /* Version name hash value */
00771 Elf32_Word vd_aux; /* Offset in bytes to verdaux array */
00772 Elf32_Word vd_next; /* Offset in bytes to next verdef
00773 entry */
00774 } Elf32_Verdef;
00775
00776 typedef struct
00777 {
00778 Elf64_Half vd_version; /* Version revision */
00779 Elf64_Half vd_flags; /* Version information */
00780 Elf64_Half vd_ndx; /* Version Index */
00781 Elf64_Half vd_cnt; /* Number of associated aux entries */
00782 Elf64_Word vd_hash; /* Version name hash value */
00783 Elf64_Word vd_aux; /* Offset in bytes to verdaux array */
00784 Elf64_Word vd_next; /* Offset in bytes to next verdef
00785 entry */
00786 } Elf64_Verdef;
00787
00788
00789 /* Legal values for vd_version (version revision). */
00790 #define VER_DEF_NONE 0 /* No version */
00791 #define VER_DEF_CURRENT 1 /* Current version */
00792 #define VER_DEF_NUM 2 /* Given version number */
00793
00794 /* Legal values for vd_flags (version information flags). */
00795 #define VER_FLG_BASE 0x1 /* Version definition of file itself */
00796 #define VER_FLG_WEAK 0x2 /* Weak version identifier */
00797
00798 /* Versym symbol index values. */
00799 #define VER_NDX_LOCAL 0 /* Symbol is local. */
00800 #define VER_NDX_GLOBAL 1 /* Symbol is global. */
00801 #define VER_NDX_LORESERVE 0xff00 /* Beginning of reserved entries. */
00802 #define VER_NDX_ELIMINATE 0xff01 /* Symbol is to be eliminated. */
00803
00804 /* Auxialiary version information. */
00805
00806 typedef struct
00807 {
00808 Elf32_Word vda_name; /* Version or dependency names */
00809 Elf32_Word vda_next; /* Offset in bytes to next verdaux
00810 entry */
00811 } Elf32_Verdaux;
00812
00813 typedef struct
00814 {
00815 Elf64_Word vda_name; /* Version or dependency names */
00816 Elf64_Word vda_next; /* Offset in bytes to next verdaux
00817 entry */
00818 } Elf64_Verdaux;
00819
00820
00821 /* Version dependency section. */
00822
00823 typedef struct
00824 {
00825 Elf32_Half vn_version; /* Version of structure */
00826 Elf32_Half vn_cnt; /* Number of associated aux entries */
00827 Elf32_Word vn_file; /* Offset of filename for this
00828 dependency */
00829 Elf32_Word vn_aux; /* Offset in bytes to vernaux array */
00830 Elf32_Word vn_next; /* Offset in bytes to next verneed
00831 entry */
00832 } Elf32_Verneed;
00833
00834 typedef struct
00835 {
00836 Elf64_Half vn_version; /* Version of structure */
00837 Elf64_Half vn_cnt; /* Number of associated aux entries */
00838 Elf64_Word vn_file; /* Offset of filename for this
00839 dependency */
00840 Elf64_Word vn_aux; /* Offset in bytes to vernaux array */
00841 Elf64_Word vn_next; /* Offset in bytes to next verneed
00842 entry */
00843 } Elf64_Verneed;
00844
00845
00846 /* Legal values for vn_version (version revision). */
00847 #define VER_NEED_NONE 0 /* No version */
00848 #define VER_NEED_CURRENT 1 /* Current version */
00849 #define VER_NEED_NUM 2 /* Given version number */
00850
00851 /* Auxiliary needed version information. */
00852
00853 typedef struct
00854 {
00855 Elf32_Word vna_hash; /* Hash value of dependency name */
00856 Elf32_Half vna_flags; /* Dependency specific information */
00857 Elf32_Half vna_other; /* Unused */
00858 Elf32_Word vna_name; /* Dependency name string offset */
00859 Elf32_Word vna_next; /* Offset in bytes to next vernaux
00860 entry */
00861 } Elf32_Vernaux;
00862
00863 typedef struct
00864 {
00865 Elf64_Word vna_hash; /* Hash value of dependency name */
00866 Elf64_Half vna_flags; /* Dependency specific information */
00867 Elf64_Half vna_other; /* Unused */
00868 Elf64_Word vna_name; /* Dependency name string offset */
00869 Elf64_Word vna_next; /* Offset in bytes to next vernaux
00870 entry */
00871 } Elf64_Vernaux;
00872
00873
00874 /* Legal values for vna_flags. */
00875 #define VER_FLG_WEAK 0x2 /* Weak version identifier */
00876
00877
00878 /* Auxiliary vector. */
00879
00880 /* This vector is normally only used by the program interpreter. The
00881 usual definition in an ABI supplement uses the name auxv_t. The
00882 vector is not usually defined in a standard <elf.h> file, but it
00883 can't hurt. We rename it to avoid conflicts. The sizes of these
00884 types are an arrangement between the exec server and the program
00885 interpreter, so we don't fully specify them here. */
00886
00887 typedef struct
00888 {
00889 int a_type; /* Entry type */
00890 union
00891 {
00892 long int a_val; /* Integer value */
00893 void *a_ptr; /* Pointer value */
00894 void (*a_fcn) (void); /* Function pointer value */
00895 } a_un;
00896 } Elf32_auxv_t;
00897
00898 typedef struct
00899 {
00900 long int a_type; /* Entry type */
00901 union
00902 {
00903 long int a_val; /* Integer value */
00904 void *a_ptr; /* Pointer value */
00905 void (*a_fcn) (void); /* Function pointer value */
00906 } a_un;
00907 } Elf64_auxv_t;
00908
00909 /* Legal values for a_type (entry type). */
00910
00911 #define AT_NULL 0 /* End of vector */
00912 #define AT_IGNORE 1 /* Entry should be ignored */
00913 #define AT_EXECFD 2 /* File descriptor of program */
00914 #define AT_PHDR 3 /* Program headers for program */
00915 #define AT_PHENT 4 /* Size of program header entry */
00916 #define AT_PHNUM 5 /* Number of program headers */
00917 #define AT_PAGESZ 6 /* System page size */
00918 #define AT_BASE 7 /* Base address of interpreter */
00919 #define AT_FLAGS 8 /* Flags */
00920 #define AT_ENTRY 9 /* Entry point of program */
00921 #define AT_NOTELF 10 /* Program is not ELF */
00922 #define AT_UID 11 /* Real uid */
00923 #define AT_EUID 12 /* Effective uid */
00924 #define AT_GID 13 /* Real gid */
00925 #define AT_EGID 14 /* Effective gid */
00926 #define AT_CLKTCK 17 /* Frequency of times() */
00927
00928 /* Some more special a_type values describing the hardware. */
00929 #define AT_PLATFORM 15 /* String identifying platform. */
00930 #define AT_HWCAP 16 /* Machine dependent hints about
00931 processor capabilities. */
00932
00933 /* This entry gives some information about the FPU initialization
00934 performed by the kernel. */
00935 #define AT_FPUCW 18 /* Used FPU control word. */
00936
00937 /* Cache block sizes. */
00938 #define AT_DCACHEBSIZE 19 /* Data cache block size. */
00939 #define AT_ICACHEBSIZE 20 /* Instruction cache block size. */
00940 #define AT_UCACHEBSIZE 21 /* Unified cache block size. */
00941
00942 /* A special ignored value for PPC, used by the kernel to control the
00943 interpretation of the AUXV. Must be > 16. */
00944 #define AT_IGNOREPPC 22 /* Entry should be ignored */
00945
00946
00947 /* Note section contents. Each entry in the note section begins with
00948 a header of a fixed form. */
00949
00950 typedef struct
00951 {
00952 Elf32_Word n_namesz; /* Length of the note's name. */
00953 Elf32_Word n_descsz; /* Length of the note's descriptor. */
00954 Elf32_Word n_type; /* Type of the note. */
00955 } Elf32_Nhdr;
00956
00957 typedef struct
00958 {
00959 Elf64_Word n_namesz; /* Length of the note's name. */
00960 Elf64_Word n_descsz; /* Length of the note's descriptor. */
00961 Elf64_Word n_type; /* Type of the note. */
00962 } Elf64_Nhdr;
00963
00964 /* Known names of notes. */
00965
00966 /* Solaris entries in the note section have this name. */
00967 #define ELF_NOTE_SOLARIS "SUNW Solaris"
00968
00969 /* Note entries for GNU systems have this name. */
00970 #define ELF_NOTE_GNU "GNU"
00971
00972
00973 /* Defined types of notes for Solaris. */
00974
00975 /* Value of descriptor (one word) is desired pagesize for the binary. */
00976 #define ELF_NOTE_PAGESIZE_HINT 1
00977
00978
00979 /* Defined note types for GNU systems. */
00980
00981 /* ABI information. The descriptor consists of words:
00982 word 0: OS descriptor
00983 word 1: major version of the ABI
00984 word 2: minor version of the ABI
00985 word 3: subminor version of the ABI
00986 */
00987 #define ELF_NOTE_ABI 1
00988
00989 /* Known OSes. These value can appear in word 0 of an ELF_NOTE_ABI
00990 note section entry. */
00991 #define ELF_NOTE_OS_LINUX 0
00992 #define ELF_NOTE_OS_GNU 1
00993 #define ELF_NOTE_OS_SOLARIS2 2
00994
00995
00996 /* Move records. */
00997 typedef struct
00998 {
00999 Elf32_Xword m_value; /* Symbol value. */
01000 Elf32_Word m_info; /* Size and index. */
01001 Elf32_Word m_poffset; /* Symbol offset. */
01002 Elf32_Half m_repeat; /* Repeat count. */
01003 Elf32_Half m_stride; /* Stride info. */
01004 } Elf32_Move;
01005
01006 typedef struct
01007 {
01008 Elf64_Xword m_value; /* Symbol value. */
01009 Elf64_Xword m_info; /* Size and index. */
01010 Elf64_Xword m_poffset; /* Symbol offset. */
01011 Elf64_Half m_repeat; /* Repeat count. */
01012 Elf64_Half m_stride; /* Stride info. */
01013 } Elf64_Move;
01014
01015 /* Macro to construct move records. */
01016 #define ELF32_M_SYM(info) ((info) >> 8)
01017 #define ELF32_M_SIZE(info) ((unsigned char) (info))
01018 #define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size))
01019
01020 #define ELF64_M_SYM(info) ELF32_M_SYM (info)
01021 #define ELF64_M_SIZE(info) ELF32_M_SIZE (info)
01022 #define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size)
01023
01024
01025 /* Motorola 68k specific definitions. */
01026
01027 /* Values for Elf32_Ehdr.e_flags. */
01028 #define EF_CPU32 0x00810000
01029
01030 /* m68k relocs. */
01031
01032 #define R_68K_NONE 0 /* No reloc */
01033 #define R_68K_32 1 /* Direct 32 bit */
01034 #define R_68K_16 2 /* Direct 16 bit */
01035 #define R_68K_8 3 /* Direct 8 bit */
01036 #define R_68K_PC32 4 /* PC relative 32 bit */
01037 #define R_68K_PC16 5 /* PC relative 16 bit */
01038 #define R_68K_PC8 6 /* PC relative 8 bit */
01039 #define R_68K_GOT32 7 /* 32 bit PC relative GOT entry */
01040 #define R_68K_GOT16 8 /* 16 bit PC relative GOT entry */
01041 #define R_68K_GOT8 9 /* 8 bit PC relative GOT entry */
01042 #define R_68K_GOT32O 10 /* 32 bit GOT offset */
01043 #define R_68K_GOT16O 11 /* 16 bit GOT offset */
01044 #define R_68K_GOT8O 12 /* 8 bit GOT offset */
01045 #define R_68K_PLT32 13 /* 32 bit PC relative PLT address */
01046 #define R_68K_PLT16 14 /* 16 bit PC relative PLT address */
01047 #define R_68K_PLT8 15 /* 8 bit PC relative PLT address */
01048 #define R_68K_PLT32O 16 /* 32 bit PLT offset */
01049 #define R_68K_PLT16O 17 /* 16 bit PLT offset */
01050 #define R_68K_PLT8O 18 /* 8 bit PLT offset */
01051 #define R_68K_COPY 19 /* Copy symbol at runtime */
01052 #define R_68K_GLOB_DAT 20 /* Create GOT entry */
01053 #define R_68K_JMP_SLOT 21 /* Create PLT entry */
01054 #define R_68K_RELATIVE 22 /* Adjust by program base */
01055 /* Keep this the last entry. */
01056 #define R_68K_NUM 23
01057
01058 /* Intel 80386 specific definitions. */
01059
01060 /* i386 relocs. */
01061
01062 #define R_386_NONE 0 /* No reloc */
01063 #define R_386_32 1 /* Direct 32 bit */
01064 #define R_386_PC32 2 /* PC relative 32 bit */
01065 #define R_386_GOT32 3 /* 32 bit GOT entry */
01066 #define R_386_PLT32 4 /* 32 bit PLT address */
01067 #define R_386_COPY 5 /* Copy symbol at runtime */
01068 #define R_386_GLOB_DAT 6 /* Create GOT entry */
01069 #define R_386_JMP_SLOT 7 /* Create PLT entry */
01070 #define R_386_RELATIVE 8 /* Adjust by program base */
01071 #define R_386_GOTOFF 9 /* 32 bit offset to GOT */
01072 #define R_386_GOTPC 10 /* 32 bit PC relative offset to GOT */
01073 /* Keep this the last entry. */
01074 #define R_386_NUM 11
01075
01076 /* SUN SPARC specific definitions. */
01077
01078 /* Legal values for ST_TYPE subfield of st_info (symbol type). */
01079
01080 #define STT_REGISTER 13 /* Global register reserved to app. */
01081
01082 /* Values for Elf64_Ehdr.e_flags. */
01083
01084 #define EF_SPARCV9_MM 3
01085 #define EF_SPARCV9_TSO 0
01086 #define EF_SPARCV9_PSO 1
01087 #define EF_SPARCV9_RMO 2
01088 #define EF_SPARC_LEDATA 0x800000 /* little endian data */
01089 #define EF_SPARC_EXT_MASK 0xFFFF00
01090 #define EF_SPARC_32PLUS 0x000100 /* generic V8+ features */
01091 #define EF_SPARC_SUN_US1 0x000200 /* Sun UltraSPARC1 extensions */
01092 #define EF_SPARC_HAL_R1 0x000400 /* HAL R1 extensions */
01093 #define EF_SPARC_SUN_US3 0x000800 /* Sun UltraSPARCIII extensions */
01094
01095 /* SPARC relocs. */
01096
01097 #define R_SPARC_NONE 0 /* No reloc */
01098 #define R_SPARC_8 1 /* Direct 8 bit */
01099 #define R_SPARC_16 2 /* Direct 16 bit */
01100 #define R_SPARC_32 3 /* Direct 32 bit */
01101 #define R_SPARC_DISP8 4 /* PC relative 8 bit */
01102 #define R_SPARC_DISP16 5 /* PC relative 16 bit */
01103 #define R_SPARC_DISP32 6 /* PC relative 32 bit */
01104 #define R_SPARC_WDISP30 7 /* PC relative 30 bit shifted */
01105 #define R_SPARC_WDISP22 8 /* PC relative 22 bit shifted */
01106 #define R_SPARC_HI22 9 /* High 22 bit */
01107 #define R_SPARC_22 10 /* Direct 22 bit */
01108 #define R_SPARC_13 11 /* Direct 13 bit */
01109 #define R_SPARC_LO10 12 /* Truncated 10 bit */
01110 #define R_SPARC_GOT10 13 /* Truncated 10 bit GOT entry */
01111 #define R_SPARC_GOT13 14 /* 13 bit GOT entry */
01112 #define R_SPARC_GOT22 15 /* 22 bit GOT entry shifted */
01113 #define R_SPARC_PC10 16 /* PC relative 10 bit truncated */
01114 #define R_SPARC_PC22 17 /* PC relative 22 bit shifted */
01115 #define R_SPARC_WPLT30 18 /* 30 bit PC relative PLT address */
01116 #define R_SPARC_COPY 19 /* Copy symbol at runtime */
01117 #define R_SPARC_GLOB_DAT 20 /* Create GOT entry */
01118 #define R_SPARC_JMP_SLOT 21 /* Create PLT entry */
01119 #define R_SPARC_RELATIVE 22 /* Adjust by program base */
01120 #define R_SPARC_UA32 23 /* Direct 32 bit unaligned */
01121
01122 /* Additional Sparc64 relocs. */
01123
01124 #define R_SPARC_PLT32 24 /* Direct 32 bit ref to PLT entry */
01125 #define R_SPARC_HIPLT22 25 /* High 22 bit PLT entry */
01126 #define R_SPARC_LOPLT10 26 /* Truncated 10 bit PLT entry */
01127 #define R_SPARC_PCPLT32 27 /* PC rel 32 bit ref to PLT entry */
01128 #define R_SPARC_PCPLT22 28 /* PC rel high 22 bit PLT entry */
01129 #define R_SPARC_PCPLT10 29 /* PC rel trunc 10 bit PLT entry */
01130 #define R_SPARC_10 30 /* Direct 10 bit */
01131 #define R_SPARC_11 31 /* Direct 11 bit */
01132 #define R_SPARC_64 32 /* Direct 64 bit */
01133 #define R_SPARC_OLO10 33 /* 10bit with secondary 13bit addend */
01134 #define R_SPARC_HH22 34 /* Top 22 bits of direct 64 bit */
01135 #define R_SPARC_HM10 35 /* High middle 10 bits of ... */
01136 #define R_SPARC_LM22 36 /* Low middle 22 bits of ... */
01137 #define R_SPARC_PC_HH22 37 /* Top 22 bits of pc rel 64 bit */
01138 #define R_SPARC_PC_HM10 38 /* High middle 10 bit of ... */
01139 #define R_SPARC_PC_LM22 39 /* Low miggle 22 bits of ... */
01140 #define R_SPARC_WDISP16 40 /* PC relative 16 bit shifted */
01141 #define R_SPARC_WDISP19 41 /* PC relative 19 bit shifted */
01142 #define R_SPARC_7 43 /* Direct 7 bit */
01143 #define R_SPARC_5 44 /* Direct 5 bit */
01144 #define R_SPARC_6 45 /* Direct 6 bit */
01145 #define R_SPARC_DISP64 46 /* PC relative 64 bit */
01146 #define R_SPARC_PLT64 47 /* Direct 64 bit ref to PLT entry */
01147 #define R_SPARC_HIX22 48 /* High 22 bit complemented */
01148 #define R_SPARC_LOX10 49 /* Truncated 11 bit complemented */
01149 #define R_SPARC_H44 50 /* Direct high 12 of 44 bit */
01150 #define R_SPARC_M44 51 /* Direct mid 22 of 44 bit */
01151 #define R_SPARC_L44 52 /* Direct low 10 of 44 bit */
01152 #define R_SPARC_REGISTER 53 /* Global register usage */
01153 #define R_SPARC_UA64 54 /* Direct 64 bit unaligned */
01154 #define R_SPARC_UA16 55 /* Direct 16 bit unaligned */
01155 /* Keep this the last entry. */
01156 #define R_SPARC_NUM 56
01157
01158 /* For Sparc64, legal values for d_tag of Elf64_Dyn. */
01159
01160 #define DT_SPARC_REGISTER 0x70000001
01161 #define DT_SPARC_NUM 2
01162
01163 /* Bits present in AT_HWCAP, primarily for Sparc32. */
01164
01165 #define HWCAP_SPARC_FLUSH 1 /* The cpu supports flush insn. */
01166 #define HWCAP_SPARC_STBAR 2
01167 #define HWCAP_SPARC_SWAP 4
01168 #define HWCAP_SPARC_MULDIV 8
01169 #define HWCAP_SPARC_V9 16 /* The cpu is v9, so v8plus is ok. */
01170 #define HWCAP_SPARC_ULTRA3 32
01171
01172 /* MIPS R3000 specific definitions. */
01173
01174 /* Legal values for e_flags field of Elf32_Ehdr. */
01175
01176 #define EF_MIPS_NOREORDER 1 /* A .noreorder directive was used */
01177 #define EF_MIPS_PIC 2 /* Contains PIC code */
01178 #define EF_MIPS_CPIC 4 /* Uses PIC calling sequence */
01179 #define EF_MIPS_XGOT 8
01180 #define EF_MIPS_64BIT_WHIRL 16
01181 #define EF_MIPS_ABI2 32
01182 #define EF_MIPS_ABI_ON32 64
01183 #define EF_MIPS_ARCH 0xf0000000 /* MIPS architecture level */
01184
01185 /* Legal values for MIPS architecture level. */
01186
01187 #define EF_MIPS_ARCH_1 0x00000000 /* -mips1 code. */
01188 #define EF_MIPS_ARCH_2 0x10000000 /* -mips2 code. */
01189 #define EF_MIPS_ARCH_3 0x20000000 /* -mips3 code. */
01190 #define EF_MIPS_ARCH_4 0x30000000 /* -mips4 code. */
01191 #define EF_MIPS_ARCH_5 0x40000000 /* -mips5 code. */
01192 #define EF_MIPS_ARCH_32 0x60000000 /* MIPS32 code. */
01193 #define EF_MIPS_ARCH_64 0x70000000 /* MIPS64 code. */
01194
01195 /* The following are non-official names and should not be used. */
01196
01197 #define E_MIPS_ARCH_1 0x00000000 /* -mips1 code. */
01198 #define E_MIPS_ARCH_2 0x10000000 /* -mips2 code. */
01199 #define E_MIPS_ARCH_3 0x20000000 /* -mips3 code. */
01200 #define E_MIPS_ARCH_4 0x30000000 /* -mips4 code. */
01201 #define E_MIPS_ARCH_5 0x40000000 /* -mips5 code. */
01202 #define E_MIPS_ARCH_32 0x60000000 /* MIPS32 code. */
01203 #define E_MIPS_ARCH_64 0x70000000 /* MIPS64 code. */
01204
01205 /* Special section indices. */
01206
01207 #define SHN_MIPS_ACOMMON 0xff00 /* Allocated common symbols */
01208 #define SHN_MIPS_TEXT 0xff01 /* Allocated test symbols. */
01209 #define SHN_MIPS_DATA 0xff02 /* Allocated data symbols. */
01210 #define SHN_MIPS_SCOMMON 0xff03 /* Small common symbols */
01211 #define SHN_MIPS_SUNDEFINED 0xff04 /* Small undefined symbols */
01212
01213 /* Legal values for sh_type field of Elf32_Shdr. */
01214
01215 #define SHT_MIPS_LIBLIST 0x70000000 /* Shared objects used in link */
01216 #define SHT_MIPS_MSYM 0x70000001
01217 #define SHT_MIPS_CONFLICT 0x70000002 /* Conflicting symbols */
01218 #define SHT_MIPS_GPTAB 0x70000003 /* Global data area sizes */
01219 #define SHT_MIPS_UCODE 0x70000004 /* Reserved for SGI/MIPS compilers */
01220 #define SHT_MIPS_DEBUG 0x70000005 /* MIPS ECOFF debugging information*/
01221 #define SHT_MIPS_REGINFO 0x70000006 /* Register usage information */
01222 #define SHT_MIPS_PACKAGE 0x70000007
01223 #define SHT_MIPS_PACKSYM 0x70000008
01224 #define SHT_MIPS_RELD 0x70000009
01225 #define SHT_MIPS_IFACE 0x7000000b
01226 #define SHT_MIPS_CONTENT 0x7000000c
01227 #define SHT_MIPS_OPTIONS 0x7000000d /* Miscellaneous options. */
01228 #define SHT_MIPS_SHDR 0x70000010
01229 #define SHT_MIPS_FDESC 0x70000011
01230 #define SHT_MIPS_EXTSYM 0x70000012
01231 #define SHT_MIPS_DENSE 0x70000013
01232 #define SHT_MIPS_PDESC 0x70000014
01233 #define SHT_MIPS_LOCSYM 0x70000015
01234 #define SHT_MIPS_AUXSYM 0x70000016
01235 #define SHT_MIPS_OPTSYM 0x70000017
01236 #define SHT_MIPS_LOCSTR 0x70000018
01237 #define SHT_MIPS_LINE 0x70000019
01238 #define SHT_MIPS_RFDESC 0x7000001a
01239 #define SHT_MIPS_DELTASYM 0x7000001b
01240 #define SHT_MIPS_DELTAINST 0x7000001c
01241 #define SHT_MIPS_DELTACLASS 0x7000001d
01242 #define SHT_MIPS_DWARF 0x7000001e /* DWARF debugging information. */
01243 #define SHT_MIPS_DELTADECL 0x7000001f
01244 #define SHT_MIPS_SYMBOL_LIB 0x70000020
01245 #define SHT_MIPS_EVENTS 0x70000021 /* Event section. */
01246 #define SHT_MIPS_TRANSLATE 0x70000022
01247 #define SHT_MIPS_PIXIE 0x70000023
01248 #define SHT_MIPS_XLATE 0x70000024
01249 #define SHT_MIPS_XLATE_DEBUG 0x70000025
01250 #define SHT_MIPS_WHIRL 0x70000026
01251 #define SHT_MIPS_EH_REGION 0x70000027
01252 #define SHT_MIPS_XLATE_OLD 0x70000028
01253 #define SHT_MIPS_PDR_EXCEPTION 0x70000029
01254
01255 /* Legal values for sh_flags field of Elf32_Shdr. */
01256
01257 #define SHF_MIPS_GPREL 0x10000000 /* Must be part of global data area */
01258 #define SHF_MIPS_MERGE 0x20000000
01259 #define SHF_MIPS_ADDR 0x40000000
01260 #define SHF_MIPS_STRINGS 0x80000000
01261 #define SHF_MIPS_NOSTRIP 0x08000000
01262 #define SHF_MIPS_LOCAL 0x04000000
01263 #define SHF_MIPS_NAMES 0x02000000
01264 #define SHF_MIPS_NODUPE 0x01000000
01265
01266
01267 /* Symbol tables. */
01268
01269 /* MIPS specific values for `st_other'. */
01270 #define STO_MIPS_DEFAULT 0x0
01271 #define STO_MIPS_INTERNAL 0x1
01272 #define STO_MIPS_HIDDEN 0x2
01273 #define STO_MIPS_PROTECTED 0x3
01274 #define STO_MIPS_SC_ALIGN_UNUSED 0xff
01275
01276 /* MIPS specific values for `st_info'. */
01277 #define STB_MIPS_SPLIT_COMMON 13
01278
01279 /* Entries found in sections of type SHT_MIPS_GPTAB. */
01280
01281 typedef union
01282 {
01283 struct
01284 {
01285 Elf32_Word gt_current_g_value; /* -G value used for compilation */
01286 Elf32_Word gt_unused; /* Not used */
01287 } gt_header; /* First entry in section */
01288 struct
01289 {
01290 Elf32_Word gt_g_value; /* If this value were used for -G */
01291 Elf32_Word gt_bytes; /* This many bytes would be used */
01292 } gt_entry; /* Subsequent entries in section */
01293 } Elf32_gptab;
01294
01295 /* Entry found in sections of type SHT_MIPS_REGINFO. */
01296
01297 typedef struct
01298 {
01299 Elf32_Word ri_gprmask; /* General registers used */
01300 Elf32_Word ri_cprmask[4]; /* Coprocessor registers used */
01301 Elf32_Sword ri_gp_value; /* $gp register value */
01302 } Elf32_RegInfo;
01303
01304 /* Entries found in sections of type SHT_MIPS_OPTIONS. */
01305
01306 typedef struct
01307 {
01308 unsigned char kind; /* Determines interpretation of the
01309 variable part of descriptor. */
01310 unsigned char size; /* Size of descriptor, including header. */
01311 Elf32_Section section; /* Section header index of section affected,
01312 0 for global options. */
01313 Elf32_Word info; /* Kind-specific information. */
01314 } Elf_Options;
01315
01316 /* Values for `kind' field in Elf_Options. */
01317
01318 #define ODK_NULL 0 /* Undefined. */
01319 #define ODK_REGINFO 1 /* Register usage information. */
01320 #define ODK_EXCEPTIONS 2 /* Exception processing options. */
01321 #define ODK_PAD 3 /* Section padding options. */
01322 #define ODK_HWPATCH 4 /* Hardware workarounds performed */
01323 #define ODK_FILL 5 /* record the fill value used by the linker. */
01324 #define ODK_TAGS 6 /* reserve space for desktop tools to write. */
01325 #define ODK_HWAND 7 /* HW workarounds. 'AND' bits when merging. */
01326 #define ODK_HWOR 8 /* HW workarounds. 'OR' bits when merging. */
01327
01328 /* Values for `info' in Elf_Options for ODK_EXCEPTIONS entries. */
01329
01330 #define OEX_FPU_MIN 0x1f /* FPE's which MUST be enabled. */
01331 #define OEX_FPU_MAX 0x1f00 /* FPE's which MAY be enabled. */
01332 #define OEX_PAGE0 0x10000 /* page zero must be mapped. */
01333 #define OEX_SMM 0x20000 /* Force sequential memory mode? */
01334 #define OEX_FPDBUG 0x40000 /* Force floating point debug mode? */
01335 #define OEX_PRECISEFP OEX_FPDBUG
01336 #define OEX_DISMISS 0x80000 /* Dismiss invalid address faults? */
01337
01338 #define OEX_FPU_INVAL 0x10
01339 #define OEX_FPU_DIV0 0x08
01340 #define OEX_FPU_OFLO 0x04
01341 #define OEX_FPU_UFLO 0x02
01342 #define OEX_FPU_INEX 0x01
01343
01344 /* Masks for `info' in Elf_Options for an ODK_HWPATCH entry. */
01345
01346 #define OHW_R4KEOP 0x1 /* R4000 end-of-page patch. */
01347 #define OHW_R8KPFETCH 0x2 /* may need R8000 prefetch patch. */
01348 #define OHW_R5KEOP 0x4 /* R5000 end-of-page patch. */
01349 #define OHW_R5KCVTL 0x8 /* R5000 cvt.[ds].l bug. clean=1. */
01350
01351 #define OPAD_PREFIX 0x1
01352 #define OPAD_POSTFIX 0x2
01353 #define OPAD_SYMBOL 0x4
01354
01355 /* Entry found in `.options' section. */
01356
01357 typedef struct
01358 {
01359 Elf32_Word hwp_flags1; /* Extra flags. */
01360 Elf32_Word hwp_flags2; /* Extra flags. */
01361 } Elf_Options_Hw;
01362
01363 /* Masks for `info' in ElfOptions for ODK_HWAND and ODK_HWOR entries. */
01364
01365 #define OHWA0_R4KEOP_CHECKED 0x00000001
01366 #define OHWA1_R4KEOP_CLEAN 0x00000002
01367
01368 /* MIPS relocs. */
01369
01370 #define R_MIPS_NONE 0 /* No reloc */
01371 #define R_MIPS_16 1 /* Direct 16 bit */
01372 #define R_MIPS_32 2 /* Direct 32 bit */
01373 #define R_MIPS_REL32 3 /* PC relative 32 bit */
01374 #define R_MIPS_26 4 /* Direct 26 bit shifted */
01375 #define R_MIPS_HI16 5 /* High 16 bit */
01376 #define R_MIPS_LO16 6 /* Low 16 bit */
01377 #define R_MIPS_GPREL16 7 /* GP relative 16 bit */
01378 #define R_MIPS_LITERAL 8 /* 16 bit literal entry */
01379 #define R_MIPS_GOT16 9 /* 16 bit GOT entry */
01380 #define R_MIPS_PC16 10 /* PC relative 16 bit */
01381 #define R_MIPS_CALL16 11 /* 16 bit GOT entry for function */
01382 #define R_MIPS_GPREL32 12 /* GP relative 32 bit */
01383
01384 #define R_MIPS_SHIFT5 16
01385 #define R_MIPS_SHIFT6 17
01386 #define R_MIPS_64 18
01387 #define R_MIPS_GOT_DISP 19
01388 #define R_MIPS_GOT_PAGE 20
01389 #define R_MIPS_GOT_OFST 21
01390 #define R_MIPS_GOT_HI16 22
01391 #define R_MIPS_GOT_LO16 23
01392 #define R_MIPS_SUB 24
01393 #define R_MIPS_INSERT_A 25
01394 #define R_MIPS_INSERT_B 26
01395 #define R_MIPS_DELETE 27
01396 #define R_MIPS_HIGHER 28
01397 #define R_MIPS_HIGHEST 29
01398 #define R_MIPS_CALL_HI16 30
01399 #define R_MIPS_CALL_LO16 31
01400 #define R_MIPS_SCN_DISP 32
01401 #define R_MIPS_REL16 33
01402 #define R_MIPS_ADD_IMMEDIATE 34
01403 #define R_MIPS_PJUMP 35
01404 #define R_MIPS_RELGOT 36
01405 #define R_MIPS_JALR 37
01406 /* Keep this the last entry. */
01407 #define R_MIPS_NUM 38
01408
01409 /* Legal values for p_type field of Elf32_Phdr. */
01410
01411 #define PT_MIPS_REGINFO 0x70000000 /* Register usage information */
01412 #define PT_MIPS_RTPROC 0x70000001 /* Runtime procedure table. */
01413 #define PT_MIPS_OPTIONS 0x70000002
01414
01415 /* Special program header types. */
01416
01417 #define PF_MIPS_LOCAL 0x10000000
01418
01419 /* Legal values for d_tag field of Elf32_Dyn. */
01420
01421 #define DT_MIPS_RLD_VERSION 0x70000001 /* Runtime linker interface version */
01422 #define DT_MIPS_TIME_STAMP 0x70000002 /* Timestamp */
01423 #define DT_MIPS_ICHECKSUM 0x70000003 /* Checksum */
01424 #define DT_MIPS_IVERSION 0x70000004 /* Version string (string tbl index) */
01425 #define DT_MIPS_FLAGS 0x70000005 /* Flags */
01426 #define DT_MIPS_BASE_ADDRESS 0x70000006 /* Base address */
01427 #define DT_MIPS_MSYM 0x70000007
01428 #define DT_MIPS_CONFLICT 0x70000008 /* Address of CONFLICT section */
01429 #define DT_MIPS_LIBLIST 0x70000009 /* Address of LIBLIST section */
01430 #define DT_MIPS_LOCAL_GOTNO 0x7000000a /* Number of local GOT entries */
01431 #define DT_MIPS_CONFLICTNO 0x7000000b /* Number of CONFLICT entries */
01432 #define DT_MIPS_LIBLISTNO 0x70000010 /* Number of LIBLIST entries */
01433 #define DT_MIPS_SYMTABNO 0x70000011 /* Number of DYNSYM entries */
01434 #define DT_MIPS_UNREFEXTNO 0x70000012 /* First external DYNSYM */
01435 #define DT_MIPS_GOTSYM 0x70000013 /* First GOT entry in DYNSYM */
01436 #define DT_MIPS_HIPAGENO 0x70000014 /* Number of GOT page table entries */
01437 #define DT_MIPS_RLD_MAP 0x70000016 /* Address of run time loader map. */
01438 #define DT_MIPS_DELTA_CLASS 0x70000017 /* Delta C++ class definition. */
01439 #define DT_MIPS_DELTA_CLASS_NO 0x70000018 /* Number of entries in
01440 DT_MIPS_DELTA_CLASS. */
01441 #define DT_MIPS_DELTA_INSTANCE 0x70000019 /* Delta C++ class instances. */
01442 #define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a /* Number of entries in
01443 DT_MIPS_DELTA_INSTANCE. */
01444 #define DT_MIPS_DELTA_RELOC 0x7000001b /* Delta relocations. */
01445 #define DT_MIPS_DELTA_RELOC_NO 0x7000001c /* Number of entries in
01446 DT_MIPS_DELTA_RELOC. */
01447 #define DT_MIPS_DELTA_SYM 0x7000001d /* Delta symbols that Delta
01448 relocations refer to. */
01449 #define DT_MIPS_DELTA_SYM_NO 0x7000001e /* Number of entries in
01450 DT_MIPS_DELTA_SYM. */
01451 #define DT_MIPS_DELTA_CLASSSYM 0x70000020 /* Delta symbols that hold the
01452 class declaration. */
01453 #define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 /* Number of entries in
01454 DT_MIPS_DELTA_CLASSSYM. */
01455 #define DT_MIPS_CXX_FLAGS 0x70000022 /* Flags indicating for C++ flavor. */
01456 #define DT_MIPS_PIXIE_INIT 0x70000023
01457 #define DT_MIPS_SYMBOL_LIB 0x70000024
01458 #define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025
01459 #define DT_MIPS_LOCAL_GOTIDX 0x70000026
01460 #define DT_MIPS_HIDDEN_GOTIDX 0x70000027
01461 #define DT_MIPS_PROTECTED_GOTIDX 0x70000028
01462 #define DT_MIPS_OPTIONS 0x70000029 /* Address of .options. */
01463 #define DT_MIPS_INTERFACE 0x7000002a /* Address of .interface. */
01464 #define DT_MIPS_DYNSTR_ALIGN 0x7000002b
01465 #define DT_MIPS_INTERFACE_SIZE 0x7000002c /* Size of the .interface section. */
01466 #define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d /* Address of rld_text_rsolve
01467 function stored in GOT. */
01468 #define DT_MIPS_PERF_SUFFIX 0x7000002e /* Default suffix of dso to be added
01469 by rld on dlopen() calls. */
01470 #define DT_MIPS_COMPACT_SIZE 0x7000002f /* (O32)Size of compact rel section. */
01471 #define DT_MIPS_GP_VALUE 0x70000030 /* GP value for aux GOTs. */
01472 #define DT_MIPS_AUX_DYNAMIC 0x70000031 /* Address of aux .dynamic. */
01473 #define DT_MIPS_NUM 0x32
01474
01475 /* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */
01476
01477 #define RHF_NONE 0 /* No flags */
01478 #define RHF_QUICKSTART (1 << 0) /* Use quickstart */
01479 #define RHF_NOTPOT (1 << 1) /* Hash size not power of 2 */
01480 #define RHF_NO_LIBRARY_REPLACEMENT (1 << 2) /* Ignore LD_LIBRARY_PATH */
01481 #define RHF_NO_MOVE (1 << 3)
01482 #define RHF_SGI_ONLY (1 << 4)
01483 #define RHF_GUARANTEE_INIT (1 << 5)
01484 #define RHF_DELTA_C_PLUS_PLUS (1 << 6)
01485 #define RHF_GUARANTEE_START_INIT (1 << 7)
01486 #define RHF_PIXIE (1 << 8)
01487 #define RHF_DEFAULT_DELAY_LOAD (1 << 9)
01488 #define RHF_REQUICKSTART (1 << 10)
01489 #define RHF_REQUICKSTARTED (1 << 11)
01490 #define RHF_CORD (1 << 12)
01491 #define RHF_NO_UNRES_UNDEF (1 << 13)
01492 #define RHF_RLD_ORDER_SAFE (1 << 14)
01493
01494 /* Entries found in sections of type SHT_MIPS_LIBLIST. */
01495
01496 typedef struct
01497 {
01498 Elf32_Word l_name; /* Name (string table index) */
01499 Elf32_Word l_time_stamp; /* Timestamp */
01500 Elf32_Word l_checksum; /* Checksum */
01501 Elf32_Word l_version; /* Interface version */
01502 Elf32_Word l_flags; /* Flags */
01503 } Elf32_Lib;
01504
01505 typedef struct
01506 {
01507 Elf64_Word l_name; /* Name (string table index) */
01508 Elf64_Word l_time_stamp; /* Timestamp */
01509 Elf64_Word l_checksum; /* Checksum */
01510 Elf64_Word l_version; /* Interface version */
01511 Elf64_Word l_flags; /* Flags */
01512 } Elf64_Lib;
01513
01514
01515 /* Legal values for l_flags. */
01516
01517 #define LL_NONE 0
01518 #define LL_EXACT_MATCH (1 << 0) /* Require exact match */
01519 #define LL_IGNORE_INT_VER (1 << 1) /* Ignore interface version */
01520 #define LL_REQUIRE_MINOR (1 << 2)
01521 #define LL_EXPORTS (1 << 3)
01522 #define LL_DELAY_LOAD (1 << 4)
01523 #define LL_DELTA (1 << 5)
01524
01525 /* Entries found in sections of type SHT_MIPS_CONFLICT. */
01526
01527 typedef Elf32_Addr Elf32_Conflict;
01528
01529
01530 /* HPPA specific definitions. */
01531
01532 /* Legal values for e_flags field of Elf32_Ehdr. */
01533
01534 #define EF_PARISC_TRAPNIL 0x00010000 /* Trap nil pointer dereference. */
01535 #define EF_PARISC_EXT 0x00020000 /* Program uses arch. extensions. */
01536 #define EF_PARISC_LSB 0x00040000 /* Program expects little endian. */
01537 #define EF_PARISC_WIDE 0x00080000 /* Program expects wide mode. */
01538 #define EF_PARISC_NO_KABP 0x00100000 /* No kernel assisted branch
01539 prediction. */
01540 #define EF_PARISC_LAZYSWAP 0x00400000 /* Allow lazy swapping. */
01541 #define EF_PARISC_ARCH 0x0000ffff /* Architecture version. */
01542
01543 /* Defined values for `e_flags & EF_PARISC_ARCH' are: */
01544
01545 #define EFA_PARISC_1_0 0x020b /* PA-RISC 1.0 big-endian. */
01546 #define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */
01547 #define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */
01548
01549 /* Additional section indeces. */
01550
01551 #define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared
01552 symbols in ANSI C. */
01553 #define SHN_PARISC_HUGE_COMMON 0xff01 /* Common blocks in huge model. */
01554
01555 /* Legal values for sh_type field of Elf32_Shdr. */
01556
01557 #define SHT_PARISC_EXT 0x70000000 /* Contains product specific ext. */
01558 #define SHT_PARISC_UNWIND 0x70000001 /* Unwind information. */
01559 #define SHT_PARISC_DOC 0x70000002 /* Debug info for optimized code. */
01560
01561 /* Legal values for sh_flags field of Elf32_Shdr. */
01562
01563 #define SHF_PARISC_SHORT 0x20000000 /* Section with short addressing. */
01564 #define SHF_PARISC_HUGE 0x40000000 /* Section far from gp. */
01565 #define SHF_PARISC_SBP 0x80000000 /* Static branch prediction code. */
01566
01567 /* Legal values for ST_TYPE subfield of st_info (symbol type). */
01568
01569 #define STT_PARISC_MILLICODE 13 /* Millicode function entry point. */
01570
01571 #define STT_HP_OPAQUE (STT_LOOS + 0x1)
01572 #define STT_HP_STUB (STT_LOOS + 0x2)
01573
01574 /* HPPA relocs. */
01575
01576 #define R_PARISC_NONE 0 /* No reloc. */
01577 #define R_PARISC_DIR32 1 /* Direct 32-bit reference. */
01578 #define R_PARISC_DIR21L 2 /* Left 21 bits of eff. address. */
01579 #define R_PARISC_DIR17R 3 /* Right 17 bits of eff. address. */
01580 #define R_PARISC_DIR17F 4 /* 17 bits of eff. address. */
01581 #define R_PARISC_DIR14R 6 /* Right 14 bits of eff. address. */
01582 #define R_PARISC_PCREL32 9 /* 32-bit rel. address. */
01583 #define R_PARISC_PCREL21L 10 /* Left 21 bits of rel. address. */
01584 #define R_PARISC_PCREL17R 11 /* Right 17 bits of rel. address. */
01585 #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
01586 #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
01587 #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
01588 #define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */
01589 #define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */
01590 #define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */
01591 #define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */
01592 #define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */
01593 #define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */
01594 #define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */
01595 #define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */
01596 #define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */
01597 #define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */
01598 #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
01599 #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
01600 #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
01601 #define R_PARISC_FPTR64 64 /* 64 bits function address. */
01602 #define R_PARISC_PLABEL32 65 /* 32 bits function address. */
01603 #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
01604 #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
01605 #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
01606 #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
01607 #define R_PARISC_PCREL16F 77 /* 16 bits PC-rel. address. */
01608 #define R_PARISC_PCREL16WF 78 /* 16 bits PC-rel. address. */
01609 #define R_PARISC_PCREL16DF 79 /* 16 bits PC-rel. address. */
01610 #define R_PARISC_DIR64 80 /* 64 bits of eff. address. */
01611 #define R_PARISC_DIR14WR 83 /* 14 bits of eff. address. */
01612 #define R_PARISC_DIR14DR 84 /* 14 bits of eff. address. */
01613 #define R_PARISC_DIR16F 85 /* 16 bits of eff. address. */
01614 #define R_PARISC_DIR16WF 86 /* 16 bits of eff. address. */
01615 #define R_PARISC_DIR16DF 87 /* 16 bits of eff. address. */
01616 #define R_PARISC_GPREL64 88 /* 64 bits of GP-rel. address. */
01617 #define R_PARISC_GPREL14WR 91 /* GP-rel. address, right 14 bits. */
01618 #define R_PARISC_GPREL14DR 92 /* GP-rel. address, right 14 bits. */
01619 #define R_PARISC_GPREL16F 93 /* 16 bits GP-rel. address. */
01620 #define R_PARISC_GPREL16WF 94 /* 16 bits GP-rel. address. */
01621 #define R_PARISC_GPREL16DF 95 /* 16 bits GP-rel. address. */
01622 #define R_PARISC_LTOFF64 96 /* 64 bits LT-rel. address. */
01623 #define R_PARISC_LTOFF14WR 99 /* LT-rel. address, right 14 bits. */
01624 #define R_PARISC_LTOFF14DR 100 /* LT-rel. address, right 14 bits. */
01625 #define R_PARISC_LTOFF16F 101 /* 16 bits LT-rel. address. */
01626 #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
01627 #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
01628 #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
01629 #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
01630 #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
01631 #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */
01632 #define R_PARISC_PLTOFF16F 117 /* 16 bits LT-rel. address. */
01633 #define R_PARISC_PLTOFF16WF 118 /* 16 bits PLT-rel. address. */
01634 #define R_PARISC_PLTOFF16DF 119 /* 16 bits PLT-rel. address. */
01635 #define R_PARISC_LTOFF_FPTR64 120 /* 64 bits LT-rel. function ptr. */
01636 #define R_PARISC_LTOFF_FPTR14WR 123 /* LT-rel. fct. ptr., right 14 bits. */
01637 #define R_PARISC_LTOFF_FPTR14DR 124 /* LT-rel. fct. ptr., right 14 bits. */
01638 #define R_PARISC_LTOFF_FPTR16F 125 /* 16 bits LT-rel. function ptr. */
01639 #define R_PARISC_LTOFF_FPTR16WF 126 /* 16 bits LT-rel. function ptr. */
01640 #define R_PARISC_LTOFF_FPTR16DF 127 /* 16 bits LT-rel. function ptr. */
01641 #define R_PARISC_LORESERVE 128
01642 #define R_PARISC_COPY 128 /* Copy relocation. */
01643 #define R_PARISC_IPLT 129 /* Dynamic reloc, imported PLT */
01644 #define R_PARISC_EPLT 130 /* Dynamic reloc, exported PLT */
01645 #define R_PARISC_TPREL32 153 /* 32 bits TP-rel. address. */
01646 #define R_PARISC_TPREL21L 154 /* TP-rel. address, left 21 bits. */
01647 #define R_PARISC_TPREL14R 158 /* TP-rel. address, right 14 bits. */
01648 #define R_PARISC_LTOFF_TP21L 162 /* LT-TP-rel. address, left 21 bits. */
01649 #define R_PARISC_LTOFF_TP14R 166 /* LT-TP-rel. address, right 14 bits.*/
01650 #define R_PARISC_LTOFF_TP14F 167 /* 14 bits LT-TP-rel. address. */
01651 #define R_PARISC_TPREL64 216 /* 64 bits TP-rel. address. */
01652 #define R_PARISC_TPREL14WR 219 /* TP-rel. address, right 14 bits. */
01653 #define R_PARISC_TPREL14DR 220 /* TP-rel. address, right 14 bits. */
01654 #define R_PARISC_TPREL16F 221 /* 16 bits TP-rel. address. */
01655 #define R_PARISC_TPREL16WF 222 /* 16 bits TP-rel. address. */
01656 #define R_PARISC_TPREL16DF 223 /* 16 bits TP-rel. address. */
01657 #define R_PARISC_LTOFF_TP64 224 /* 64 bits LT-TP-rel. address. */
01658 #define R_PARISC_LTOFF_TP14WR 227 /* LT-TP-rel. address, right 14 bits.*/
01659 #define R_PARISC_LTOFF_TP14DR 228 /* LT-TP-rel. address, right 14 bits.*/
01660 #define R_PARISC_LTOFF_TP16F 229 /* 16 bits LT-TP-rel. address. */
01661 #define R_PARISC_LTOFF_TP16WF 230 /* 16 bits LT-TP-rel. address. */
01662 #define R_PARISC_LTOFF_TP16DF 231 /* 16 bits LT-TP-rel. address. */
01663 #define R_PARISC_HIRESERVE 255
01664
01665 /* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */
01666
01667 #define PT_HP_TLS (PT_LOOS + 0x0)
01668 #define PT_HP_CORE_NONE (PT_LOOS + 0x1)
01669 #define PT_HP_CORE_VERSION (PT_LOOS + 0x2)
01670 #define PT_HP_CORE_KERNEL (PT_LOOS + 0x3)
01671 #define PT_HP_CORE_COMM (PT_LOOS + 0x4)
01672 #define PT_HP_CORE_PROC (PT_LOOS + 0x5)
01673 #define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6)
01674 #define PT_HP_CORE_STACK (PT_LOOS + 0x7)
01675 #define PT_HP_CORE_SHM (PT_LOOS + 0x8)
01676 #define PT_HP_CORE_MMF (PT_LOOS + 0x9)
01677 #define PT_HP_PARALLEL (PT_LOOS + 0x10)
01678 #define PT_HP_FASTBIND (PT_LOOS + 0x11)
01679 #define PT_HP_OPT_ANNOT (PT_LOOS + 0x12)
01680 #define PT_HP_HSL_ANNOT (PT_LOOS + 0x13)
01681 #define PT_HP_STACK (PT_LOOS + 0x14)
01682
01683 #define PT_PARISC_ARCHEXT 0x70000000
01684 #define PT_PARISC_UNWIND 0x70000001
01685
01686 /* Legal values for p_flags field of Elf32_Phdr/Elf64_Phdr. */
01687
01688 #define PF_PARISC_SBP 0x08000000
01689
01690 #define PF_HP_PAGE_SIZE 0x00100000
01691 #define PF_HP_FAR_SHARED 0x00200000
01692 #define PF_HP_NEAR_SHARED 0x00400000
01693 #define PF_HP_CODE 0x01000000
01694 #define PF_HP_MODIFY 0x02000000
01695 #define PF_HP_LAZYSWAP 0x04000000
01696 #define PF_HP_SBP 0x08000000
01697
01698
01699 /* Alpha specific definitions. */
01700
01701 /* Legal values for e_flags field of Elf64_Ehdr. */
01702
01703 #define EF_ALPHA_32BIT 1 /* All addresses must be < 2GB. */
01704 #define EF_ALPHA_CANRELAX 2 /* Relocations for relaxing exist. */
01705
01706 /* Legal values for sh_type field of Elf64_Shdr. */
01707
01708 /* These two are primerily concerned with ECOFF debugging info. */
01709 #define SHT_ALPHA_DEBUG 0x70000001
01710 #define SHT_ALPHA_REGINFO 0x70000002
01711
01712 /* Legal values for sh_flags field of Elf64_Shdr. */
01713
01714 #define SHF_ALPHA_GPREL 0x10000000
01715
01716 /* Legal values for st_other field of Elf64_Sym. */
01717 #define STO_ALPHA_NOPV 0x80 /* No PV required. */
01718 #define STO_ALPHA_STD_GPLOAD 0x88 /* PV only used for initial ldgp. */
01719
01720 /* Alpha relocs. */
01721
01722 #define R_ALPHA_NONE 0 /* No reloc */
01723 #define R_ALPHA_REFLONG 1 /* Direct 32 bit */
01724 #define R_ALPHA_REFQUAD 2 /* Direct 64 bit */
01725 #define R_ALPHA_GPREL32 3 /* GP relative 32 bit */
01726 #define R_ALPHA_LITERAL 4 /* GP relative 16 bit w/optimization */
01727 #define R_ALPHA_LITUSE 5 /* Optimization hint for LITERAL */
01728 #define R_ALPHA_GPDISP 6 /* Add displacement to GP */
01729 #define R_ALPHA_BRADDR 7 /* PC+4 relative 23 bit shifted */
01730 #define R_ALPHA_HINT 8 /* PC+4 relative 16 bit shifted */
01731 #define R_ALPHA_SREL16 9 /* PC relative 16 bit */
01732 #define R_ALPHA_SREL32 10 /* PC relative 32 bit */
01733 #define R_ALPHA_SREL64 11 /* PC relative 64 bit */
01734 #define R_ALPHA_GPRELHIGH 17 /* GP relative 32 bit, high 16 bits */
01735 #define R_ALPHA_GPRELLOW 18 /* GP relative 32 bit, low 16 bits */
01736 #define R_ALPHA_GPREL16 19 /* GP relative 16 bit */
01737 #define R_ALPHA_COPY 24 /* Copy symbol at runtime */
01738 #define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */
01739 #define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */
01740 #define R_ALPHA_RELATIVE 27 /* Adjust by program base */
01741 /* Keep this the last entry. */
01742 #define R_ALPHA_NUM 28
01743
01744
01745 /* PowerPC specific declarations */
01746
01747 /* Values for Elf32/64_Ehdr.e_flags. */
01748 #define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag */
01749
01750 /* Cygnus local bits below */
01751 #define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag*/
01752 #define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib
01753 flag */
01754
01755 /* PowerPC relocations defined by the ABIs */
01756 #define R_PPC_NONE 0
01757 #define R_PPC_ADDR32 1 /* 32bit absolute address */
01758 #define R_PPC_ADDR24 2 /* 26bit address, 2 bits ignored. */
01759 #define R_PPC_ADDR16 3 /* 16bit absolute address */
01760 #define R_PPC_ADDR16_LO 4 /* lower 16bit of absolute address */
01761 #define R_PPC_ADDR16_HI 5 /* high 16bit of absolute address */
01762 #define R_PPC_ADDR16_HA 6 /* adjusted high 16bit */
01763 #define R_PPC_ADDR14 7 /* 16bit address, 2 bits ignored */
01764 #define R_PPC_ADDR14_BRTAKEN 8
01765 #define R_PPC_ADDR14_BRNTAKEN 9
01766 #define R_PPC_REL24 10 /* PC relative 26 bit */
01767 #define R_PPC_REL14 11 /* PC relative 16 bit */
01768 #define R_PPC_REL14_BRTAKEN 12
01769 #define R_PPC_REL14_BRNTAKEN 13
01770 #define R_PPC_GOT16 14
01771 #define R_PPC_GOT16_LO 15
01772 #define R_PPC_GOT16_HI 16
01773 #define R_PPC_GOT16_HA 17
01774 #define R_PPC_PLTREL24 18
01775 #define R_PPC_COPY 19
01776 #define R_PPC_GLOB_DAT 20
01777 #define R_PPC_JMP_SLOT 21
01778 #define R_PPC_RELATIVE 22
01779 #define R_PPC_LOCAL24PC 23
01780 #define R_PPC_UADDR32 24
01781 #define R_PPC_UADDR16 25
01782 #define R_PPC_REL32 26
01783 #define R_PPC_PLT32 27
01784 #define R_PPC_PLTREL32 28
01785 #define R_PPC_PLT16_LO 29
01786 #define R_PPC_PLT16_HI 30
01787 #define R_PPC_PLT16_HA 31
01788 #define R_PPC_SDAREL16 32
01789 #define R_PPC_SECTOFF 33
01790 #define R_PPC_SECTOFF_LO 34
01791 #define R_PPC_SECTOFF_HI 35
01792 #define R_PPC_SECTOFF_HA 36
01793 /* Keep this the last entry. */
01794 #define R_PPC_NUM 37
01795
01796 /* The remaining relocs are from the Embedded ELF ABI, and are not
01797 in the SVR4 ELF ABI. */
01798 #define R_PPC_EMB_NADDR32 101
01799 #define R_PPC_EMB_NADDR16 102
01800 #define R_PPC_EMB_NADDR16_LO 103
01801 #define R_PPC_EMB_NADDR16_HI 104
01802 #define R_PPC_EMB_NADDR16_HA 105
01803 #define R_PPC_EMB_SDAI16 106
01804 #define R_PPC_EMB_SDA2I16 107
01805 #define R_PPC_EMB_SDA2REL 108
01806 #define R_PPC_EMB_SDA21 109 /* 16 bit offset in SDA */
01807 #define R_PPC_EMB_MRKREF 110
01808 #define R_PPC_EMB_RELSEC16 111
01809 #define R_PPC_EMB_RELST_LO 112
01810 #define R_PPC_EMB_RELST_HI 113
01811 #define R_PPC_EMB_RELST_HA 114
01812 #define R_PPC_EMB_BIT_FLD 115
01813 #define R_PPC_EMB_RELSDA 116 /* 16 bit relative offset in SDA */
01814
01815 /* Diab tool relocations. */
01816 #define R_PPC_DIAB_SDA21_LO 180 /* like EMB_SDA21, but lower 16 bit */
01817 #define R_PPC_DIAB_SDA21_HI 181 /* like EMB_SDA21, but high 16 bit */
01818 #define R_PPC_DIAB_SDA21_HA 182 /* like EMB_SDA21, adjusted high 16 */
01819 #define R_PPC_DIAB_RELSDA_LO 183 /* like EMB_RELSDA, but lower 16 bit */
01820 #define R_PPC_DIAB_RELSDA_HI 184 /* like EMB_RELSDA, but high 16 bit */
01821 #define R_PPC_DIAB_RELSDA_HA 185 /* like EMB_RELSDA, adjusted high 16 */
01822
01823 /* This is a phony reloc to handle any old fashioned TOC16 references
01824 that may still be in object files. */
01825 #define R_PPC_TOC16 255
01826
01827
01828 /* ARM specific declarations */
01829
01830 /* Processor specific flags for the ELF header e_flags field. */
01831 #define EF_ARM_RELEXEC 0x01
01832 #define EF_ARM_HASENTRY 0x02
01833 #define EF_ARM_INTERWORK 0x04
01834 #define EF_ARM_APCS_26 0x08
01835 #define EF_ARM_APCS_FLOAT 0x10
01836 #define EF_ARM_PIC 0x20
01837 #define EF_ARM_ALIGN8 0x40 /* 8-bit structure alignment is in use */
01838 #define EF_ARM_NEW_ABI 0x80
01839 #define EF_ARM_OLD_ABI 0x100
01840
01841 /* Other constants defined in the ARM ELF spec. version B-01. */
01842 /* NB. These conflict with values defined above. */
01843 #define EF_ARM_SYMSARESORTED 0x04
01844 #define EF_ARM_DYNSYMSUSESEGIDX 0x08
01845 #define EF_ARM_MAPSYMSFIRST 0x10
01846 #define EF_ARM_EABIMASK 0XFF000000
01847
01848 #define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
01849 #define EF_ARM_EABI_UNKNOWN 0x00000000
01850 #define EF_ARM_EABI_VER1 0x01000000
01851 #define EF_ARM_EABI_VER2 0x02000000
01852
01853 /* Additional symbol types for Thumb */
01854 #define STT_ARM_TFUNC 0xd
01855
01856 /* ARM-specific values for sh_flags */
01857 #define SHF_ARM_ENTRYSECT 0x10000000 /* Section contains an entry point */
01858 #define SHF_ARM_COMDEF 0x80000000 /* Section may be multiply defined
01859 in the input to a link step */
01860
01861 /* ARM-specific program header flags */
01862 #define PF_ARM_SB 0x10000000 /* Segment contains the location
01863 addressed by the static base */
01864
01865 /* ARM relocs. */
01866 #define R_ARM_NONE 0 /* No reloc */
01867 #define R_ARM_PC24 1 /* PC relative 26 bit branch */
01868 #define R_ARM_ABS32 2 /* Direct 32 bit */
01869 #define R_ARM_REL32 3 /* PC relative 32 bit */
01870 #define R_ARM_PC13 4
01871 #define R_ARM_ABS16 5 /* Direct 16 bit */
01872 #define R_ARM_ABS12 6 /* Direct 12 bit */
01873 #define R_ARM_THM_ABS5 7
01874 #define R_ARM_ABS8 8 /* Direct 8 bit */
01875 #define R_ARM_SBREL32 9
01876 #define R_ARM_THM_PC22 10
01877 #define R_ARM_THM_PC8 11
01878 #define R_ARM_AMP_VCALL9 12
01879 #define R_ARM_SWI24 13
01880 #define R_ARM_THM_SWI8 14
01881 #define R_ARM_XPC25 15
01882 #define R_ARM_THM_XPC22 16
01883 #define R_ARM_COPY 20 /* Copy symbol at runtime */
01884 #define R_ARM_GLOB_DAT 21 /* Create GOT entry */
01885 #define R_ARM_JUMP_SLOT 22 /* Create PLT entry */
01886 #define R_ARM_RELATIVE 23 /* Adjust by program base */
01887 #define R_ARM_GOTOFF 24 /* 32 bit offset to GOT */
01888 #define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */
01889 #define R_ARM_GOT32 26 /* 32 bit GOT entry */
01890 #define R_ARM_PLT32 27 /* 32 bit PLT address */
01891 #define R_ARM_ALU_PCREL_7_0 32
01892 #define R_ARM_ALU_PCREL_15_8 33
01893 #define R_ARM_ALU_PCREL_23_15 34
01894 #define R_ARM_LDR_SBREL_11_0 35
01895 #define R_ARM_ALU_SBREL_19_12 36
01896 #define R_ARM_ALU_SBREL_27_20 37
01897 #define R_ARM_GNU_VTENTRY 100
01898 #define R_ARM_GNU_VTINHERIT 101
01899 #define R_ARM_THM_PC11 102 /* thumb unconditional branch */
01900 #define R_ARM_THM_PC9 103 /* thumb conditional branch */
01901 #define R_ARM_RXPC25 249
01902 #define R_ARM_RSBREL32 250
01903 #define R_ARM_THM_RPC22 251
01904 #define R_ARM_RREL32 252
01905 #define R_ARM_RABS22 253
01906 #define R_ARM_RPC24 254
01907 #define R_ARM_RBASE 255
01908 /* Keep this the last entry. */
01909 #define R_ARM_NUM 256
01910
01911 /* IA-64 specific declarations. */
01912
01913 /* Processor specific flags for the Ehdr e_flags field. */
01914 #define EF_IA_64_MASKOS 0x0000000f /* os-specific flags */
01915 #define EF_IA_64_ABI64 0x00000010 /* 64-bit ABI */
01916 #define EF_IA_64_ARCH 0xff000000 /* arch. version mask */
01917
01918 /* Processor specific values for the Phdr p_type field. */
01919 #define PT_IA_64_ARCHEXT (PT_LOPROC + 0) /* arch extension bits */
01920 #define PT_IA_64_UNWIND (PT_LOPROC + 1) /* ia64 unwind bits */
01921
01922 /* Processor specific flags for the Phdr p_flags field. */
01923 #define PF_IA_64_NORECOV 0x80000000 /* spec insns w/o recovery */
01924
01925 /* Processor specific values for the Shdr sh_type field. */
01926 #define SHT_IA_64_EXT (SHT_LOPROC + 0) /* extension bits */
01927 #define SHT_IA_64_UNWIND (SHT_LOPROC + 1) /* unwind bits */
01928
01929 /* Processor specific flags for the Shdr sh_flags field. */
01930 #define SHF_IA_64_SHORT 0x10000000 /* section near gp */
01931 #define SHF_IA_64_NORECOV 0x20000000 /* spec insns w/o recovery */
01932
01933 /* Processor specific values for the Dyn d_tag field. */
01934 #define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0)
01935 #define DT_IA_64_NUM 1
01936
01937 /* IA-64 relocations. */
01938 #define R_IA64_NONE 0x00 /* none */
01939 #define R_IA64_IMM14 0x21 /* symbol + addend, add imm14 */
01940 #define R_IA64_IMM22 0x22 /* symbol + addend, add imm22 */
01941 #define R_IA64_IMM64 0x23 /* symbol + addend, mov imm64 */
01942 #define R_IA64_DIR32MSB 0x24 /* symbol + addend, data4 MSB */
01943 #define R_IA64_DIR32LSB 0x25 /* symbol + addend, data4 LSB */
01944 #define R_IA64_DIR64MSB 0x26 /* symbol + addend, data8 MSB */
01945 #define R_IA64_DIR64LSB 0x27 /* symbol + addend, data8 LSB */
01946 #define R_IA64_GPREL22 0x2a /* @gprel(sym + add), add imm22 */
01947 #define R_IA64_GPREL64I 0x2b /* @gprel(sym + add), mov imm64 */
01948 #define R_IA64_GPREL32MSB 0x2c /* @gprel(sym + add), data4 MSB */
01949 #define R_IA64_GPREL32LSB 0x2d /* @gprel(sym + add), data4 LSB */
01950 #define R_IA64_GPREL64MSB 0x2e /* @gprel(sym + add), data8 MSB */
01951 #define R_IA64_GPREL64LSB 0x2f /* @gprel(sym + add), data8 LSB */
01952 #define R_IA64_LTOFF22 0x32 /* @ltoff(sym + add), add imm22 */
01953 #define R_IA64_LTOFF64I 0x33 /* @ltoff(sym + add), mov imm64 */
01954 #define R_IA64_PLTOFF22 0x3a /* @pltoff(sym + add), add imm22 */
01955 #define R_IA64_PLTOFF64I 0x3b /* @pltoff(sym + add), mov imm64 */
01956 #define R_IA64_PLTOFF64MSB 0x3e /* @pltoff(sym + add), data8 MSB */
01957 #define R_IA64_PLTOFF64LSB 0x3f /* @pltoff(sym + add), data8 LSB */
01958 #define R_IA64_FPTR64I 0x43 /* @fptr(sym + add), mov imm64 */
01959 #define R_IA64_FPTR32MSB 0x44 /* @fptr(sym + add), data4 MSB */
01960 #define R_IA64_FPTR32LSB 0x45 /* @fptr(sym + add), data4 LSB */
01961 #define R_IA64_FPTR64MSB 0x46 /* @fptr(sym + add), data8 MSB */
01962 #define R_IA64_FPTR64LSB 0x47 /* @fptr(sym + add), data8 LSB */
01963 #define R_IA64_PCREL60B 0x48 /* @pcrel(sym + add), brl */
01964 #define R_IA64_PCREL21B 0x49 /* @pcrel(sym + add), ptb, call */
01965 #define R_IA64_PCREL21M 0x4a /* @pcrel(sym + add), chk.s */
01966 #define R_IA64_PCREL21F 0x4b /* @pcrel(sym + add), fchkf */
01967 #define R_IA64_PCREL32MSB 0x4c /* @pcrel(sym + add), data4 MSB */
01968 #define R_IA64_PCREL32LSB 0x4d /* @pcrel(sym + add), data4 LSB */
01969 #define R_IA64_PCREL64MSB 0x4e /* @pcrel(sym + add), data8 MSB */
01970 #define R_IA64_PCREL64LSB 0x4f /* @pcrel(sym + add), data8 LSB */
01971 #define R_IA64_LTOFF_FPTR22 0x52 /* @ltoff(@fptr(s+a)), imm22 */
01972 #define R_IA64_LTOFF_FPTR64I 0x53 /* @ltoff(@fptr(s+a)), imm64 */
01973 #define R_IA64_LTOFF_FPTR32MSB 0x54 /* @ltoff(@fptr(s+a)), data4 MSB */
01974 #define R_IA64_LTOFF_FPTR32LSB 0x55 /* @ltoff(@fptr(s+a)), data4 LSB */
01975 #define R_IA64_LTOFF_FPTR64MSB 0x56 /* @ltoff(@fptr(s+a)), data8 MSB */
01976 #define R_IA64_LTOFF_FPTR64LSB 0x57 /* @ltoff(@fptr(s+a)), data8 LSB */
01977 #define R_IA64_SEGREL32MSB 0x5c /* @segrel(sym + add), data4 MSB */
01978 #define R_IA64_SEGREL32LSB 0x5d /* @segrel(sym + add), data4 LSB */
01979 #define R_IA64_SEGREL64MSB 0x5e /* @segrel(sym + add), data8 MSB */
01980 #define R_IA64_SEGREL64LSB 0x5f /* @segrel(sym + add), data8 LSB */
01981 #define R_IA64_SECREL32MSB 0x64 /* @secrel(sym + add), data4 MSB */
01982 #define R_IA64_SECREL32LSB 0x65 /* @secrel(sym + add), data4 LSB */
01983 #define R_IA64_SECREL64MSB 0x66 /* @secrel(sym + add), data8 MSB */
01984 #define R_IA64_SECREL64LSB 0x67 /* @secrel(sym + add), data8 LSB */
01985 #define R_IA64_REL32MSB 0x6c /* data 4 + REL */
01986 #define R_IA64_REL32LSB 0x6d /* data 4 + REL */
01987 #define R_IA64_REL64MSB 0x6e /* data 8 + REL */
01988 #define R_IA64_REL64LSB 0x6f /* data 8 + REL */
01989 #define R_IA64_LTV32MSB 0x74 /* symbol + addend, data4 MSB */
01990 #define R_IA64_LTV32LSB 0x75 /* symbol + addend, data4 LSB */
01991 #define R_IA64_LTV64MSB 0x76 /* symbol + addend, data8 MSB */
01992 #define R_IA64_LTV64LSB 0x77 /* symbol + addend, data8 LSB */
01993 #define R_IA64_PCREL21BI 0x79 /* @pcrel(sym + add), 21bit inst */
01994 #define R_IA64_PCREL22 0x7a /* @pcrel(sym + add), 22bit inst */
01995 #define R_IA64_PCREL64I 0x7b /* @pcrel(sym + add), 64bit inst */
01996 #define R_IA64_IPLTMSB 0x80 /* dynamic reloc, imported PLT, MSB */
01997 #define R_IA64_IPLTLSB 0x81 /* dynamic reloc, imported PLT, LSB */
01998 #define R_IA64_COPY 0x84 /* copy relocation */
01999 #define R_IA64_SUB 0x85 /* Addend and symbol difference */
02000 #define R_IA64_LTOFF22X 0x86 /* LTOFF22, relaxable. */
02001 #define R_IA64_LDXMOV 0x87 /* Use of LTOFF22X. */
02002 #define R_IA64_TPREL14 0x91 /* @tprel(sym + add), imm14 */
02003 #define R_IA64_TPREL22 0x92 /* @tprel(sym + add), imm22 */
02004 #define R_IA64_TPREL64I 0x93 /* @tprel(sym + add), imm64 */
02005 #define R_IA64_TPREL64MSB 0x96 /* @tprel(sym + add), data8 MSB */
02006 #define R_IA64_TPREL64LSB 0x97 /* @tprel(sym + add), data8 LSB */
02007 #define R_IA64_LTOFF_TPREL22 0x9a /* @ltoff(@tprel(s+a)), imm2 */
02008 #define R_IA64_DTPMOD64MSB 0xa6 /* @dtpmod(sym + add), data8 MSB */
02009 #define R_IA64_DTPMOD64LSB 0xa7 /* @dtpmod(sym + add), data8 LSB */
02010 #define R_IA64_LTOFF_DTPMOD22 0xaa /* @ltoff(@dtpmod(sym + add)), imm22 */
02011 #define R_IA64_DTPREL14 0xb1 /* @dtprel(sym + add), imm14 */
02012 #define R_IA64_DTPREL22 0xb2 /* @dtprel(sym + add), imm22 */
02013 #define R_IA64_DTPREL64I 0xb3 /* @dtprel(sym + add), imm64 */
02014 #define R_IA64_DTPREL32MSB 0xb4 /* @dtprel(sym + add), data4 MSB */
02015 #define R_IA64_DTPREL32LSB 0xb5 /* @dtprel(sym + add), data4 LSB */
02016 #define R_IA64_DTPREL64MSB 0xb6 /* @dtprel(sym + add), data8 MSB */
02017 #define R_IA64_DTPREL64LSB 0xb7 /* @dtprel(sym + add), data8 LSB */
02018 #define R_IA64_LTOFF_DTPREL22 0xba /* @ltoff(@dtprel(s+a)), imm22 */
02019
02020 /* SH specific declarations */
02021
02022 /* SH relocs. */
02023 #define R_SH_NONE 0
02024 #define R_SH_DIR32 1
02025 #define R_SH_REL32 2
02026 #define R_SH_DIR8WPN 3
02027 #define R_SH_IND12W 4
02028 #define R_SH_DIR8WPL 5
02029 #define R_SH_DIR8WPZ 6
02030 #define R_SH_DIR8BP 7
02031 #define R_SH_DIR8W 8
02032 #define R_SH_DIR8L 9
02033 #define R_SH_SWITCH16 25
02034 #define R_SH_SWITCH32 26
02035 #define R_SH_USES 27
02036 #define R_SH_COUNT 28
02037 #define R_SH_ALIGN 29
02038 #define R_SH_CODE 30
02039 #define R_SH_DATA 31
02040 #define R_SH_LABEL 32
02041 #define R_SH_SWITCH8 33
02042 #define R_SH_GNU_VTINHERIT 34
02043 #define R_SH_GNU_VTENTRY 35
02044 #define R_SH_GOT32 160
02045 #define R_SH_PLT32 161
02046 #define R_SH_COPY 162
02047 #define R_SH_GLOB_DAT 163
02048 #define R_SH_JMP_SLOT 164
02049 #define R_SH_RELATIVE 165
02050 #define R_SH_GOTOFF 166
02051 #define R_SH_GOTPC 167
02052 /* Keep this the last entry. */
02053 #define R_SH_NUM 256
02054
02055 /* Additional s390 relocs */
02056
02057 #define R_390_NONE 0 /* No reloc. */
02058 #define R_390_8 1 /* Direct 8 bit. */
02059 #define R_390_12 2 /* Direct 12 bit. */
02060 #define R_390_16 3 /* Direct 16 bit. */
02061 #define R_390_32 4 /* Direct 32 bit. */
02062 #define R_390_PC32 5 /* PC relative 32 bit. */
02063 #define R_390_GOT12 6 /* 12 bit GOT offset. */
02064 #define R_390_GOT32 7 /* 32 bit GOT offset. */
02065 #define R_390_PLT32 8 /* 32 bit PC relative PLT address. */
02066 #define R_390_COPY 9 /* Copy symbol at runtime. */
02067 #define R_390_GLOB_DAT 10 /* Create GOT entry. */
02068 #define R_390_JMP_SLOT 11 /* Create PLT entry. */
02069 #define R_390_RELATIVE 12 /* Adjust by program base. */
02070 #define R_390_GOTOFF 13 /* 32 bit offset to GOT. */
02071 #define R_390_GOTPC 14 /* 32 bit PC relative offset to GOT. */
02072 #define R_390_GOT16 15 /* 16 bit GOT offset. */
02073 #define R_390_PC16 16 /* PC relative 16 bit. */
02074 #define R_390_PC16DBL 17 /* PC relative 16 bit shifted by 1. */
02075 #define R_390_PLT16DBL 18 /* 16 bit PC rel. PLT shifted by 1. */
02076 #define R_390_PC32DBL 19 /* PC relative 32 bit shifted by 1. */
02077 #define R_390_PLT32DBL 20 /* 32 bit PC rel. PLT shifted by 1. */
02078 #define R_390_GOTPCDBL 21 /* 32 bit PC rel. GOT shifted by 1. */
02079 #define R_390_64 22 /* Direct 64 bit. */
02080 #define R_390_PC64 23 /* PC relative 64 bit. */
02081 #define R_390_GOT64 24 /* 64 bit GOT offset. */
02082 #define R_390_PLT64 25 /* 64 bit PC relative PLT address. */
02083 #define R_390_GOTENT 26 /* 32 bit PC rel. to GOT entry >> 1. */
02084
02085 /* Keep this the last entry. */
02086 #define R_390_NUM 27
02087
02088 /* CRIS relocations. */
02089 #define R_CRIS_NONE 0
02090 #define R_CRIS_8 1
02091 #define R_CRIS_16 2
02092 #define R_CRIS_32 3
02093 #define R_CRIS_8_PCREL 4
02094 #define R_CRIS_16_PCREL 5
02095 #define R_CRIS_32_PCREL 6
02096 #define R_CRIS_GNU_VTINHERIT 7
02097 #define R_CRIS_GNU_VTENTRY 8
02098 #define R_CRIS_COPY 9
02099 #define R_CRIS_GLOB_DAT 10
02100 #define R_CRIS_JUMP_SLOT 11
02101 #define R_CRIS_RELATIVE 12
02102 #define R_CRIS_16_GOT 13
02103 #define R_CRIS_32_GOT 14
02104 #define R_CRIS_16_GOTPLT 15
02105 #define R_CRIS_32_GOTPLT 16
02106 #define R_CRIS_32_GOTREL 17
02107 #define R_CRIS_32_PLT_GOTREL 18
02108 #define R_CRIS_32_PLT_PCREL 19
02109
02110 #define R_CRIS_NUM 20
02111
02112 /* AMD x86-64 relocations. */
02113 #define R_X86_64_NONE 0 /* No reloc */
02114 #define R_X86_64_64 1 /* Direct 64 bit */
02115 #define R_X86_64_PC32 2 /* PC relative 32 bit signed */
02116 #define R_X86_64_GOT32 3 /* 32 bit GOT entry */
02117 #define R_X86_64_PLT32 4 /* 32 bit PLT address */
02118 #define R_X86_64_COPY 5 /* Copy symbol at runtime */
02119 #define R_X86_64_GLOB_DAT 6 /* Create GOT entry */
02120 #define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */
02121 #define R_X86_64_RELATIVE 8 /* Adjust by program base */
02122 #define R_X86_64_GOTPCREL 9 /* 32 bit signed pc relative
02123 offset to GOT */
02124 #define R_X86_64_32 10 /* Direct 32 bit zero extended */
02125 #define R_X86_64_32S 11 /* Direct 32 bit sign extended */
02126 #define R_X86_64_16 12 /* Direct 16 bit zero extended */
02127 #define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */
02128 #define R_X86_64_8 14 /* Direct 8 bit sign extended */
02129 #define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */
02130
02131 #define R_X86_64_NUM 16
02132
02133 #ifdef __cplusplus
02134 }
02135 #endif
02136
02137 #endif /* elf.h */
1.2.15