diff leo-obj/tool/disasm.c @ 139:acdf75463e30

tiobjd disasm: smarter logic for when the <end of section> line should be printed
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 07 Apr 2014 07:36:31 +0000
parents 81fc8da9a29c
children 1e1815a6d701
line wrap: on
line diff
--- a/leo-obj/tool/disasm.c	Mon Apr 07 05:40:49 2014 +0000
+++ b/leo-obj/tool/disasm.c	Mon Apr 07 07:36:31 2014 +0000
@@ -328,8 +328,6 @@
 		if (hint && pos >= hint->endpos)
 			hint = hint->next;
 	}
-	if (symnum == sec->nsymbols)
-		return;
 	while (symnum < sec->nsymbols) {
 		sym = sec->sorted_symbols[symnum];
 		if (sym->value != sec->size) {
@@ -339,7 +337,8 @@
 		handle_symbol(sym, &state, &linebrk);
 		symnum++;
 	}
-	printf("%8x:\t<end of section>\n", sec->size);
+	if (linebrk)
+		printf("%8x:\t<end of section>\n", sec->size);
 }
 
 void