changeset 312:5dc105fd619e

Fixed crash when entry symbol is not exported
author lost
date Sat, 24 Jan 2009 02:54:03 +0000
parents 8272b46b5a34
children c275e7e328d4
files src/link.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
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");