2007-08-01 Michael Snyder <msnyder@access-company.com>
authorMichael Snyder <msnyder@vmware.com>
Wed, 1 Aug 2007 19:58:40 +0000 (19:58 +0000)
committerMichael Snyder <msnyder@vmware.com>
Wed, 1 Aug 2007 19:58:40 +0000 (19:58 +0000)
* aoutx.h (aout_link_add_symbols): Return if count is zero.

bfd/ChangeLog
bfd/aoutx.h

index ea5ece5e8dc33d926db0574185a4adec109a6e75..f8c3343bc9c51f950a248268b489a22da67624a6 100644 (file)
@@ -1,5 +1,7 @@
 2007-08-01  Michael Snyder  <msnyder@access-company.com>
 
+       * aoutx.h (aout_link_add_symbols): Return if count is zero.
+
        * elf.c (bfd_elf_print_symbol): Macro dereferences pointer, so
        pointer must be non-null.
 
index 78b05943e4b7fbd0dc6aa54c1d390c83ded55b1d..1244510981f9e49c3c9dc7a54d3fb2357fa654a1 100644 (file)
@@ -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;
 
This page took 0.027573 seconds and 4 git commands to generate.