X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=linux%2Fhost_dasm.c;h=3cc9c7b7dca37de4033c5c697ddfe6290c9577e0;hb=c908877fcdddab2db3e70e674fd54f80d19a9dac;hp=a3c0e00be2e2c63b990abb184ee936b6be2db55f;hpb=1eb704b6332072581bf7c3bc411babc66f8bda8a;p=libpicofe.git diff --git a/linux/host_dasm.c b/linux/host_dasm.c index a3c0e00..3cc9c7b 100644 --- a/linux/host_dasm.c +++ b/linux/host_dasm.c @@ -37,7 +37,7 @@ remove_useless_symbols (asymbol **symbols, long count) { asymbol *sym = *in_ptr++; - if (sym->name == NULL || sym->name[0] == '\0') + if (sym->name == NULL || sym->name[0] == '\0' || sym->name[0] == '$') continue; if (sym->flags & (BSF_DEBUGGING | BSF_SECTION_SYM)) continue; @@ -53,6 +53,7 @@ remove_useless_symbols (asymbol **symbols, long count) */ *out_ptr++ = sym; } + return out_ptr - symbols; } @@ -169,7 +170,7 @@ void host_dasm(void *addr, int len) vma_end = vma + len; while (vma < vma_end) { - printf(" %p ", (void *)(long)vma); + printf(" %p ", (void *)(long)vma); vma += print_insn_func(vma, &di); printf("\n"); }