diff options
author | Richard Henderson <rth@redhat.com> | 2001-12-12 19:05:26 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2001-12-12 19:05:26 +0000 |
commit | ac755b8910348b874bbd8d6421ee5e1f04d3a9a2 (patch) | |
tree | 202602a331e3e1e8fe86d803b57c4abf803a891a /bfd | |
parent | a85a65900611bd5a33f6701dd006415af4bca015 (diff) | |
download | gdb-ac755b8910348b874bbd8d6421ee5e1f04d3a9a2.tar.gz |
* syms.c (_bfd_generic_read_minisymbols): Early return for
no symbols. Patch from FreeBSD folk; exact origin unknown.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/syms.c | 2 |
2 files changed, 7 insertions, 0 deletions
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 <rth@redhat.com> + + * syms.c (_bfd_generic_read_minisymbols): Early return for + no symbols. Patch from FreeBSD folk; exact origin unknown. + 2001-12-11 Alan Modra <amodra@bigpond.net.au> * 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) |