Mercurial > hg-old > index.cgi
comparison lwasm/lwasm.h @ 374:d99322ef6f21
Stage 1: actually do output
author | lost@starbug |
---|---|
date | Sat, 24 Apr 2010 14:15:18 -0600 |
parents | 90de73ba0cac |
children | 3498b2d88376 |
comparison
equal
deleted
inserted
replaced
373:8f9d72cfb897 | 374:d99322ef6f21 |
---|---|
82 { | 82 { |
83 section_flag_bss = 1, // BSS section | 83 section_flag_bss = 1, // BSS section |
84 section_flag_none = 0 // no flags | 84 section_flag_none = 0 // no flags |
85 }; | 85 }; |
86 | 86 |
87 typedef struct reloctab_s reloctab_t; | |
88 struct reloctab_s | |
89 { | |
90 int offset; // offset of relocation | |
91 int size; // size of relocation | |
92 lw_expr_t *expr; // relocation expression | |
93 reloctab_t *next; | |
94 }; | |
95 | |
87 typedef struct sectiontab_s sectiontab_t; | 96 typedef struct sectiontab_s sectiontab_t; |
88 struct sectiontab_s | 97 struct sectiontab_s |
89 { | 98 { |
90 char *name; // section name | 99 char *name; // section name |
91 int flags; // section flags; | 100 int flags; // section flags; |
92 lw_expr_t offset; // offset for next instance | 101 lw_expr_t offset; // offset for next instance |
102 int oblen; // size of section output | |
103 int obsize; // size of output buffer | |
104 unsigned char *obytes; // output buffer | |
105 reloctab_t *reloctab; // table of relocations | |
93 sectiontab_t *next; | 106 sectiontab_t *next; |
94 }; | 107 }; |
95 | 108 |
96 typedef struct lwasm_error_s lwasm_error_t; | 109 typedef struct lwasm_error_s lwasm_error_t; |
97 struct lwasm_error_s | 110 struct lwasm_error_s |
111 | 124 |
112 typedef struct exportlist_s exportlist_t; | 125 typedef struct exportlist_s exportlist_t; |
113 struct exportlist_s | 126 struct exportlist_s |
114 { | 127 { |
115 char *symbol; // symbol to export | 128 char *symbol; // symbol to export |
129 struct symtabe *se; // symbol table entry | |
116 line_t *line; // line the export is on | 130 line_t *line; // line the export is on |
117 exportlist_t *next; // next in the export list | 131 exportlist_t *next; // next in the export list |
118 }; | 132 }; |
119 | 133 |
120 typedef struct importlist_s importlist_t; | 134 typedef struct importlist_s importlist_t; |
161 { | 175 { |
162 char *symbol; // the name of the symbol | 176 char *symbol; // the name of the symbol |
163 int context; // symbol context (-1 for global) | 177 int context; // symbol context (-1 for global) |
164 int version; // version of the symbol (for "set") | 178 int version; // version of the symbol (for "set") |
165 int flags; // flags for the symbol | 179 int flags; // flags for the symbol |
180 sectiontab_t *section; // section the symbol is defined in | |
166 lw_expr_t value; // symbol value | 181 lw_expr_t value; // symbol value |
167 struct symtabe *next; // next symbol in the table | 182 struct symtabe *next; // next symbol in the table |
168 }; | 183 }; |
169 | 184 |
170 typedef struct | 185 typedef struct |