Cross debugger and load address (want download to VMA, not LMA)

Grant Edwards grante@visi.com
Mon Apr 19 14:55:00 GMT 2004


> toralf>> If not, is there any way to produce a version of the binary
> 	 with LMA = VMA for .text and .data, besides relinking with a
> 	 separate linker script?

You can use objcopy to change both the LMA and VMA of sections.

> You might want to try something like this: Note that the MY_ROM_START
> is a SYMBOL - and it is not defined in the linker script, instead
> define it on the linker command line.
> 
> >>   SECTIONS {
> >>     . = MY_ROM_START;
> >>     .vectors : { *(.vectors) }
> >>     . = MY_TEXT_START;
> >>    
> >>     [snip]
> >>   }

If maintaining two separate linker scripts is the concern, you
can put the common stuff in third file that is included by the
ram-specific file and the rom-specific file.

-- 
Grant Edwards
grante@visi.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list