[PATCH][GOLD] Fix sorting of .init_array and .fini_array input sections.

Doug Kwan (關振德) dougkwan@google.com
Mon Mar 1 20:13:00 GMT 2010


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?

-Doug



More information about the Binutils mailing list