1 /**
2  * D header file for Solaris.
3  *
4  * $(LINK2 http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/sys/elf_386.h, illumos sys/elf_386.h)
5  */
6 module core.sys.solaris.sys.elf_386;
7 
8 version (Solaris):
9 extern (C):
10 nothrow:
11 
12 enum R_386_NONE         = 0;
13 enum R_386_32           = 1;
14 enum R_386_PC32         = 2;
15 enum R_386_GOT32        = 3;
16 enum R_386_PLT32        = 4;
17 enum R_386_COPY         = 5;
18 enum R_386_GLOB_DAT     = 6;
19 enum R_386_JMP_SLOT     = 7;
20 enum R_386_RELATIVE     = 8;
21 enum R_386_GOTOFF       = 9;
22 enum R_386_GOTPC        = 10;
23 enum R_386_32PLT        = 11;
24 enum R_386_TLS_GD_PLT   = 12;
25 enum R_386_TLS_LDM_PLT  = 13;
26 enum R_386_TLS_TPOFF    = 14;
27 enum R_386_TLS_IE       = 15;
28 enum R_386_TLS_GOTIE    = 16;
29 enum R_386_TLS_LE       = 17;
30 enum R_386_TLS_GD       = 18;
31 enum R_386_TLS_LDM      = 19;
32 enum R_386_16           = 20;
33 enum R_386_PC16         = 21;
34 enum R_386_8            = 22;
35 enum R_386_PC8          = 23;
36 enum R_386_UNKNOWN24    = 24;
37 enum R_386_UNKNOWN25    = 25;
38 enum R_386_UNKNOWN26    = 26;
39 enum R_386_UNKNOWN27    = 27;
40 enum R_386_UNKNOWN28    = 28;
41 enum R_386_UNKNOWN29    = 29;
42 enum R_386_UNKNOWN30    = 30;
43 enum R_386_UNKNOWN31    = 31;
44 enum R_386_TLS_LDO_32   = 32;
45 enum R_386_UNKNOWN33    = 33;
46 enum R_386_UNKNOWN34    = 34;
47 enum R_386_TLS_DTPMOD32 = 35;
48 enum R_386_TLS_DTPOFF32 = 36;
49 enum R_386_UNKNOWN37    = 37;
50 enum R_386_SIZE32       = 38;
51 enum R_386_NUM          = 39;
52 
53 enum ELF_386_MAXPGSZ = 0x10000;
54 
55 enum SHN_BEFORE = 0xff00;
56 enum SHN_AFTER  = 0xff01;
57 
58 enum M_PLT_INSSIZE  = 6;
59 enum M_PLT_XNumber  = 1;
60 enum M_GOT_XDYNAMIC = 0;
61 enum M_GOT_XLINKMAP = 1;
62 enum M_GOT_XRTLD    = 2;
63 enum M_GOT_XNumber  = 3;
64 
65 enum M32_WORD_ALIGN   = 4;
66 enum M32_PLT_ENTSIZE  = 16;
67 enum M32_PLT_ALIGN    = M32_WORD_ALIGN;
68 enum M32_GOT_ENTSIZE  = 4;
69 enum M32_PLT_RESERVSZ = (M_PLT_XNumber * M32_PLT_ENTSIZE);
70 
71 version (_ELF64) {}
72 else
73 {
74     enum M_WORD_ALIGN   = M32_WORD_ALIGN;
75     enum M_PLT_ENTSIZE  = M32_PLT_ENTSIZE;
76     enum M_PLT_ALIGN    = M32_PLT_ALIGN;
77     enum M_PLT_RESERVSZ = M32_PLT_RESERVSZ;
78     enum M_GOT_ENTSIZE  = M32_GOT_ENTSIZE;
79 }