diff src/pseudo.c @ 99:3dcb12a6f4ff

Fixed problem handling sections with options on pass 2
author lost
date Sat, 17 Jan 2009 07:28:45 +0000
parents f3497072ac44
children 26c058fa0bc1
line wrap: on
line diff
--- a/src/pseudo.c	Sat Jan 17 07:12:05 2009 +0000
+++ b/src/pseudo.c	Sat Jan 17 07:28:45 2009 +0000
@@ -131,7 +131,6 @@
 		return;
 	}
 	r = lwasm_expr_result2(as, l, p, EXPR_PASS1CONST, &v, -1);
-	fprintf(stderr, "RMB: v=%d, addr=%d\n", v, as -> addr);
 	if (r != 0)
 		return;
 	l -> nocodelen = v;
@@ -661,7 +660,7 @@
 	char *sn;
 	char *opts;
 	
-	
+
 	if (as -> outformat != OUTPUT_OBJ)
 	{
 		register_error(as, l, 1, "Sections only supported for obj target");
@@ -702,7 +701,7 @@
 			break;
 	}
 	
-	if (s)
+	if (s && as -> passnum == 1)
 	{
 		lwasm_free(sn);
 		if (opts)