The OpenD Programming Language

1 /**
2  * D header file for Solaris.
3  *
4  * $(LINK2 http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/sys/elf_SPARC.h, illumos sys/elf_SPARC.h)
5  */
6 module core.sys.solaris.sys.elf_SPARC;
7 
8 version (Solaris):
9 extern (C):
10 nothrow:
11 
12 enum EF_SPARC_32PLUS_MASK = 0xffff00;
13 enum EF_SPARC_32PLUS      = 0x000100;
14 enum EF_SPARC_EXT_MASK    = 0xffff00;
15 enum EF_SPARC_SUN_US1     = 0x000200;
16 enum EF_SPARC_HAL_R1      = 0x000400;
17 enum EF_SPARC_SUN_US3     = 0x000800;
18 
19 enum EF_SPARCV9_MM  = 0x3;
20 enum EF_SPARCV9_TSO = 0x0;
21 enum EF_SPARCV9_PSO = 0x1;
22 enum EF_SPARCV9_RMO = 0x2;
23 
24 enum R_SPARC_NONE             = 0;
25 enum R_SPARC_8                = 1;
26 enum R_SPARC_16               = 2;
27 enum R_SPARC_32               = 3;
28 enum R_SPARC_DISP8            = 4;
29 enum R_SPARC_DISP16           = 5;
30 enum R_SPARC_DISP32           = 6;
31 enum R_SPARC_WDISP30          = 7;
32 enum R_SPARC_WDISP22          = 8;
33 enum R_SPARC_HI22             = 9;
34 enum R_SPARC_22               = 10;
35 enum R_SPARC_13               = 11;
36 enum R_SPARC_LO10             = 12;
37 enum R_SPARC_GOT10            = 13;
38 enum R_SPARC_GOT13            = 14;
39 enum R_SPARC_GOT22            = 15;
40 enum R_SPARC_PC10             = 16;
41 enum R_SPARC_PC22             = 17;
42 enum R_SPARC_WPLT30           = 18;
43 enum R_SPARC_COPY             = 19;
44 enum R_SPARC_GLOB_DAT         = 20;
45 enum R_SPARC_JMP_SLOT         = 21;
46 enum R_SPARC_RELATIVE         = 22;
47 enum R_SPARC_UA32             = 23;
48 enum R_SPARC_PLT32            = 24;
49 enum R_SPARC_HIPLT22          = 25;
50 enum R_SPARC_LOPLT10          = 26;
51 enum R_SPARC_PCPLT32          = 27;
52 enum R_SPARC_PCPLT22          = 28;
53 enum R_SPARC_PCPLT10          = 29;
54 enum R_SPARC_10               = 30;
55 enum R_SPARC_11               = 31;
56 enum R_SPARC_64               = 32;
57 enum R_SPARC_OLO10            = 33;
58 enum R_SPARC_HH22             = 34;
59 enum R_SPARC_HM10             = 35;
60 enum R_SPARC_LM22             = 36;
61 enum R_SPARC_PC_HH22          = 37;
62 enum R_SPARC_PC_HM10          = 38;
63 enum R_SPARC_PC_LM22          = 39;
64 enum R_SPARC_WDISP16          = 40;
65 enum R_SPARC_WDISP19          = 41;
66 enum R_SPARC_GLOB_JMP         = 42;
67 enum R_SPARC_7                = 43;
68 enum R_SPARC_5                = 44;
69 enum R_SPARC_6                = 45;
70 enum R_SPARC_DISP64           = 46;
71 enum R_SPARC_PLT64            = 47;
72 enum R_SPARC_HIX22            = 48;
73 enum R_SPARC_LOX10            = 49;
74 enum R_SPARC_H44              = 50;
75 enum R_SPARC_M44              = 51;
76 enum R_SPARC_L44              = 52;
77 enum R_SPARC_REGISTER         = 53;
78 enum R_SPARC_UA64             = 54;
79 enum R_SPARC_UA16             = 55;
80 enum R_SPARC_TLS_GD_HI22      = 56;
81 enum R_SPARC_TLS_GD_LO10      = 57;
82 enum R_SPARC_TLS_GD_ADD       = 58;
83 enum R_SPARC_TLS_GD_CALL      = 59;
84 enum R_SPARC_TLS_LDM_HI22     = 60;
85 enum R_SPARC_TLS_LDM_LO10     = 61;
86 enum R_SPARC_TLS_LDM_ADD      = 62;
87 enum R_SPARC_TLS_LDM_CALL     = 63;
88 enum R_SPARC_TLS_LDO_HIX22    = 64;
89 enum R_SPARC_TLS_LDO_LOX10    = 65;
90 enum R_SPARC_TLS_LDO_ADD      = 66;
91 enum R_SPARC_TLS_IE_HI22      = 67;
92 enum R_SPARC_TLS_IE_LO10      = 68;
93 enum R_SPARC_TLS_IE_LD        = 69;
94 enum R_SPARC_TLS_IE_LDX       = 70;
95 enum R_SPARC_TLS_IE_ADD       = 71;
96 enum R_SPARC_TLS_LE_HIX22     = 72;
97 enum R_SPARC_TLS_LE_LOX10     = 73;
98 enum R_SPARC_TLS_DTPMOD32     = 74;
99 enum R_SPARC_TLS_DTPMOD64     = 75;
100 enum R_SPARC_TLS_DTPOFF32     = 76;
101 enum R_SPARC_TLS_DTPOFF64     = 77;
102 enum R_SPARC_TLS_TPOFF32      = 78;
103 enum R_SPARC_TLS_TPOFF64      = 79;
104 enum R_SPARC_GOTDATA_HIX22    = 80;
105 enum R_SPARC_GOTDATA_LOX10    = 81;
106 enum R_SPARC_GOTDATA_OP_HIX22 = 82;
107 enum R_SPARC_GOTDATA_OP_LOX10 = 83;
108 enum R_SPARC_GOTDATA_OP       = 84;
109 enum R_SPARC_H34              = 85;
110 enum R_SPARC_SIZE32           = 86;
111 enum R_SPARC_SIZE64           = 87;
112 enum R_SPARC_NUM              = 88;
113 
114 enum R_SPARC_L34 = R_SPARC_L44;
115 
116 enum ELF_SPARC_MAXPGSZ   = 0x10000;
117 enum ELF_SPARCV9_MAXPGSZ = 0x100000;
118 
119 enum SHT_SPARC_GOTDATA = 0x70000000;
120 
121 enum SHN_BEFORE = 0xff00;
122 enum SHN_AFTER  =  0xff01;
123 
124 enum STT_SPARC_REGISTER = 13;
125 
126 enum DT_SPARC_REGISTER = 0x70000001;
127 
128 enum STO_SPARC_REGISTER_G1 = 0x1;
129 enum STO_SPARC_REGISTER_G2 = 0x2;
130 enum STO_SPARC_REGISTER_G3 = 0x3;
131 enum STO_SPARC_REGISTER_G4 = 0x4;
132 enum STO_SPARC_REGISTER_G5 = 0x5;
133 enum STO_SPARC_REGISTER_G6 = 0x6;
134 enum STO_SPARC_REGISTER_G7 = 0x7;
135 
136 enum M_PLT_INSSIZE  = 4;
137 enum M_PLT_XNumber  = 4;
138 enum M_GOT_XDYNAMIC = 0;
139 enum M_GOT_XNumber  = 1;
140 
141 enum M32_WORD_ALIGN   = 4;
142 enum M32_PLT_ENTSIZE  = 12;
143 enum M32_PLT_ALIGN    = M_WORD_ALIGN;
144 enum M32_GOT_ENTSIZE  = 4;
145 enum M32_GOT_MAXSMALL = 2048;
146 enum M32_PLT_RESERVSZ = (M_PLT_XNumber * M32_PLT_ENTSIZE);
147 
148 enum M64_WORD_ALIGN   = 8;
149 enum M64_PLT_ENTSIZE  = 32;
150 enum M64_PLT_ALIGN    = 256;
151 enum M64_GOT_ENTSIZE  = 8;
152 enum M64_GOT_MAXSMALL = 1024;
153 enum M64_PLT_RESERVSZ = (M_PLT_XNumber * M64_PLT_ENTSIZE);
154 
155 enum M64_PLT_NEARPLTS = 0x8000;
156 enum M64_PLT_FENTSIZE = 24;
157 enum M64_PLT_PSIZE    = 8;
158 enum M64_PLT_FBLKCNTS = 160;
159 enum M64_PLT_FBLOCKSZ = (M64_PLT_FBLKCNTS * M64_PLT_ENTSIZE);
160 
161 version (_ELF64)
162 {
163     enum M_WORD_ALIGN   = M64_WORD_ALIGN;
164     enum M_PLT_ENTSIZE  = M64_PLT_ENTSIZE;
165     enum M_PLT_ALIGN    = M64_PLT_ALIGN;
166     enum M_PLT_RESERVSZ = M64_PLT_RESERVSZ;
167     enum M_GOT_ENTSIZE  = M64_GOT_ENTSIZE;
168     enum M_GOT_MAXSMALL = M64_GOT_MAXSMALL;
169 }
170 else
171 {
172     enum M_WORD_ALIGN   = M32_WORD_ALIGN;
173     enum M_PLT_ENTSIZE  = M32_PLT_ENTSIZE;
174     enum M_PLT_ALIGN    = M32_PLT_ALIGN;
175     enum M_PLT_RESERVSZ = M32_PLT_RESERVSZ;
176     enum M_GOT_ENTSIZE  = M32_GOT_ENTSIZE;
177     enum M_GOT_MAXSMALL = M32_GOT_MAXSMALL;
178 }