1 /** 2 * D header file for DragonFlyBSD. 3 * 4 * Authors: Diederik de Groot(port:DragonFlyBSD) 5 * Copied: From core/sys/freebsd/sys 6 */ 7 module core.sys.dragonflybsd.sys.elf_common; 8 9 version (DragonFlyBSD): 10 11 extern (C): 12 13 import core.stdc.stdint; 14 public import core.sys.elf; 15 16 struct Elf_Note 17 { 18 uint32_t n_namesz; 19 uint32_t n_descsz; 20 uint32_t n_type; 21 } 22 23 struct Elf_GNU_Hash_Header 24 { 25 uint32_t gh_nbuckets; 26 uint32_t gh_symndx; 27 uint32_t gh_maskwords; 28 uint32_t gh_shift2; 29 } 30 31 enum OLD_EI_BRAND = 8; 32 33 extern (D) pure @safe 34 { 35 auto IS_ELF(T)(T ehdr) { return ehdr.e_ident[EI_MAG0] == ELFMAG0 && 36 ehdr.e_ident[EI_MAG1] == ELFMAG1 && 37 ehdr.e_ident[EI_MAG2] == ELFMAG2 && 38 ehdr.e_ident[EI_MAG3] == ELFMAG3; } 39 } 40 41 enum EM_486 = 6; 42 enum EM_MIPS_RS4_BE = 10; 43 enum EM_ALPHA_STD = 41; 44 45 enum PT_SUNW_EH_FRAME = PT_GNU_EH_FRAME; 46 47 enum SHT_GNU_INCREMENTAL_INPUTS = 0x6fff4700; 48 49 enum SHT_SUNW_verdef = 0x6ffffffd; 50 enum SHT_SUNW_verneed = 0x6ffffffe; 51 enum SHT_SUNW_versym = 0x6fffffff; 52 53 enum NT_PRSTATUS = 1; 54 enum NT_FPREGSET = 2; 55 enum NT_PRPSINFO = 3; 56 enum NT_TASKSTRUCT = 4; 57 enum NT_AUXV = 6; 58 59 enum DT_USED = 0x7ffffffe; 60 61 enum DF_1_BIND_NOW = 0x00000001; 62 63 alias VER_NDX VER_DEF_IDX; 64 65 enum VER_FLG_INFO = 0x4; 66 67 enum VER_NDX_GIVEN = 2; 68 enum VER_NDX_HIDDEN = 32768; 69 70 extern (D) pure @safe 71 { 72 auto VER_NDX(V)(V v) { return v & ~(1u << 15); } 73 } 74 75 enum VER_NEED_WEAK = 32768; 76 enum VER_NEED_HIDDEN = VER_NDX_HIDDEN; 77 alias VER_NDX VER_NEED_IDX; 78 79 enum VERSYM_HIDDEN = 0x8000; 80 enum VERSYM_VERSION = 0x7fff; 81 enum ELF_VER_CHR = '@';