This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: RFC: Add --sort-section to ld
On Wed, Aug 25, 2004 at 08:51:09PM -0400, Ian Lance Taylor wrote:
> "H. J. Lu" <hjl@lucon.org> writes:
>
> > We'd like to have a way to apply SORT to all wildcard sections in the
> > default linker scripts. I am thinking to add a new linker switch,
> > --sort-section, which sorts all wildcard sections. It will be ignored
> > when a user provided linker script is used. Any comments?
>
> Why should --sort-section be ignored with a user provided linker
> script?
If user wants to sort, he/she can use SORT in his/her linker script.
But I am not against it for user provided linker scripts.
>
> If we add this, I think it should take a parameter, so that we can
> specify the type of sort to use. For example: sort by name, sort by
> section size.
What other parameters can it have? The current SORT only sorts by name.
Should we also add SORT_SIZE and SORT_NAME? The current SORT will be
an alias for SORT_NAME.
H.J.