Mercurial > hg > index.cgi
comparison lwasm/symbol.c @ 82:adf4ce03a6a3
Made pragma nolist suppress listing symbols defined under the pragma when listing the symbol table
author | Lost Wizard (lost@starbug3) |
---|---|
date | Wed, 25 May 2011 19:20:39 -0600 |
parents | 3d50022e16e7 |
children | ed7f970f3688 |
comparison
equal
deleted
inserted
replaced
81:428068681cbf | 82:adf4ce03a6a3 |
---|---|
158 | 158 |
159 se = lw_alloc(sizeof(struct symtabe)); | 159 se = lw_alloc(sizeof(struct symtabe)); |
160 se -> context = context; | 160 se -> context = context; |
161 se -> version = version; | 161 se -> version = version; |
162 se -> flags = flags; | 162 se -> flags = flags; |
163 if (CURPRAGMA(cl, PRAGMA_NOLIST)) | |
164 { | |
165 se -> flags |= symbol_flag_nolist; | |
166 } | |
163 se -> value = lw_expr_copy(val); | 167 se -> value = lw_expr_copy(val); |
164 se -> symbol = lw_strdup(sym); | 168 se -> symbol = lw_strdup(sym); |
165 se -> section = cl -> csect; | 169 se -> section = cl -> csect; |
166 sprev = symbol_findprev(as, se); | 170 sprev = symbol_findprev(as, se); |
167 if (!sprev) | 171 if (!sprev) |
271 | 275 |
272 fprintf(of, "\nSymbol Table:\n"); | 276 fprintf(of, "\nSymbol Table:\n"); |
273 | 277 |
274 for (s = as -> symtab.head; s; s = s -> next) | 278 for (s = as -> symtab.head; s; s = s -> next) |
275 { | 279 { |
280 if (s -> flags & symbol_flag_nolist) | |
281 continue; | |
276 lwasm_reduce_expr(as, s -> value); | 282 lwasm_reduce_expr(as, s -> value); |
277 fputc('[', of); | 283 fputc('[', of); |
278 if (s -> flags & symbol_flag_set) | 284 if (s -> flags & symbol_flag_set) |
279 fputc('S', of); | 285 fputc('S', of); |
280 else | 286 else |