aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-07-27 19:04:39 +0000
committerMichael Snyder <msnyder@vmware.com>2007-07-27 19:04:39 +0000
commit87b3278031d935fffc282bd376ce6303d926b0e0 (patch)
tree43f79653179738bccfd7cb075324d716b2d17f1c /bfd
parent9d7038d33091834658c7ec239848931c7a856c91 (diff)
downloadgdb-87b3278031d935fffc282bd376ce6303d926b0e0.zip
gdb-87b3278031d935fffc282bd376ce6303d926b0e0.tar.gz
gdb-87b3278031d935fffc282bd376ce6303d926b0e0.tar.bz2
2007-07-27 Michael Snyder <msnyder@access-company.com>
* aoutx.h (slurp_symbol_table): Return if count == 0.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog2
-rw-r--r--bfd/aoutx.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 979d845..3b4677d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,7 @@
2007-07-27 Michael Snyder <msnyder@access-company.com>
+ * aoutx.h (slurp_symbol_table): Return if count == 0.
+
* coffgen.c (_bfd_coff_read_internal_relocs): Return if count is zero.
* elf32-i386.c (elf_i386_check_relocs): Check for null pointer.
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index e07d7be..af7d45b 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -1739,9 +1739,12 @@ NAME (aout, slurp_symbol_table) (bfd *abfd)
return FALSE;
cached_size = obj_aout_external_sym_count (abfd);
+ if (cached_size == 0)
+ return TRUE; /* Nothing to do. */
+
cached_size *= sizeof (aout_symbol_type);
cached = bfd_zmalloc (cached_size);
- if (cached == NULL && cached_size != 0)
+ if (cached == NULL)
return FALSE;
/* Convert from external symbol information to internal. */