daily update
[deliverable/binutils-gdb.git] / binutils / addr2line.c
index b4f604b4b9209f535b3bd70f5fdeaf6d43c80e5a..0de73982f54ffd0960d64a2e864a45af0b3c399e 100644 (file)
@@ -130,6 +130,17 @@ slurp_symtab (bfd *abfd)
     symcount = bfd_canonicalize_symtab (abfd, syms);
   if (symcount < 0)
     bfd_fatal (bfd_get_filename (abfd));
+
+  /* If there are no symbols left after canonicalization and
+     we have not tried the dynamic symbols then give them a go.  */
+  if (symcount == 0
+      && ! dynamic
+      && (storage = bfd_get_dynamic_symtab_upper_bound (abfd)) > 0)
+    {
+      free (syms);
+      syms = xmalloc (storage);
+      symcount = bfd_canonicalize_dynamic_symtab (abfd, syms);
+    }
 }
 \f
 /* These global variables are used to pass information between
This page took 0.023647 seconds and 4 git commands to generate.