changeset 308:ecc092adc0be

Fixed stupid logic problem reading input files
author lost
date Fri, 23 Jan 2009 05:10:33 +0000
parents 87c4e65074f0
children 34203598be6d
files src/link.c src/readfiles.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/link.c	Fri Jan 23 04:53:01 2009 +0000
+++ b/src/link.c	Fri Jan 23 05:10:33 2009 +0000
@@ -44,6 +44,7 @@
 	
 	for (ln = 0; ln < linkscript.nlines; ln++)
 	{
+//	printf("Linker script line %d: '%s', %04X, %d, %d\n", ln, linkscript.lines[ln].sectname, linkscript.lines[ln].loadat, linkscript.lines[ln].yesflags, linkscript.lines[ln].noflags);
 		if (linkscript.lines[ln].sectname)
 		{
 			int f = 0;
@@ -54,6 +55,7 @@
 			{
 				for (sn = 0; sn < inputfiles[fn] -> nsections; sn++)
 				{
+//				printf("  Considering %s:%s\n", inputfiles[fn]->filename, inputfiles[fn]->sections[sn].name);
 					if (!strcmp(linkscript.lines[ln].sectname, inputfiles[fn] -> sections[sn].name))
 					{
 						// we have a match
--- a/src/readfiles.c	Fri Jan 23 04:53:01 2009 +0000
+++ b/src/readfiles.c	Fri Jan 23 05:10:33 2009 +0000
@@ -116,7 +116,7 @@
 	symtab_t *se;
 	
 	// start reading *after* the magic number
-	cc = 7;
+	cc = 8;
 	
 	// init data
 	fn -> sections = NULL;
@@ -124,7 +124,7 @@
 
 	while (1)
 	{
-		NEXTBYTE();
+//		NEXTBYTE();
 		// bail out if no more sections
 		if (!(CURBYTE()))
 			break;