diff lwlink/link.c @ 187:857cb407229e

Added LWEX0 (LWOS simple binary) target to lwlink
author lost
date Sun, 22 Mar 2009 04:24:39 +0000
parents 220a760ec654
children 048ebb85f6ef
line wrap: on
line diff
--- a/lwlink/link.c	Sat Mar 21 19:49:01 2009 +0000
+++ b/lwlink/link.c	Sun Mar 22 04:24:39 2009 +0000
@@ -327,8 +327,16 @@
 		lw_expr_stack_t *s;
 		
 		s = resolve_sym(linkscript.execsym, 0, NULL);
-		linkscript.execaddr = lw_expr_get_value(s);
-		lw_expr_stack_free(s);
+		if (!s)
+		{
+			fprintf(stderr, "Cannot resolve exec address '%s'\n", linkscript.execsym);
+			symerr = 1;
+		}
+		else
+		{
+			linkscript.execaddr = lw_expr_get_value(s);
+			lw_expr_stack_free(s);
+		}
 	}
 	
 	for (sn = 0; sn < nsects; sn++)