unlink (old_name);
write_archive (iarch)     bfd *iarch;{  bfd *obfd;  char *old_name, *new_name;  bfd *contents_head = iarch->next;  old_name = xmalloc (strlen (bfd_get_filename (iarch)) + 1);  strcpy (old_name, bfd_get_filename (iarch));  new_name = make_tempname (old_name);  output_filename = new_name;  obfd = bfd_openw (new_name, bfd_get_target (iarch));  if (obfd == NULL)    bfd_fatal (old_name);  output_bfd = obfd;  bfd_set_format (obfd, bfd_archive);  /* Request writing the archive symbol table unless we've     been explicitly requested not to.  */  obfd->has_armap = write_armap >= 0;  if (ar_truncate)    {      /* This should really use bfd_set_file_flags, but that rejects         archives.  */      obfd->flags |= BFD_TRADITIONAL_FORMAT;    }  if (bfd_set_archive_head (obfd, contents_head) != true)    bfd_fatal (old_name);  if (!bfd_close (obfd))    bfd_fatal (old_name);  output_bfd = NULL;  output_filename = NULL;  /* We don't care if this fails; we might be creating the archive.  */  bfd_close (iarch);  unlink (old_name);  if (rename (new_name, old_name) != 0)    bfd_fatal (old_name);}