Hi Mike On Wed, Jun 22, 2011 at 8:38 PM, Michael Eager <eager@xxxxxxxxxx> wrote: > On 06/22/2011 05:13 AM, naga raj wrote: > >> Investigating the same issue further. I found that issue is in linker. >> >> 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(including relaxed instruction spaces). >> So due to this my debugging information is getting corrupted with >> wrong addresses. > > Sounds like a possible cause. > >> 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. > > What known issue? > >> I am using Xilinx Microblaze target with Binutils version 2.21. >> >> Please help in resolving this issue. Please point me to any material >> or existing port(patch). > > There's no existing patch; this appears to be a new problem. > > The relaxation code is in binutils/bfd/elf32-microblaze.c in > microblaze_elf_relax_section(). You will need to find out if > it isn't handling the relocations correctly, not moving code > correctly, incorrectly adjusting the fixup value, or perhaps > some other reason why the relaxed address is computed incorrectly. Thanks for information. I will look in to it and get back to you if required. > -- > Michael Eager eager@xxxxxxxxxxxx > 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077 > Thanks Nagaraju