How to make a section absolute?

Nick Clifton nickc@redhat.com
Thu Dec 4 12:34:00 GMT 2008


Hi Daniel,

> For a system with fast on-chip RAM without MMU I need to map an elf section
> to a fixed address. The problem is that the remaining sections need to
> remain relocable and there is no way to tell the loader not to relocate a
> section.

Hang on, shouldn't the loader be handling this for you ?  Ie shouldn't 
the loader decide if it is appropriate to map a particular section to 
this fast area of on-chip RAM and if so handle the relocating of the 
section to that address ?  (Maybe the program can give the loader a hint 
that a particular section would like to be placed in on-chip RAM, but it 
is up to the loader to decide how this precious resource should be 
allocated).


> Is it possible to resolve relocations for a specific section with ld or is
> there a way to do this with objcopy?

Nope, sorry.

Cheers
   Nick




More information about the Binutils mailing list