aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-z8k.c
diff options
context:
space:
mode:
authorChristian Groessler <chris@groessler.org>2003-10-04 21:09:29 +0000
committerChristian Groessler <chris@groessler.org>2003-10-04 21:09:29 +0000
commit8b7cf393a5c43060fda7bb646a70ece4a5a24063 (patch)
treeb4ffb66a84e5a224ff03f7a10f7571790f0d6d4f /bfd/coff-z8k.c
parent0a6a3ebe971383afdfca26b4f9a2669bd09770b5 (diff)
downloadgdb-8b7cf393a5c43060fda7bb646a70ece4a5a24063.zip
gdb-8b7cf393a5c43060fda7bb646a70ece4a5a24063.tar.gz
gdb-8b7cf393a5c43060fda7bb646a70ece4a5a24063.tar.bz2
2003-10-04 Christian Groessler <chris@groessler.org>
* coff-z8k.c (extra_case): Fix displacement length check for R_JR and R_CALLR.
Diffstat (limited to 'bfd/coff-z8k.c')
-rw-r--r--bfd/coff-z8k.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/coff-z8k.c b/bfd/coff-z8k.c
index 3337376..bc4bd24 100644
--- a/bfd/coff-z8k.c
+++ b/bfd/coff-z8k.c
@@ -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);