OLD | NEW |
1 // Inferno utils/5l/l.h | 1 // Inferno utils/5l/l.h |
2 // http://code.google.com/p/inferno-os/source/browse/utils/5l/l.h | 2 // http://code.google.com/p/inferno-os/source/browse/utils/5l/l.h |
3 // | 3 // |
4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. | 4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. |
5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) | 5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) |
6 // Portions Copyright © 1997-1999 Vita Nuova Limited | 6 // Portions Copyright © 1997-1999 Vita Nuova Limited |
7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov
a.com) | 7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov
a.com) |
8 // Portions Copyright © 2004,2006 Bruce Ellis | 8 // Portions Copyright © 2004,2006 Bruce Ellis |
9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) | 9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) |
10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others | 10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 { | 101 { |
102 Adr from; | 102 Adr from; |
103 Adr to; | 103 Adr to; |
104 union | 104 union |
105 { | 105 { |
106 int32 u0regused; | 106 int32 u0regused; |
107 Prog* u0forwd; | 107 Prog* u0forwd; |
108 } u0; | 108 } u0; |
109 Prog* cond; | 109 Prog* cond; |
110 Prog* link; | 110 Prog* link; |
| 111 Prog* pcrel; |
111 int32 pc; | 112 int32 pc; |
112 int32 line; | 113 int32 line; |
113 int32 spadj; | 114 int32 spadj; |
114 uchar mark; | 115 uchar mark; |
115 uchar optab; | 116 uchar optab; |
116 uchar as; | 117 uchar as; |
117 uchar scond; | 118 uchar scond; |
118 uchar reg; | 119 uchar reg; |
119 uchar align; // unused | 120 uchar align; // unused |
120 }; | 121 }; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 Auto* autom; | 166 Auto* autom; |
166 Prog* text; | 167 Prog* text; |
167 ········ | 168 ········ |
168 // SDATA, SBSS | 169 // SDATA, SBSS |
169 uchar* p; | 170 uchar* p; |
170 int32 np; | 171 int32 np; |
171 int32 maxp; | 172 int32 maxp; |
172 Reloc* r; | 173 Reloc* r; |
173 int32 nr; | 174 int32 nr; |
174 int32 maxr; | 175 int32 maxr; |
| 176 int rel_ro; |
175 }; | 177 }; |
176 | 178 |
177 #define SIGNINTERN (1729*325*1729) | 179 #define SIGNINTERN (1729*325*1729) |
178 | 180 |
179 struct Autom | 181 struct Autom |
180 { | 182 { |
181 Sym* asym; | 183 Sym* asym; |
182 Auto* link; | 184 Auto* link; |
183 int32 aoffset; | 185 int32 aoffset; |
184 short type; | 186 short type; |
185 Sym* gotype; | 187 Sym* gotype; |
186 }; | 188 }; |
187 struct Optab | 189 struct Optab |
188 { | 190 { |
189 char as; | 191 char as; |
190 uchar a1; | 192 uchar a1; |
191 char a2; | 193 char a2; |
192 uchar a3; | 194 uchar a3; |
193 uchar type; | 195 uchar type; |
194 char size; | 196 char size; |
195 char param; | 197 char param; |
196 char flag; | 198 char flag; |
| 199 uchar pcrelsiz; |
197 }; | 200 }; |
198 struct Oprang | 201 struct Oprang |
199 { | 202 { |
200 Optab* start; | 203 Optab* start; |
201 Optab* stop; | 204 Optab* stop; |
202 }; | 205 }; |
203 struct Count | 206 struct Count |
204 { | 207 { |
205 int32 count; | 208 int32 count; |
206 int32 outof; | 209 int32 outof; |
207 }; | 210 }; |
208 | 211 |
209 enum | 212 enum |
210 { | 213 { |
211 LFROM = 1<<0, | 214 LFROM = 1<<0, |
212 LTO = 1<<1, | 215 LTO = 1<<1, |
213 LPOOL = 1<<2, | 216 LPOOL = 1<<2, |
| 217 LPCREL = 1<<3, |
214 | 218 |
215 C_NONE = 0, | 219 C_NONE = 0, |
216 C_REG, | 220 C_REG, |
217 C_REGREG, | 221 C_REGREG, |
218 C_REGREG2, | 222 C_REGREG2, |
219 C_SHIFT, | 223 C_SHIFT, |
220 C_FREG, | 224 C_FREG, |
221 C_PSR, | 225 C_PSR, |
222 C_FCR, | 226 C_FCR, |
223 | 227 |
224 C_RCON, /* 0xff rotated */ | 228 C_RCON, /* 0xff rotated */ |
225 C_NCON, /* ~RCON */ | 229 C_NCON, /* ~RCON */ |
226 C_SCON, /* 0xffff */ | 230 C_SCON, /* 0xffff */ |
227 C_LCON, | 231 C_LCON, |
| 232 C_LCONADDR, |
228 C_ZFCON, | 233 C_ZFCON, |
229 C_SFCON, | 234 C_SFCON, |
230 C_LFCON, | 235 C_LFCON, |
231 | 236 |
232 C_RACON, | 237 C_RACON, |
233 C_LACON, | 238 C_LACON, |
234 | 239 |
235 C_SBRA, | 240 C_SBRA, |
236 C_LBRA, | 241 C_LBRA, |
237 | 242 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 }; | 276 }; |
272 | 277 |
273 #ifndef COFFCVT | 278 #ifndef COFFCVT |
274 | 279 |
275 EXTERN int32 HEADR; /* length of header */ | 280 EXTERN int32 HEADR; /* length of header */ |
276 EXTERN int HEADTYPE; /* type of header */ | 281 EXTERN int HEADTYPE; /* type of header */ |
277 EXTERN int32 INITDAT; /* data location */ | 282 EXTERN int32 INITDAT; /* data location */ |
278 EXTERN int32 INITRND; /* data round above text location */ | 283 EXTERN int32 INITRND; /* data round above text location */ |
279 EXTERN int32 INITTEXT; /* text location */ | 284 EXTERN int32 INITTEXT; /* text location */ |
280 EXTERN char* INITENTRY; /* entry point */ | 285 EXTERN char* INITENTRY; /* entry point */ |
| 286 EXTERN char* LIBINITENTRY; /* shared library entry point */ |
281 EXTERN int32 autosize; | 287 EXTERN int32 autosize; |
282 EXTERN Auto* curauto; | 288 EXTERN Auto* curauto; |
283 EXTERN Auto* curhist; | 289 EXTERN Auto* curhist; |
284 EXTERN Prog* curp; | 290 EXTERN Prog* curp; |
285 EXTERN Sym* cursym; | 291 EXTERN Sym* cursym; |
286 EXTERN Sym* datap; | 292 EXTERN Sym* datap; |
287 EXTERN int32 elfdatsize; | 293 EXTERN int32 elfdatsize; |
288 EXTERN int debug[128]; | 294 EXTERN int debug[128]; |
289 EXTERN Sym* etextp; | 295 EXTERN Sym* etextp; |
290 EXTERN char* noname; | 296 EXTERN char* noname; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 #define WPUT(a) wputl(a) | 442 #define WPUT(a) wputl(a) |
437 #define VPUT(a) abort() | 443 #define VPUT(a) abort() |
438 | 444 |
439 #endif | 445 #endif |
440 | 446 |
441 /* Used by ../ld/dwarf.c */ | 447 /* Used by ../ld/dwarf.c */ |
442 enum | 448 enum |
443 { | 449 { |
444 DWARFREGSP = 13 | 450 DWARFREGSP = 13 |
445 }; | 451 }; |
OLD | NEW |