summaryrefslogtreecommitdiffstats
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-03-15 16:25:00 +0000
committerNick Clifton <nickc@redhat.com>2013-03-15 16:25:00 +0000
commit0d0fb1ba5f0512ca8b670d3bdcf2083db355d3d7 (patch)
tree8f388f2e9545ce82068c1087582875d64b49fa48 /binutils
parentba86b375f001b2f270b0d0a08197940e6b194b2e (diff)
downloadppe42-binutils-0d0fb1ba5f0512ca8b670d3bdcf2083db355d3d7.tar.gz
ppe42-binutils-0d0fb1ba5f0512ca8b670d3bdcf2083db355d3d7.zip
* addr2line.c (slurp_symtab): If canonicalization reveals that
there were no ordinary symbols, try loading the dynamic symbols instead.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/addr2line.c11
2 files changed, 17 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 13bded15e3..43f490f20d 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2013-03-15 Nick Clifton <nickc@redhat.com>
+
+ * addr2line.c (slurp_symtab): If canonicalization reveals that
+ there were no ordinary symbols, try loading the dynamic symbols
+ instead.
+
2013-03-14 Markos Chandras <markos.chandras@imgtec.com>
* MAINTAINERS: Add myself as Meta maintainer.
diff --git a/binutils/addr2line.c b/binutils/addr2line.c
index b4f604b4b9..0de73982f5 100644
--- a/binutils/addr2line.c
+++ b/binutils/addr2line.c
@@ -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);
+ }
}
/* These global variables are used to pass information between
OpenPOWER on IntegriCloud