Linking images at one address, but loading them at another.

Richard Earnshaw rearnsha@arm.com
Fri Oct 26 03:40:00 GMT 2001


> Hi Richard,
> 
> > > > arm-elf-strip -g -o os os.gdb 
> > > > BFD: netbsd: warning: allocated section `.text' not in segment
> 
> Right - the reason for this is that segments are mapped to sections
> via their VMA address not their LMA address.  The solution however, is
> simple.  Provide a second segment to hold the relocated .text
> segment, like this:

Except that then, surely this will create a segment that the loader will 
try to download to the virtual address, which is exactly what I'm trying 
to prevent -- I want it to download it to the low memory region, even 
though it is intended for execution at the high addresses.




More information about the Binutils mailing list