ld maps sections without consider memory region?

Nick Clifton nickc@redhat.com
Thu Feb 15 16:31:00 GMT 2007


Hi Daniel,

>> This is because you have not defined the program headers for your 
>> executable, so the linker has created one.  Since on the MIPS pages are 
>> 0x10000 in size the linker creates just one segment to contain both the 
>> .begin and the .tail sections.
> 
> Do you think the linker should be combining across explicit MEMORY
> regions?  I'm not sure how hard it would be to stop it, but it does
> seem unuseful.

"unuseful" ? :-)

Yes it would make sense to break segments up on memory region 
boundaries.  Alternatively we could check region sizes against page 
sizes in case multiple regions fit into a single page and issue a 
warning message if explicit program headers have not been specified. 
(After all the user might want multiple regions to be combined into a 
single segment).

Maybe some kind soul will volunteer to do this...

Cheers
   Nick



More information about the Binutils mailing list