diff src/lwasm.c @ 74:c8c772ef5df9

Checkpointing object target implementation
author lost
date Thu, 08 Jan 2009 01:18:40 +0000
parents 309810f39ab7
children 2fe5fd7d65a3
line wrap: on
line diff
--- a/src/lwasm.c	Thu Jan 08 01:18:09 2009 +0000
+++ b/src/lwasm.c	Thu Jan 08 01:18:40 2009 +0000
@@ -65,6 +65,16 @@
 	as -> addr += 1;
 	as -> addr &= 0xffff;
 	
+	if (as -> outformat == OUTPUT_OBJ && !(as -> csect))
+	{
+		register_error(as, l, 1, "Output not allowed outside sections with obj target");
+		return;
+	}
+	if (as -> outformat == OUTPUT_OBJ && as -> csect -> flags & SECTION_BSS)
+	{
+		register_error(as, l, 1, "Output not allowed inside BSS sections");
+		return;
+	}
 	if (as -> passnum == 1)
 		return;