mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-12 20:58:48 +00:00
* elfread.c (elf_symtab_read): Handle error return from
bfd_get_dynamic_symtab_upper_bound gracefully.
This commit is contained in:
parent
81794792b7
commit
00306b1e9e
@ -1,3 +1,8 @@
|
||||
Sat Jul 16 23:39:17 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* elfread.c (elf_symtab_read): Handle error return from
|
||||
bfd_get_dynamic_symtab_upper_bound gracefully.
|
||||
|
||||
Sat Jul 16 14:43:17 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||
|
||||
* inferior.h (ARCH_NUM_REGS): New macro, actual number of
|
||||
|
@ -264,12 +264,20 @@ elf_symtab_read (abfd, addr, objfile, dynamic)
|
||||
int stripped = (bfd_get_symcount (abfd) == 0);
|
||||
|
||||
if (dynamic)
|
||||
storage_needed = bfd_get_dynamic_symtab_upper_bound (abfd);
|
||||
{
|
||||
storage_needed = bfd_get_dynamic_symtab_upper_bound (abfd);
|
||||
|
||||
/* Nothing to be done if there is no dynamic symtab. */
|
||||
if (storage_needed < 0)
|
||||
return;
|
||||
}
|
||||
else
|
||||
storage_needed = bfd_get_symtab_upper_bound (abfd);
|
||||
if (storage_needed < 0)
|
||||
error ("Can't read symbols from %s: %s", bfd_get_filename (abfd),
|
||||
bfd_errmsg (bfd_get_error ()));
|
||||
{
|
||||
storage_needed = bfd_get_symtab_upper_bound (abfd);
|
||||
if (storage_needed < 0)
|
||||
error ("Can't read symbols from %s: %s", bfd_get_filename (abfd),
|
||||
bfd_errmsg (bfd_get_error ()));
|
||||
}
|
||||
if (storage_needed > 0)
|
||||
{
|
||||
symbol_table = (asymbol **) xmalloc (storage_needed);
|
||||
|
Loading…
x
Reference in New Issue
Block a user