Mercurial > hg-old > index.cgi
comparison lwasm/pseudo.c @ 243:f9f01a499525 2.x
Added zero-width external references
author | lost |
---|---|
date | Tue, 15 Sep 2009 03:16:17 +0000 |
parents | 31231d1c87e6 |
children | c7a41b4c89b3 |
comparison
equal
deleted
inserted
replaced
242:848d55b181f0 | 243:f9f01a499525 |
---|---|
1209 } | 1209 } |
1210 if (!(l -> sym)) | 1210 if (!(l -> sym)) |
1211 register_error(as, l, 1, "Bad import list"); | 1211 register_error(as, l, 1, "Bad import list"); |
1212 } | 1212 } |
1213 | 1213 |
1214 OPFUNC(pseudo_extdep) | |
1215 { | |
1216 if (as -> passnum != 1) | |
1217 return; | |
1218 | |
1219 if (as -> outformat != OUTPUT_OBJ) | |
1220 { | |
1221 register_error(as, l, 1, "External references only supported for obj target"); | |
1222 return; | |
1223 } | |
1224 | |
1225 if (l -> sym) | |
1226 { | |
1227 // add symbol to the "ext dep" list | |
1228 as -> extdeps = lwasm_realloc(as -> extdeps, sizeof(char *) * (as -> nextdeps + 1)); | |
1229 as -> extdeps[as -> nextdeps++] = lwasm_strdup(l -> sym); | |
1230 return; | |
1231 } | |
1232 } | |
1233 | |
1214 OPFUNC(pseudo_export) | 1234 OPFUNC(pseudo_export) |
1215 { | 1235 { |
1216 lwasm_symbol_ent_t *se; | 1236 lwasm_symbol_ent_t *se; |
1217 export_list_t *ex; | 1237 export_list_t *ex; |
1218 char *sym2, *sym3; | 1238 char *sym2, *sym3; |