This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/12380: Assertion in linker script failed twice
On Mon, Jan 10, 2011 at 5:27 PM, Alan Modra <amodra@gmail.com> wrote:
> On Sun, Jan 09, 2011 at 10:06:12AM -0800, H.J. Lu wrote:
>> Hi,
>>
>> This patch avoids duplicated assert messages. ?OK to install?
>
> This is not the correct fix. ?The reason we get duplicate messages is
> that relaxation and ELF section header sizing cause multiple
> iterations of section sizing/placement. ?Since an assert can be based
> on section size and/or address, the assert you want is the one from
> the *last* pass, not the first one as you have in your patch.
>
> I believe the real problem is that we set lang_final_phase too soon,
> so something like the following untested patch should work.
>
> ? ? ? ?* ldlang.c (lang_size_sections): Don't set final phase here.
> ? ? ? ?(lang_process): Do so here, just before lang_do_assignments.
>
Do we know the impact of such change on existing linker scripts?
--
H.J.