changeset 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 428068681cbf
children 381cd2421fab
files lwasm/symbol.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/symbol.c	Wed May 25 19:13:33 2011 -0600
+++ b/lwasm/symbol.c	Wed May 25 19:20:39 2011 -0600
@@ -160,6 +160,10 @@
 	se -> context = context;
 	se -> version = version;
 	se -> flags = flags;
+	if (CURPRAGMA(cl, PRAGMA_NOLIST))
+	{
+		se -> flags |= symbol_flag_nolist;
+	}
 	se -> value = lw_expr_copy(val);
 	se -> symbol = lw_strdup(sym);
 	se -> section = cl -> csect;
@@ -273,6 +277,8 @@
 	
 	for (s = as -> symtab.head; s; s = s -> next)
 	{
+		if (s -> flags & symbol_flag_nolist)
+			continue;
 		lwasm_reduce_expr(as, s -> value);
 		fputc('[', of);
 		if (s -> flags & symbol_flag_set)