comparison src/lwasm.c @ 92:ea2cfebef5d0

Make external symbols remain unresolved in expressions and also flag them in the symbol list
author lost
date Sat, 17 Jan 2009 06:11:40 +0000
parents e12edcfbebd5
children 34ca1c6e9550
comparison
equal deleted inserted replaced
91:718998b673ee 92:ea2cfebef5d0
218 if (!se) 218 if (!se)
219 { 219 {
220 register_error(st -> as, st -> l, 2, "Undefined symbol '%s'", sym); 220 register_error(st -> as, st -> l, 2, "Undefined symbol '%s'", sym);
221 return NULL; 221 return NULL;
222 } 222 }
223 // external reference - can not resolve it
224 if (se -> flags & SYMBOL_EXTERN)
225 {
226 return NULL;
227 }
223 if (st -> as -> outformat != OUTPUT_OBJ || se -> sect == NULL || se -> sect == st -> as -> csect) 228 if (st -> as -> outformat != OUTPUT_OBJ || se -> sect == NULL || se -> sect == st -> as -> csect)
224 { 229 {
225 // global symbol, intrasegment reference, or not an object target 230 // global symbol, intrasegment reference, or not an object target
226 val = se -> value; 231 val = se -> value;
227 goto retconst; 232 goto retconst;