]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/binutils-tumbl.git/commitdiff
2003-10-04 Christian Groessler <chris@groessler.org>
authorChristian Groessler <chris@groessler.org>
Sat, 4 Oct 2003 21:09:29 +0000 (21:09 +0000)
committerChristian Groessler <chris@groessler.org>
Sat, 4 Oct 2003 21:09:29 +0000 (21:09 +0000)
* coff-z8k.c (extra_case): Fix displacement length check for R_JR
and R_CALLR.

bfd/ChangeLog
bfd/coff-z8k.c

index f1bb64e17098e1825742633d041cea9814c1229e..fe9f395dad3981fb9179330e4bf6c915d04ca7ba 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-04  Christian Groessler  <chris@groessler.org>
+
+       * coff-z8k.c (extra_case): Fix displacement length check for R_JR
+       and R_CALLR.
+
 2003-10-04  Stephane Carrez  <stcarrez@nerim.fr>
 
        * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
index 3337376fadb2bd19d3e940c646a79b0ad3270b4d..bc4bd24533d8bdb985a0f456d2089f813ebc1a9b 100644 (file)
@@ -268,7 +268,7 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
          abort ();
        gap /= 2;
 
-       if (gap > 0 || gap < -128)
+       if (gap > 0 || gap < -127)
          {
            if (! ((*link_info->callbacks->reloc_overflow)
                   (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
@@ -295,8 +295,7 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
 
        if (gap & 1)
          abort ();
-       gap /= 2;
-       if (gap > 8191 || gap < -8192)
+       if (gap > 4096 || gap < -4095)
          {
            if (! ((*link_info->callbacks->reloc_overflow)
                   (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
@@ -304,6 +303,7 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
                    input_section, reloc->address)))
              abort ();
          }
+       gap /= 2;
        bfd_put_16 (in_abfd,
                     (bfd_get_16 ( in_abfd, data + *dst_ptr) & 0xf000) | (-gap & 0x0fff),
                     data + *dst_ptr);