daily update
[deliverable/binutils-gdb.git] / bfd / coffgen.c
index e5fb6454d34fb185cba4eb360f3e4562fb969aed..0e8b7eda5c4263e8b82f95c95a93b8c2c0ac75dd 100644 (file)
@@ -460,22 +460,17 @@ _bfd_coff_read_internal_relocs (bfd *abfd,
       free_external = NULL;
     }
 
-  if (free_internal != NULL)
+  if (cache && free_internal != NULL)
     {
-      if (cache)
-       free (free_internal);
-      else
+      if (coff_section_data (abfd, sec) == NULL)
        {
-         if (coff_section_data (abfd, sec) == NULL)
-           {
-             amt = sizeof (struct coff_section_tdata);
-             sec->used_by_bfd = bfd_zalloc (abfd, amt);
-             if (sec->used_by_bfd == NULL)
-               goto error_return;
-             coff_section_data (abfd, sec)->contents = NULL;
-           }
-         coff_section_data (abfd, sec)->relocs = free_internal;
+         amt = sizeof (struct coff_section_tdata);
+         sec->used_by_bfd = bfd_zalloc (abfd, amt);
+         if (sec->used_by_bfd == NULL)
+           goto error_return;
+         coff_section_data (abfd, sec)->contents = NULL;
        }
+      coff_section_data (abfd, sec)->relocs = free_internal;
     }
 
   return internal_relocs;
@@ -1698,7 +1693,7 @@ coff_get_normalized_symtab (bfd *abfd)
              internal_ptr->u.syment._n._n_n._n_zeroes = 0;
            }
          else if (internal_ptr->u.syment._n._n_n._n_offset == 0)
-           internal_ptr->u.syment._n._n_n._n_offset = (bfd_vma) "";
+           internal_ptr->u.syment._n._n_n._n_offset = (bfd_hostptr_t) "";
          else if (!bfd_coff_symname_in_debug (abfd, &internal_ptr->u.syment))
            {
              /* Long name already.  Point symbol at the string in the
This page took 0.023344 seconds and 4 git commands to generate.