aboutsummaryrefslogtreecommitdiff
path: root/bfd/syms.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-12-12 19:05:26 +0000
committerRichard Henderson <rth@redhat.com>2001-12-12 19:05:26 +0000
commitce9c7f501fcc98a5427f013c12563233d8e9f328 (patch)
treee9ab959a573310a09f53d04dfc62b6ebe3a99050 /bfd/syms.c
parent29e472bc655b1ad13ac7d8b285d53bb4e60a760e (diff)
downloadgdb-ce9c7f501fcc98a5427f013c12563233d8e9f328.zip
gdb-ce9c7f501fcc98a5427f013c12563233d8e9f328.tar.gz
gdb-ce9c7f501fcc98a5427f013c12563233d8e9f328.tar.bz2
* syms.c (_bfd_generic_read_minisymbols): Early return for
no symbols. Patch from FreeBSD folk; exact origin unknown.
Diffstat (limited to 'bfd/syms.c')
-rw-r--r--bfd/syms.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/syms.c b/bfd/syms.c
index b334c11..03c41a5 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)