PR25570, ld duplicate "warning: changing start of section"
[deliverable/binutils-gdb.git] / ld / ldlang.c
index e100c0533cfb778860411bf17ff40a348d683e93..b089ac304b1e6806a83639b7c1db854550c6fb25 100644 (file)
@@ -489,7 +489,7 @@ compare_section (sort_type sort, asection *asec, asection *bsec)
       /* Fall through.  */
 
     case by_name:
-sort_by_name:
+    sort_by_name:
       ret = strcmp (bfd_section_name (asec), bfd_section_name (bsec));
       break;
 
@@ -3659,7 +3659,7 @@ ldlang_open_ctf (void)
   if ((ctf_output = ctf_create (&err)) != NULL)
     return;
 
-  einfo (_("%P: warning: CTF output not created: `s'\n"),
+  einfo (_("%P: warning: CTF output not created: `%s'\n"),
         ctf_errmsg (err));
 
   LANG_FOR_EACH_INPUT_STATEMENT (errfile)
@@ -5554,7 +5554,7 @@ lang_size_sections_1
                        && (strcmp (lang_memory_region_list->name_list.name,
                                    DEFAULT_MEMORY_REGION) != 0
                            || lang_memory_region_list->next != NULL)
-                       && expld.phase != lang_mark_phase_enum)
+                       && expld.phase == lang_final_phase_enum)
                      {
                        /* By default this is an error rather than just a
                           warning because if we allocate the section to the
@@ -5592,7 +5592,7 @@ lang_size_sections_1
                    if (dotdelta != 0
                        && (config.warn_section_align
                            || os->addr_tree != NULL)
-                       && expld.phase != lang_mark_phase_enum)
+                       && expld.phase == lang_final_phase_enum)
                      einfo (ngettext ("%P: warning: changing start of "
                                       "section %s by %lu byte\n",
                                       "%P: warning: changing start of "
@@ -7837,6 +7837,8 @@ lang_process (void)
      output statement, so that it isn't reordered.  */
   process_insert_statements (&lang_os_list.head->header.next);
 
+  ldemul_before_place_orphans ();
+
   /* Find any sections not attached explicitly and handle them.  */
   lang_place_orphans ();
 
This page took 0.036901 seconds and 4 git commands to generate.