diff src/link.c @ 312:5dc105fd619e

Fixed crash when entry symbol is not exported
author lost
date Sat, 24 Jan 2009 02:54:03 +0000
parents ecc092adc0be
children c275e7e328d4
line wrap: on
line diff
--- a/src/link.c	Sat Jan 24 02:34:25 2009 +0000
+++ b/src/link.c	Sat Jan 24 02:54:03 2009 +0000
@@ -202,7 +202,14 @@
 				}
 			}
 		}
-		fprintf(stderr, "External symbol %s not found in %s:%s\n", sym, sect -> file -> filename, sect -> name);
+		if (sect)
+		{
+			fprintf(stderr, "External symbol %s not found in %s:%s\n", sym, sect -> file -> filename, sect -> name);
+		}
+		else
+		{
+			fprintf(stderr, "External symbol %s not found\n", sym);
+		}
 		exit(1);
 	}
 	fprintf(stderr, "Shouldn't ever get here!!!\n");