This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][GOLD] Fix sorting of .init_array and .fini_array input sections.
"Doug Kwan (éæå)" <dougkwan@google.com> writes:
> 2010/3/1 Ian Lance Taylor <iant@google.com>:
>
>> I don't think this is the right place for this. ÂI think you should do
>> it in the loop over sections in Sized_relobj::do_layout. ÂPerhaps you
>> could call a little function to change the type if appropriate. ÂI
>> think you should only change the type if the initial type is
>> SHT_PROGBITS. ÂYou should also force .preinit_array to change from
>> SHT_PROGBITS to SHT_PREINIT_ARRAY.
>
> That means we need to make a copy of the section header because we may
> modify it. That's okay?
Hmmm, good point. OK, do it in Layout::layout then. I want to move
the test on the name as high as reasonable, because the lower the
level of code, the harder it tends to be to find and maintain.
Ian