diff options
author | Michael Snyder <msnyder@vmware.com> | 2007-08-01 19:58:40 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2007-08-01 19:58:40 +0000 |
commit | 20c6e70e8d514109c569b17a279c2dcd70b229fc (patch) | |
tree | d581313b5b036393bdd8cff71455b683e29c918d /bfd/aoutx.h | |
parent | dcf6c77984275c7834be121f5ca42aa8e44ade6c (diff) | |
download | gdb-20c6e70e8d514109c569b17a279c2dcd70b229fc.zip gdb-20c6e70e8d514109c569b17a279c2dcd70b229fc.tar.gz gdb-20c6e70e8d514109c569b17a279c2dcd70b229fc.tar.bz2 |
2007-08-01 Michael Snyder <msnyder@access-company.com>
* aoutx.h (aout_link_add_symbols): Return if count is zero.
Diffstat (limited to 'bfd/aoutx.h')
-rw-r--r-- | bfd/aoutx.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/aoutx.h b/bfd/aoutx.h index 78b0594..1244510 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -2959,13 +2959,16 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) return FALSE; } + if (sym_count == 0) + return TRUE; /* Nothing to do. */ + /* We keep a list of the linker hash table entries that correspond to particular symbols. We could just look them up in the hash table, but keeping the list is more efficient. Perhaps this should be conditional on info->keep_memory. */ amt = sym_count * sizeof (struct aout_link_hash_entry *); sym_hash = bfd_alloc (abfd, amt); - if (sym_hash == NULL && sym_count != 0) + if (sym_hash == NULL) return FALSE; obj_aout_sym_hashes (abfd) = sym_hash; |