Mercurial > hg-old > index.cgi
comparison src/lwasm.c @ 93:34ca1c6e9550
Fixed symbol resolution to not resolve intra-section references to constants by default
author | lost |
---|---|
date | Sat, 17 Jan 2009 06:27:01 +0000 |
parents | ea2cfebef5d0 |
children | 83ba34ed11b3 |
comparison
equal
deleted
inserted
replaced
92:ea2cfebef5d0 | 93:34ca1c6e9550 |
---|---|
223 // external reference - can not resolve it | 223 // external reference - can not resolve it |
224 if (se -> flags & SYMBOL_EXTERN) | 224 if (se -> flags & SYMBOL_EXTERN) |
225 { | 225 { |
226 return NULL; | 226 return NULL; |
227 } | 227 } |
228 if (st -> as -> outformat != OUTPUT_OBJ || se -> sect == NULL || se -> sect == st -> as -> csect) | 228 if (st -> as -> outformat == OUTPUT_OBJ && se -> sect != NULL) |
229 { | |
230 // do not resolve any section symbols in object mode | |
231 return NULL; | |
232 } | |
233 if (st -> as -> outformat != OUTPUT_OBJ || se -> sect == NULL) | |
229 { | 234 { |
230 // global symbol, intrasegment reference, or not an object target | 235 // global symbol, intrasegment reference, or not an object target |
231 val = se -> value; | 236 val = se -> value; |
232 goto retconst; | 237 goto retconst; |
233 } | 238 } |