From dd70071f8b84788aae196c6e07924a8526e76b59 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 1 May 2002 06:43:32 +0000 Subject: [PATCH] * nm.c (print_symbol): Check returned filename from bfd_find_nearest_line is non-NULL. --- binutils/ChangeLog | 5 +++++ binutils/nm.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index de5f9f272ba..d303d49f32c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2002-05-01 Alan Modra + + * nm.c (print_symbol): Check returned filename from + bfd_find_nearest_line is non-NULL. + 2002-04-25 Elena Zannoni * readelf.c (get_AT_name): Handle DW_AT_GNU_vector. diff --git a/binutils/nm.c b/binutils/nm.c index 68eae77f55d..eb8a55f4eb4 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -1291,7 +1291,8 @@ print_symbol (abfd, sym, archive_bfd) bfd_asymbol_name (*r->sym_ptr_ptr)) == 0 && bfd_find_nearest_line (abfd, secs[i], syms, r->address, &filename, - &functionname, &lineno)) + &functionname, &lineno) + && filename != NULL) { /* We only print the first one we find. */ printf ("\t%s:%u", filename, lineno); -- 2.30.2