From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26395 invoked by alias); 10 Jun 2006 23:47:10 -0000 Received: (qmail 26385 invoked by uid 22791); 10 Jun 2006 23:47:10 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sat, 10 Jun 2006 23:47:08 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FpDAW-0002pF-R3; Sat, 10 Jun 2006 19:47:04 -0400 Date: Sun, 11 Jun 2006 00:20:00 -0000 From: Daniel Jacobowitz To: DJ Delorie Cc: tmohr@s.netic.de, gdb@sourceware.org Subject: Re: use LMA instead of VMA? Message-ID: <20060610234704.GA10641@nevyn.them.org> Mail-Followup-To: DJ Delorie , tmohr@s.netic.de, gdb@sourceware.org References: <200606101707.58539.tmohr@s.netic.de> <200606102104.k5AL4Mcc028893@greed.delorie.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200606102104.k5AL4Mcc028893@greed.delorie.com> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00072.txt.bz2 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