This is the mail archive of the
mailing list for the binutils project.
Re: linker relaxation
- From: "Edgar E. Iglesias" <edgar dot iglesias at gmail dot com>
- To: naga raj <gnuuser dot raj at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 24 Jun 2011 02:35:02 +0200
- Subject: Re: linker relaxation
- References: <BANLkTinqX_Ywg53jHaUNuh_Lo=RKPE+MGQ@mail.gmail.com>
On Wed, Jun 22, 2011 at 10:28:32AM +0530, naga raj wrote:
> 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
> 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).
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