RFC: Sort input section by list
Nick Clifton
nickc@redhat.com
Tue Aug 26 11:44:00 GMT 2008
Hi H.J.
> I got a request for a new linker feature to sort input sections by a
> list provided at command line.
Is there a good reason for providing this list via a command line switch
as opposed to say using a suitably customised linker script ? (Possibly
with an extended grammar for input section selection).
> 2. The linker script is similar to version script
>
> .text {
> extern "C++"
> {
> foo(int);
> };
> };
>
> where .text will be the prefix of section name. It will match .text._Z3fooi.
What is the real purpose of this feature ? Ie do you know why it has
been requested ? The implication of the example you have given is that
the user wants to put certain name-mangled functions at the start of the
.text section, but why ?
(I suspect that the user's problem could be solved without modifying the
linker by using gcc's "section" function attribute instead...)
> Any comments?
How do you specify that the named section is intended to go *after* the
other sections that start with the same prefix ?
Cheers
Nick
More information about the Binutils
mailing list