bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/13352] New: microblaze linker relocation bug: R_MICROBLAZE_64_NO


From: bfkeane at gmail dot com
Subject: [Bug ld/13352] New: microblaze linker relocation bug: R_MICROBLAZE_64_NONE
Date: Thu, 27 Oct 2011 17:28:25 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=13352

             Bug #: 13352
           Summary: microblaze linker relocation bug: R_MICROBLAZE_64_NONE
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified


Created attachment 6037
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6037
Tarball contains two C source files. Please compile and link as described
above.

In certain cases the mb-gcc linker doesn't update the IMM operand when address
mode optimization (a.k.a. relaxation, ld -relax) shrinks a R_MICROBLAZE_64_NONE
relocation. I believe the assembler generates this relocation type for a BRLID
to a function declared static in the same module. If the relocation target in
the BRLID instruction is further than 64kbytes away _before_ relaxation (i.e.
on output from the assembler) but changes to less than 64Kbytes away _after_
relaxation, the linker updates the BRLID immediate operand but fails to update
the IMM operand.

Note this only happens when an input .o is fairly large (at least 64KB of
.text).

One workaround is to invoke ld directly and omit the -relax option.

I'm using Xilinx EDK 12.4. "mb-gcc -v" says:
gcc version 4.1.2 20070214 (Xilinx 12.3 Build EDK_MS3.66 14 Jul 2010)

To reproduce the problem:

1) unpack the two source files from the attached tarball
2) mb-gcc -v -mcpu=v8.00.b -mno-xl-soft-mul -O -o relax relax.c relax2.c
3) mb-objdump -d relax | grep brlid | grep -v '//'

The last command will print the line of the badly-linked subroutine call.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]