[Bug ld/10373] New: SH: ld relaxes jmp to bsr.

View: New views
5 Messages — Rating Filter:   Alert me  

[Bug ld/10373] New: SH: ld relaxes jmp to bsr.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

ld relaxes jmp to bsr which should be bra. Apparently, it doesn't care about
jmp, but just generate bsr for R_SH_USES.

--
           Summary: SH: ld relaxes jmp to bsr.
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: yoshii dot takashi at renesas dot com
                CC: bug-binutils at gnu dot org
GCC target triplet: sh-*-*


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug ld/10373] SH: ld relaxes jmp to bsr.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From yoshii dot takashi at renesas dot com  2009-07-07 07:44 -------
Created an attachment (id=4039)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4039&action=view)
test program

as -relax jmp.s -o jmp.o; ld -relax jmp.o; objdump -d a.out
You will found "bsr" where "bra" should be.


--


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug ld/10373] SH: ld relaxes jmp to bsr.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From yoshii dot takashi at renesas dot com  2009-07-07 08:03 -------
Created an attachment (id=4040)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4040&action=view)
patch to fix

Because gcc generates .uses(R_SH_USES) both for jmp and jsr,
1. Gcc should not generate .uses for jmp. or
2. Ld should process both jmp and jsr.
I believe 2 is better.
This patch adds "jmp to bra" process to bfd.

--


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug ld/10373] SH: ld relaxes jmp to bsr.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From yoshii dot takashi at renesas dot com  2009-07-07 08:25 -------
Created an attachment (id=4041)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4041&action=view)
testcase patch for ld

This patch adds test for "jmp to bra relaxing" to ld's testcase.


--


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug ld/10373] SH: ld relaxes jmp to bsr.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



--
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #4039 is|1                           |0
              patch|                            |


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils