From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23644 invoked by alias); 24 Jun 2011 00:35:21 -0000 Received: (qmail 23565 invoked by uid 22791); 24 Jun 2011 00:35:21 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Jun 2011 00:35:06 +0000 Received: by fxm18 with SMTP id 18so1969458fxm.0 for ; Thu, 23 Jun 2011 17:35:05 -0700 (PDT) Received: by 10.223.47.209 with SMTP id o17mr3494363faf.129.1308875705601; Thu, 23 Jun 2011 17:35:05 -0700 (PDT) Received: from localhost (h59ec3266.selukar.dyn.perspektivbredband.net [89.236.50.102]) by mx.google.com with ESMTPS id q21sm1309549fan.40.2011.06.23.17.35.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Jun 2011 17:35:04 -0700 (PDT) Date: Fri, 24 Jun 2011 00:35:00 -0000 From: "Edgar E. Iglesias" To: naga raj Cc: binutils@sourceware.org Subject: Re: linker relaxation Message-ID: <20110624003502.GC13953@laped.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00272.txt.bz2 On Wed, Jun 22, 2011 at 10:28:32AM +0530, naga raj wrote: > Hi, > > I am using Xilinx Microblaze target with Binutils version 2.21. > > My issue is that after compiler generates assembly instructions, > linker is relaxing few of the instruction and up to this part it is > fine. > But my linker is not decreasing relaxed instructions space as a > result debug_loc locations in the dwarf2 debugging information is > displaying the address ranges that are generated by compiler. > So due to this my debugging information is getting corrupted with > wrong addresses. > > I know this is a known issue in linker relaxation, but as a newbie > to binutils I could not figure it out where to change in my code. > > > Please help in resolving this issue. Please point me to any material > or existing port(patch). Hi, I've seen similar errors before. IIRC, the microblaze relax pass in binutils is broken (in the way you say) but I recall only seeing this with bare-metal toolchains. It turned out that GCC, when built for linux targets, turns off linker relaxation. I figured it was due to the relax bugs. I dont remember all the details now though, so I might be wrong. Cheers