Porting the linker

Nick Clifton nickc@redhat.com
Wed Mar 10 14:24:00 GMT 2010


Hi Jean Christophe,

>> Just a thought - it might be easier in the linker to fill the large text and
>> data sections first and then, as late as possible, extract portions of those
>> sections to go into the smaller text and data sections.
>
> That could be a solution, any hints as to how to do that ?

As a guess - how about putting the code in where the section garbage 
collection occurs ?  (Search for "gc_section" in the bfd/ directory for 
lots of examples).  Currently the garbage collection code is used to 
strip out unneeded sections, but maybe it will also prove to be a 
suitable place to move parts of sections around.

Cheers
   Nick



More information about the Binutils mailing list