* config/tc-xtensa.h (resource_table): Change units to unsigned chars.
[deliverable/binutils-gdb.git] / bfd / format.c
index 3a36210cf0ec57c6c8d6eac8e79f9e741015d82d..4ccca2a3aa789492d7f418a5daf3c5eb5031c97b 100644 (file)
@@ -173,6 +173,14 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
          if (matching)
            free (matching_vector);
 
+         /* If the file was opened for update, then `output_has_begun'
+            some time ago when the file was created.  Do not recompute
+            sections sizes or alignments in _bfd_set_section_contents.
+            We can not set this flag until after checking the format,
+            because it will interfere with creation of BFD sections.  */
+         if (abfd->direction == both_direction)
+           abfd->output_has_begun = TRUE;
+
          return TRUE;                  /* File position has moved, BTW.  */
        }
 
@@ -319,6 +327,14 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
       if (matching)
        free (matching_vector);
 
+      /* If the file was opened for update, then `output_has_begun'
+        some time ago when the file was created.  Do not recompute
+        sections sizes or alignments in _bfd_set_section_contents.
+        We can not set this flag until after checking the format,
+        because it will interfere with creation of BFD sections.  */
+      if (abfd->direction == both_direction)
+       abfd->output_has_begun = TRUE;
+
       return TRUE;                     /* File position has moved, BTW.  */
     }
 
This page took 0.023659 seconds and 4 git commands to generate.