From: Richard Henderson Date: Wed, 12 Dec 2001 19:05:26 +0000 (+0000) Subject: * syms.c (_bfd_generic_read_minisymbols): Early return for X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce9c7f501fcc98a5427f013c12563233d8e9f328;p=binutils-gdb.git * syms.c (_bfd_generic_read_minisymbols): Early return for no symbols. Patch from FreeBSD folk; exact origin unknown. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f7b0efa69c8..46dd9b76cbb 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-12-12 Richard Henderson + + * syms.c (_bfd_generic_read_minisymbols): Early return for + no symbols. Patch from FreeBSD folk; exact origin unknown. + 2001-12-11 Alan Modra * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum diff --git a/bfd/syms.c b/bfd/syms.c index b334c11c2e5..03c41a52862 100644 --- a/bfd/syms.c +++ b/bfd/syms.c @@ -715,6 +715,8 @@ _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep) storage = bfd_get_symtab_upper_bound (abfd); if (storage < 0) goto error_return; + if (storage == 0) + return 0; syms = (asymbol **) bfd_malloc ((bfd_size_type) storage); if (syms == NULL)