Summary: | SH: ld relaxes jmp to bsr. | ||
---|---|---|---|
Product: | binutils | Reporter: | Takashi YOSHII <yoshii.takashi> |
Component: | ld | Assignee: | unassigned |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bug-binutils, kkojima, olegendo |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | sh-*-* | |
Build: | Last reconfirmed: | ||
Attachments: |
test program
patch to fix testcase patch for ld |
Description
Takashi YOSHII
2009-07-07 07:41:06 UTC
Created attachment 4039 [details]
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.
Created attachment 4040 [details]
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.
Created attachment 4041 [details]
testcase patch for ld
This patch adds test for "jmp to bra relaxing" to ld's testcase.
The issue has been fixed on trunk and should be available in the next release that follows binutils 2.24. |