This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: use LMA instead of VMA?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]