diff options
author | Jason Eckhardt <jle@rice.edu> | 2003-08-24 18:16:46 +0000 |
---|---|---|
committer | Jason Eckhardt <jle@rice.edu> | 2003-08-24 18:16:46 +0000 |
commit | 6c735457b7ab2fd9e2243c3d7e2a9f8e9f0dee58 (patch) | |
tree | c1a417cb7fe4225733ef0b93ed449ab4a5a4314d /bfd | |
parent | 91639ce367f0fa92fb664779924ddf37157a826d (diff) | |
download | binutils-redhat-6c735457b7ab2fd9e2243c3d7e2a9f8e9f0dee58.tar.gz |
2003-08-24 Jason Eckhardt <jle@rice.edu>
* elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
shift by 2 before storing the relocated value.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-i860.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dc7750a293..6fe12d577d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2003-08-24 Jason Eckhardt <jle@rice.edu> + + * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and + shift by 2 before storing the relocated value. + 2003-08-23 Jason Eckhardt <jle@rice.edu> * coff-i860.c (coff_i860_reloc_nyi): New function. diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c index fd68dc6336..0e013ef3a7 100644 --- a/bfd/elf32-i860.c +++ b/bfd/elf32-i860.c @@ -712,7 +712,8 @@ elf32_i860_relocate_pc16 (bfd *input_bfd, /* Relocate. */ value += rello->r_addend; - /* Separate the fields and insert. */ + /* Adjust the value by 4, then separate the fields and insert. */ + value = (value - 4) >> howto->rightshift; value = (((value & 0xf800) << 5) | (value & 0x7ff)) & howto->dst_mask; insn = (insn & ~howto->dst_mask) | value; |