FreeCalypso > hg > freecalypso-reveng
comparison 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 |
comparison
equal
deleted
inserted
replaced
138:8754c410c10d | 139:acdf75463e30 |
---|---|
326 return; | 326 return; |
327 } | 327 } |
328 if (hint && pos >= hint->endpos) | 328 if (hint && pos >= hint->endpos) |
329 hint = hint->next; | 329 hint = hint->next; |
330 } | 330 } |
331 if (symnum == sec->nsymbols) | |
332 return; | |
333 while (symnum < sec->nsymbols) { | 331 while (symnum < sec->nsymbols) { |
334 sym = sec->sorted_symbols[symnum]; | 332 sym = sec->sorted_symbols[symnum]; |
335 if (sym->value != sec->size) { | 333 if (sym->value != sec->size) { |
336 printf("error: expecting symbol at end of section\n"); | 334 printf("error: expecting symbol at end of section\n"); |
337 return; | 335 return; |
338 } | 336 } |
339 handle_symbol(sym, &state, &linebrk); | 337 handle_symbol(sym, &state, &linebrk); |
340 symnum++; | 338 symnum++; |
341 } | 339 } |
342 printf("%8x:\t<end of section>\n", sec->size); | 340 if (linebrk) |
341 printf("%8x:\t<end of section>\n", sec->size); | |
343 } | 342 } |
344 | 343 |
345 void | 344 void |
346 disasm_bss(sec) | 345 disasm_bss(sec) |
347 struct internal_scnhdr *sec; | 346 struct internal_scnhdr *sec; |