* config/tc-sh.c (md_apply_fix3): Take account of fx_offset
authorKaz Kojima <kkojima@rr.iij4u.or.jp>
Sat, 30 Nov 2002 14:09:12 +0000 (14:09 +0000)
committerKaz Kojima <kkojima@rr.iij4u.or.jp>
Sat, 30 Nov 2002 14:09:12 +0000 (14:09 +0000)
for BFD_RELOC_32_PLT_PCREL.
* sh/gas/sh/pic.s: Add a test for ".long foo@PLT+.-2-label".
* sh/gas/sh/pic.d: Add expected output.

gas/ChangeLog
gas/config/tc-sh.c
gas/testsuite/ChangeLog
gas/testsuite/gas/sh/pic.d
gas/testsuite/gas/sh/pic.s

index 31bc8e1875238b1f17fb70163ac08b3213262983..ef0ae722060f60ef13748c4e6d2340c30932cadf 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-30  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+       * config/tc-sh.c (md_apply_fix3): Take account of fx_offset
+       for BFD_RELOC_32_PLT_PCREL.
+
 2002-11-30  Alan Modra  <amodra@bigpond.net.au>
 
        * dwarf2dbg.c, write.c, config/obj-aout.c, config/obj-coff.c,
index 74b7593ff8e1bfd8b201eb1b8ff94c84b9265137..e9b5d0d26c1542c62e0de3d32f7dcd7be8987df0 100644 (file)
@@ -3516,7 +3516,7 @@ md_apply_fix3 (fixP, valP, seg)
       /* Make the jump instruction point to the address of the operand.  At
         runtime we merely add the offset to the actual PLT entry.  */
       * valP = 0xfffffffc;
-      val = 0;
+      val = fixP->fx_offset;
       if (fixP->fx_subsy)
        val -= S_GET_VALUE (fixP->fx_subsy);
       fixP->fx_addnumber = val;
index 396a852b697ededb6b44979dc3f6a0e4920c9cd6..3a7f20560d5dfd282cc73003ace28e0750052ec3 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-30  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+       * sh/gas/sh/pic.s: Add a test for ".long foo@PLT+.-2-label".
+       * sh/gas/sh/pic.d: Add expected output.
+
 2002-11-29  Nick Clifton  <nickc@redhat.com>
 
        * gas/arm/arch5tej.s: Replace "nop"s with tests of breakpoint
index f4ac77518d1fb00c494b802e63a378403181d913..9a2d0cecdde65ad58ff072f6c64c34ca9edcb264 100644 (file)
@@ -38,3 +38,6 @@ Disassembly of section \.text:
 0x00000040 00 00               \.word 0x0000
                        40: R_SH_PLT32  foo
 0x00000042 00 14               mov\.b  r1,@\(r0,r0\)
+0x00000044 00 00               \.word 0x0000
+                       44: R_SH_PLT32  foo
+0x00000046 00 1e               mov\.l  @\(r0,r1\),r0
index 6e0c53e25855cff1cc61d9cff5892b8722f8ee36..bb9551c24271d41c9744a7fdcd05f558f9359aa0 100644 (file)
@@ -39,3 +39,5 @@
        .long   foo@PLT + . - (.LPLTcall_old + 2)
 .Lfooplt_new:
        .long   foo@PLT - (.LPLTcall_new + 2 - .)
+.Lfooplt_old2:
+       .long   foo@PLT + . - 2 - .LPLTcall_old
This page took 0.041675 seconds and 4 git commands to generate.