aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/nm.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 7b93900..8018ed9 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR 990
+ * nm.c (print_symbol): Call bfd_find_line before
+ bfd_find_nearest_line.
+
2005-06-06 Alan Modra <amodra@bigpond.net.au>
* NEWS: Mention new powerpc ld support.
diff --git a/binutils/nm.c b/binutils/nm.c
index 511e6d3..999a6db 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -905,9 +905,10 @@ print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd)
}
else if (bfd_get_section (sym)->owner == abfd)
{
- if (bfd_find_nearest_line (abfd, bfd_get_section (sym), syms,
- sym->value, &filename, &functionname,
- &lineno)
+ if ((bfd_find_line (abfd, syms, sym, &filename, &lineno)
+ || bfd_find_nearest_line (abfd, bfd_get_section (sym),
+ syms, sym->value, &filename,
+ &functionname, &lineno))
&& filename != NULL
&& lineno != 0)
printf ("\t%s:%u", filename, lineno);