Summary: | [ld] Duplicate "warning: changing start of section" | ||
---|---|---|---|
Product: | binutils | Reporter: | Fangrui Song <i> |
Component: | ld | Assignee: | Alan Modra <amodra> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 2.35 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | 2020-03-04 00:00:00 | |
Attachments: | not so awful fix |
Description
Fangrui Song
2020-02-17 22:53:35 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=91114f7583fac8fdf57c58a1f632839da62e43da commit 91114f7583fac8fdf57c58a1f632839da62e43da Author: Alan Modra <amodra@gmail.com> Date: Wed Mar 4 15:33:26 2020 +1030 PR25570, ld duplicate "warning: changing start of section" PR 25570 * ldlang.c (lang_size_sections_1): Delay emitting non-fatal errors/warnings until final pass. * ldexp.c (fold_name): Likewise. Fixed Oops, not fixed. I'm going to close this as wont fix, because the effort required to fix it looks to be large compared to the annoyance of duplicate warnings when either using --warn-section-align or user linker scripts. Or you'd need to run an extra sizing pass just to report errors, and I don't want to slow down the linker just for this bug. Created attachment 12344 [details]
not so awful fix
Maybe it's not so hard to fix. I'll test this one overnight
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=baf09cba8f97be8044f7422cb31b1cb3f23e2762 commit baf09cba8f97be8044f7422cb31b1cb3f23e2762 Author: Alan Modra <amodra@gmail.com> Date: Wed Mar 4 21:14:19 2020 +1030 PR25570, ld duplicate "warning: changing start of section" Note that because we should report a signed delta from the previous VMA it isn't possible to use ngettext. ngettext only supports unsigned long values. So byte/bytes goes from the message. PR 25570 * ldlang.c (lang_sizing_iteration): New static var. (lang_size_sections_1): Warn about no memory region only on first iteration. Warn about changing start address on first iteration then any delta from that on subsequent iterations. Report a signed delta. (one_lang_size_sections_pass): Increment lang_sizing_iteration. Patch applied The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=92d4b13bf378f575cdc796ec9340c12267b7eff1 commit 92d4b13bf378f575cdc796ec9340c12267b7eff1 Author: Alan Modra <amodra@gmail.com> Date: Thu Mar 5 21:34:23 2020 +1030 Reduce --warn-section-align output PR 25570 * ldlang.c (lang_size_sections_1): Don't report changes on second and subsequent iterations that make no change in alignment from that already reported. |