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 Arjan,

I suppose we chose differently; from a distro point of view patching each app's code that big
is a no go for us; once the new binutils is released we can automate and use the new feature
pretty quickly.
Add to this that which functions are on the list will also depend on which arguments you pass to configure...
sorry but really the "just patch the code in 3000 places" is really not going to work ;-(

Would you agree that if a using-currently-available-tools process could be automated then it would be an acceptable solution to you ?


Lets assume that you have gotten to the stage where you have the profiled list of functions in the order you wish them to appear in the final binary. Lets also assume that you have compiled the sources with -ffunction-sections. You could use a sed/awk script to convert the function names into a linker script fragment that specifically references each of the function sections by name. Then all you would need is a slightly modified default linker script that INCLUDEs this constructed fragment at the right place in the generic linker script.

Cheers
  Nick

PS. For the record I am not saying that this feature cannot be added to the linker. I am just trying to avoid feature bloat by seeing if your problem can be solved by using the already existing features of the compiler and linker.


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