2.30 Branch Planned for Friday...

H.J. Lu hjl.tools@gmail.com
Thu Jan 11 17:27:00 GMT 2018


On Thu, Jan 11, 2018 at 9:07 AM, Nick Clifton <nickc@redhat.com> wrote:
> Hi H.J.
>
>> I'd like to fix:
>>
>> https://sourceware.org/bugzilla/show_bug.cgi?id=22677
>>
>> with
>>
>> https://sourceware.org/ml/binutils/2018-01/msg00173.html
>
> Ha!  Great minds think alike. :-)
>
> I have just posted a very similar patch to the PR, although I
> think that we do not need any special case code for the PRE_INIT_ARRAY
> section as that is handled by a KEEP directive in the linker script.
> Hmm - unless there can be PREINIT_ARRAY sections whose name is not
> .preinit_array.  Which I suppose is possible...

Exactly.   Linker script for ld -r has:

 .preinit_array   0 :
  {
    KEEP (*(.preinit_array))
  }

It doesn't cover

 .section .preinit_array.01000,"aw",%preinit_array
 .p2align 2
 .word 0

in my testcase in my patch.

> Would you mind extending your patch to include this scenario ?
> I think that with that change in place I would be happy to approve it.
>

My patch does cover that with a testcase :-).


-- 
H.J.



More information about the Binutils mailing list