tc-score.c: Replace overlapping sprintf with memmove
[deliverable/binutils-gdb.git] / gas / write.c
index d5da41850cc428bb4f716f079de339b7dbb1f8ff..5825117548c7687c326646056ab4745f0c9824c3 100644 (file)
@@ -1,5 +1,5 @@
 /* write.c - emit .o file
-   Copyright (C) 1986-2019 Free Software Foundation, Inc.
+   Copyright (C) 1986-2020 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -443,7 +443,7 @@ cvt_frag_to_fill (segT sec ATTRIBUTE_UNUSED, fragS *fragP)
 #ifdef HANDLE_ALIGN
       HANDLE_ALIGN (fragP);
 #endif
-skip_align:
+    skip_align:
       know (fragP->fr_next != NULL);
       fragP->fr_offset = (fragP->fr_next->fr_address
                          - fragP->fr_address
@@ -1625,7 +1625,7 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
                                "to section %s of %s: '%s'",
                                (long) f->fr_fix),
                      (long) f->fr_fix,
-                     sec->name, stdoutput->filename,
+                     bfd_section_name (sec), bfd_get_filename (stdoutput),
                      bfd_errmsg (bfd_get_error ()));
          offset += f->fr_fix;
        }
@@ -1649,9 +1649,11 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
                                    "in section %s of %s: '%s'",
                                    "can't fill %ld bytes "
                                    "in section %s of %s: '%s'",
-                                   (long) count), (long) count,
-                                   sec->name, stdoutput->filename,
-                                   bfd_errmsg (bfd_get_error ()));
+                                   (long) count),
+                         (long) count,
+                         bfd_section_name (sec),
+                         bfd_get_filename (stdoutput),
+                         bfd_errmsg (bfd_get_error ()));
              offset += count;
              free (buf);
            }
@@ -1678,7 +1680,8 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
                                        "in section %s of %s: '%s'",
                                        (long) fill_size),
                              (long) fill_size,
-                             sec->name, stdoutput->filename,
+                             bfd_section_name (sec),
+                             bfd_get_filename (stdoutput),
                              bfd_errmsg (bfd_get_error ()));
                  offset += fill_size;
                }
@@ -1714,7 +1717,8 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
                                        "in section %s of %s: '%s'",
                                        (long) (n_per_buf * fill_size)),
                              (long) (n_per_buf * fill_size),
-                             sec->name, stdoutput->filename,
+                             bfd_section_name (sec),
+                             bfd_get_filename (stdoutput),
                              bfd_errmsg (bfd_get_error ()));
                  offset += n_per_buf * fill_size;
                }
@@ -2429,7 +2433,7 @@ write_object_file (void)
 #endif
 
   /* Stop if there is an error.  */
-  if (had_errors ())
+  if (!flag_always_generate_output && had_errors ())
     return;
 
   /* Now that all the sizes are known, and contents correct, we can
@@ -2481,6 +2485,10 @@ write_object_file (void)
 }
 
 #ifdef TC_GENERIC_RELAX_TABLE
+#ifndef md_generic_table_relax_frag
+#define md_generic_table_relax_frag relax_frag
+#endif
+
 /* Relax a fragment by scanning TC_GENERIC_RELAX_TABLE.  */
 
 long
@@ -3031,7 +3039,8 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
 #ifdef TC_GENERIC_RELAX_TABLE
                /* The default way to relax a frag is to look through
                   TC_GENERIC_RELAX_TABLE.  */
-               growth = relax_frag (segment, fragP, stretch);
+               growth = md_generic_table_relax_frag (segment, fragP,
+                                                     stretch);
 #endif /* TC_GENERIC_RELAX_TABLE  */
 #endif
                break;
This page took 0.025506 seconds and 4 git commands to generate.