diff options
-rw-r--r-- | contrib/elftoolchain/nm/nm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/elftoolchain/nm/nm.c b/contrib/elftoolchain/nm/nm.c index f984966..637cdd9 100644 --- a/contrib/elftoolchain/nm/nm.c +++ b/contrib/elftoolchain/nm/nm.c @@ -1525,7 +1525,8 @@ print_lineno(struct sym_entry *ep, struct func_info_head *func_info, /* For function symbol, search the function line information list. */ if ((ep->sym->st_info & 0xf) == STT_FUNC && func_info != NULL) { SLIST_FOREACH(func, func_info, entries) { - if (!strcmp(ep->name, func->name) && + if (func->name != NULL && + !strcmp(ep->name, func->name) && ep->sym->st_value >= func->lowpc && ep->sym->st_value < func->highpc) { printf("\t%s:%" PRIu64, func->file, func->line); |