[Bug ld/10378] New: SH: jump table for switch/case got invalid adjustment during relaxing.

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

[Bug ld/10378] New: SH: jump table for switch/case got invalid adjustment during relaxing.

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

Reply to Author | View Threaded | Show Only this Message

R_SH_SWITCH8(.byte Label2-Label1) can be alterd if codes between two labels got
shorter by relaxing. But currently the adjustment value seems to be bad.

--
           Summary: SH: jump table for switch/case got invalid adjustment
                    during relaxing.
           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=10378

------- 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/10378] SH: jump table for switch/case got invalid adjustment during relaxing.

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-08 06:03 -------
Created an attachment (id=4044)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4044&action=view)
test program

as -relax adjsw8.s -o adjsw8.o; ld -relax adjsw8.o; objdump -t; objdump -s
and see if first 3 bytes are L1-L0,L2-L0,L3-L0 (should be 04 08 0c).
HEAD of CVS produces 04 06 0a.


--


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

------- 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/10378] SH: jump table for switch/case got invalid adjustment during relaxing.

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-08 06:38 -------
Created an attachment (id=4045)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4045&action=view)
patch to fix

I added small code to gas as bfd/elf-sh.c expects r_addend holds the different
between reloc address and label1. I can't find any official documents(ELF-ps or
so), though.
Tested for target=sh4-unknown-linux-gnu host=build=x86_64-pc-linux-gnu with
$ make check-bfd check-gas check-ld RUNTESTFLAGS="--target_board=sh-sim
SIM=$PWD/sim/sh/run"
New test case and even old sh.exp:"SH relaxing execution" can detect this
issue.

--


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

------- 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