diff options
author | Nick Clifton <nickc@redhat.com> | 2002-10-07 17:25:08 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-10-07 17:25:08 +0000 |
commit | f309035a880c33487eb89d299e839afb213c7d42 (patch) | |
tree | 9c689bb6b91ddf22898a800209d603b67dbf2c4f /binutils/addr2line.c | |
parent | ff72e302f8d3628ddfb8c70cba1c6017dfbb1700 (diff) | |
download | binutils-gdb-f309035a880c33487eb89d299e839afb213c7d42.tar.gz |
Read in dynamic symbols if no ordinary ones are available.
Diffstat (limited to 'binutils/addr2line.c')
-rw-r--r-- | binutils/addr2line.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/binutils/addr2line.c b/binutils/addr2line.c index 174a0348908..1d09cd022d0 100644 --- a/binutils/addr2line.c +++ b/binutils/addr2line.c @@ -96,19 +96,16 @@ static void slurp_symtab (abfd) bfd *abfd; { - long storage; long symcount; + unsigned int size; if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0) return; - storage = bfd_get_symtab_upper_bound (abfd); - if (storage < 0) - bfd_fatal (bfd_get_filename (abfd)); - - syms = (asymbol **) xmalloc (storage); + symcount = bfd_read_minisymbols (abfd, false, (PTR) &syms, &size); + if (symcount == 0) + symcount = bfd_read_minisymbols (abfd, true /* dynamic */, (PTR) &syms, &size); - symcount = bfd_canonicalize_symtab (abfd, syms); if (symcount < 0) bfd_fatal (bfd_get_filename (abfd)); } |