1 /** 2 * D header file for NetBSD. 3 * 4 * http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/sys/exec_elf.h 5 */ 6 module core.sys.netbsd.sys.elf_common; 7 8 version (NetBSD): 9 extern (C): 10 pure: 11 nothrow: 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) 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_AVR32 = 6317; 42 enum EM_ALPHA_EXP = 36902; 43 44 enum EM_486 = 6; 45 enum EM_MIPS_RS4_BE = 10; 46 enum EM_ALPHA_STD = 41; 47 48 enum SHT_SUNW_dof = 0x6ffffff4; 49 enum SHT_SUNW_cap = 0x6ffffff5; 50 enum SHT_SUNW_SIGNATURE = 0x6ffffff6; 51 enum SHT_SUNW_verdef = 0x6ffffffd; 52 enum SHT_SUNW_verneed = 0x6ffffffe; 53 enum SHT_SUNW_versym = 0x6fffffff; 54 55 enum PT_SUNWDTRACE = 0x6ffffffc; 56 enum PT_SUNWCAP = 0x6ffffffd; 57 enum DT_MAXPOSTAGS = 34; 58 enum DT_SUNW_AUXILIARY = 0x6000000d; 59 enum DT_SUNW_RTLDINF = 0x6000000e; 60 enum DT_SUNW_FILTER = 0x6000000f; 61 enum DT_SUNW_CAP = 0x60000010; 62 enum DT_DEPRECATED_SPARC_REGISTER = 0x7000001; 63 enum DT_USED = 0x7ffffffe; 64 65 enum DF_1_BIND_NOW = 0x00000001; 66 67 enum NT_PRSTATUS = 1; 68 enum NT_FPREGSET = 2; 69 enum NT_PRPSINFO = 3; 70 enum NT_THRMISC = 7; 71 enum NT_PROCSTAT_PROC = 8; 72 enum NT_PROCSTAT_FILES = 9; 73 enum NT_PROCSTAT_VMMAP = 10; 74 enum NT_PROCSTAT_GROUPS = 11; 75 enum NT_PROCSTAT_UMASK = 12; 76 enum NT_PROCSTAT_RLIMIT = 13; 77 enum NT_PROCSTAT_OSREL = 14; 78 enum NT_PROCSTAT_PSSTRINGS = 15; 79 enum NT_PROCSTAT_AUXV = 16; 80 81 enum STV_EXPORTED = 4; 82 enum STV_SINGLETON = 5; 83 enum STV_ELIMINATE = 6; 84 85 alias VER_NDX VER_DEF_IDX; 86 87 enum VER_NEED_WEAK = 32768; 88 enum VER_NEED_HIDDEN = VER_NDX_HIDDEN; 89 alias VER_NDX VER_NEED_IDX; 90 91 enum VER_NDX_GIVEN = 2; 92 enum VER_NDX_HIDDEN = 32768; 93 94 extern (D) 95 { 96 auto VER_NDX(V)(V v) { return v & ~(1u << 15); } 97 } 98 99 enum CA_SUNW_NULL = 0; 100 enum CA_SUNW_HW_1 = 1; 101 enum CA_SUNW_SF_1 = 2; 102 103 enum SYMINFO_FLG_DIRECTBIND = 0x0010; 104 enum SYMINFO_FLG_NOEXTDIRECT = 0x0020; 105 enum SYMINFO_FLG_FILTER = 0x0002; 106 enum SYMINFO_FLG_AUXILIARY = 0x0040; 107 108 enum SYMINFO_BT_NONE = 0xfffd; 109 enum SYMINFO_BT_EXTERN = 0xfffc;