use LMA instead of VMA?

Daniel Jacobowitz drow@false.org
Sun Jun 11 00:20:00 GMT 2006


On Sat, Jun 10, 2006 at 05:04:22PM -0400, DJ Delorie wrote:
> 
> > i'd like to test my startup code in crt0.S but have some problems
> > with that as gdb uses the sections VMA instead of the LMA.
> 
> Why would this confuse gdb?  If the crt0 code is *running* it should
> already be at its VMA.  In the cases where LMA and VMA differ in my
> projects, it's because I need to initialize RAM from ROM, so I don't
> need gdb to know about the data until after I've moved it to its VMA.

This seems to be a pretty standard problem - if you have any kind of
loader, then your crt0 is expected to run at VMA, but if you don't have
a loader, crt0 has to run at LMA and handles the switch to VMAs.  I've
used a couple different sets of tools now that behaved this way, most
recently ARM's.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list