forked from Imagelibrary/binutils-gdb
Read in dynamic symbols if no ordinary ones are available.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2002-10-07 Gordon Chaffee <chaffee@netvmg.com>
|
||||||
|
|
||||||
|
* addr2line.c (slurp_symtab): Read in dynamic symbols if no
|
||||||
|
ordinary ones are available.
|
||||||
|
|
||||||
2002-09-30 H.J. Lu <hjl@gnu.org>
|
2002-09-30 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
* readelf.c (get_machine_flags): Handle E_MIPS_MACH_4120,
|
* readelf.c (get_machine_flags): Handle E_MIPS_MACH_4120,
|
||||||
|
|||||||
@@ -96,19 +96,16 @@ static void
|
|||||||
slurp_symtab (abfd)
|
slurp_symtab (abfd)
|
||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
{
|
{
|
||||||
long storage;
|
|
||||||
long symcount;
|
long symcount;
|
||||||
|
unsigned int size;
|
||||||
|
|
||||||
if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
|
if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
storage = bfd_get_symtab_upper_bound (abfd);
|
symcount = bfd_read_minisymbols (abfd, false, (PTR) &syms, &size);
|
||||||
if (storage < 0)
|
if (symcount == 0)
|
||||||
bfd_fatal (bfd_get_filename (abfd));
|
symcount = bfd_read_minisymbols (abfd, true /* dynamic */, (PTR) &syms, &size);
|
||||||
|
|
||||||
syms = (asymbol **) xmalloc (storage);
|
|
||||||
|
|
||||||
symcount = bfd_canonicalize_symtab (abfd, syms);
|
|
||||||
if (symcount < 0)
|
if (symcount < 0)
|
||||||
bfd_fatal (bfd_get_filename (abfd));
|
bfd_fatal (bfd_get_filename (abfd));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user