Mercurial > hg > index.cgi
comparison lwasm/symbol.c @ 101:ed7f970f3688
Added --define= option to predfine a symbol for assembly
author | lost@l-w.ca |
---|---|
date | Sat, 06 Aug 2011 22:15:43 -0600 |
parents | adf4ce03a6a3 |
children | 17bd59f045af |
comparison
equal
deleted
inserted
replaced
100:7ce01324e391 | 101:ed7f970f3688 |
---|---|
164 { | 164 { |
165 se -> flags |= symbol_flag_nolist; | 165 se -> flags |= symbol_flag_nolist; |
166 } | 166 } |
167 se -> value = lw_expr_copy(val); | 167 se -> value = lw_expr_copy(val); |
168 se -> symbol = lw_strdup(sym); | 168 se -> symbol = lw_strdup(sym); |
169 se -> section = cl -> csect; | 169 if (cl) |
170 se -> section = cl -> csect; | |
171 else | |
172 se -> section = NULL; | |
170 sprev = symbol_findprev(as, se); | 173 sprev = symbol_findprev(as, se); |
171 if (!sprev) | 174 if (!sprev) |
172 { | 175 { |
173 debug_message(as, 200, "Adding symbol at head of symbol table"); | 176 debug_message(as, 200, "Adding symbol at head of symbol table"); |
174 se -> next = as -> symtab.head; | 177 se -> next = as -> symtab.head; |