* elf-hppa.h (elf_hppa_reloc_final_type): Handle R_PARISC_GPREL64,
[deliverable/binutils-gdb.git] / bfd / aoutx.h
index 78b05943e4b7fbd0dc6aa54c1d390c83ded55b1d..b469b77c6263e38cb336541c8d31e43c16ca9b9a 100644 (file)
@@ -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;
@@ -2959,13 +2961,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.0245 seconds and 4 git commands to generate.