PR25570, ld duplicate "warning: changing start of section"
authorAlan Modra <amodra@gmail.com>
Wed, 4 Mar 2020 05:03:26 +0000 (15:33 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 4 Mar 2020 05:05:59 +0000 (15:35 +1030)
PR 25570
* ldlang.c (lang_size_sections_1): Delay emitting non-fatal
errors/warnings until final pass.
* ldexp.c (fold_name): Likewise.

ld/ChangeLog
ld/ldexp.c
ld/ldlang.c

index 94fe79f6c24cdca13b68bcfe252b4daf36b9dae3..9005459b563ed6ca8d94745528ed12b7b1265768 100644 (file)
@@ -1,3 +1,10 @@
+2020-03-04  Alan Modra  <amodra@gmail.com>
+
+       PR 25570
+       * ldlang.c (lang_size_sections_1): Delay emitting non-fatal
+       errors/warnings until final pass.
+       * ldexp.c (fold_name): Likewise.
+
 2020-03-03  Nick Clifton  <nickc@redhat.com>
 
        PR 25588
index 6d1457b929abd027d413b882cf058e874178ffe2..d2b1b43a5a9d72610a8d9986b173e871a0b7d7bf 100644 (file)
@@ -742,7 +742,7 @@ fold_name (etree_type *tree)
              output_section = h->u.def.section->output_section;
              if (output_section == NULL)
                {
-                 if (expld.phase <= lang_mark_phase_enum)
+                 if (expld.phase != lang_final_phase_enum)
                    new_rel (h->u.def.value, h->u.def.section);
                  else
                    einfo (_("%X%P:%pS: unresolvable symbol `%s'"
index be9ac36ede430456456d14e97afcb0356cfb515c..b089ac304b1e6806a83639b7c1db854550c6fb25 100644 (file)
@@ -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 "
This page took 0.028926 seconds and 4 git commands to generate.