summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2007-08-09 23:14:55 +0000
committerMichael Snyder <msnyder@specifix.com>2007-08-09 23:14:55 +0000
commit4f418c105cc739626b4b9107c42c0decadf2a005 (patch)
treead7093b1336604799565752b82870572b8eb7422 /bfd
parent565529bc41b39ff7490a91001c61a47e167e657e (diff)
downloadgdb-4f418c105cc739626b4b9107c42c0decadf2a005.tar.gz
2007-08-09 Michael Snyder <msnyder@access-company.com>
* aoutx.h (aout_get_external_symbols): Return if count is zero.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/aoutx.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6f211a9c1e9..49129e1542c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-09 Michael Snyder <msnyder@access-company.com>
+
+ * aoutx.h (aout_get_external_symbols): Return if count is zero.
+
2007-08-09 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4909
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 1244510981f..b469b77c626 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -1294,6 +1294,8 @@ aout_get_external_symbols (bfd *abfd)
bfd_size_type amt;
count = exec_hdr (abfd)->a_syms / EXTERNAL_NLIST_SIZE;
+ if (count == 0)
+ return TRUE; /* Nothing to do. */
#ifdef USE_MMAP
if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd),
@@ -1306,7 +1308,7 @@ aout_get_external_symbols (bfd *abfd)
later on. If we put them on the objalloc it might not be
possible to free them. */
syms = bfd_malloc (count * EXTERNAL_NLIST_SIZE);
- if (syms == NULL && count != 0)
+ if (syms == NULL)
return FALSE;
amt = exec_hdr (abfd)->a_syms;