This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Sort input section by list


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]