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 | f680ea79cc76d52d4b89d319f5e1a1e2f360b435 (patch) | |
tree | c399bc9c6706691de5db6bbc715bf5561ec9066a /bfd/elf32-i860.c | |
parent | 2de139ba84480ec495470c05bab7de61927fbc41 (diff) | |
download | gdb-f680ea79cc76d52d4b89d319f5e1a1e2f360b435.zip gdb-f680ea79cc76d52d4b89d319f5e1a1e2f360b435.tar.gz gdb-f680ea79cc76d52d4b89d319f5e1a1e2f360b435.tar.bz2 |
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/elf32-i860.c')
-rw-r--r-- | bfd/elf32-i860.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c index fd68dc6..0e013ef 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; |