From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8949 invoked by alias); 10 Jun 2006 16:04:39 -0000 Received: (qmail 8931 invoked by uid 22791); 10 Jun 2006 16:04:38 -0000 X-Spam-Check-By: sourceware.org Received: from mail.s.netic.de (HELO mail.s.netic.de) (212.9.160.11) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 10 Jun 2006 16:04:35 +0000 Received: from host-213-178-187-22.dsl.netic.de ([213.178.187.22] helo=schleim.qwe.de) by mail.s.netic.de with esmtp (Exim 4.51) id 1Fp5wu-0004yd-P7 for gdb@sourceware.org; Sat, 10 Jun 2006 18:04:32 +0200 Received: from localhost (localhost [IPv6:::1]) by schleim.qwe.de (Postfix) with ESMTP id 061B53B594 for ; Sat, 10 Jun 2006 17:07:59 +0200 (CEST) From: Torsten Mohr To: gdb@sourceware.org Subject: use LMA instead of VMA? Date: Sat, 10 Jun 2006 21:04:00 -0000 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606101707.58539.tmohr@s.netic.de> 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/msg00069.txt.bz2 Hi, 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. For this i can't test my code in the simulator, as .data and so on are always overwritten with incorrect data. At the moment i use the preprocessor and -DREAL_TARGET=0 or =1 to generate an ELF file for the target or for the simulator. Is there a better way to work around gdbs behaviour here? Would it work to use objcopy --change-section-vma .data= \ load_address(.data) to set a sections vma? Or would that crash something else then? What else would be the preferred way to test a startup code? Best regards, Torsten.