summaryrefslogtreecommitdiff
path: root/bfd/elf32-v850.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-01-11 14:19:40 +0000
committerNick Clifton <nickc@redhat.com>2010-01-11 14:19:40 +0000
commit4e9209b245e21937dc9ee916139947f02bd11056 (patch)
tree5b0ee39dddff77be96b6cc77135ae4afcb633554 /bfd/elf32-v850.c
parent0a6f111f106606b6c6aaea33cf1c863a37c3c712 (diff)
downloadbinutils-redhat-4e9209b245e21937dc9ee916139947f02bd11056.tar.gz
* elf32-v850.c (v850_elf_perform_relocation): Fix overflow
handling of R_V850_HI16_S relocation.
Diffstat (limited to 'bfd/elf32-v850.c')
-rw-r--r--bfd/elf32-v850.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 2965e290dd..d7aaed49f7 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -550,7 +550,7 @@ v850_elf_perform_relocation (bfd *abfd,
addend = (addend >> 16) + ((addend & 0x8000) != 0);
/* This relocation cannot overflow. */
- if (addend > 0x7fff)
+ if (addend > 0xffff)
addend = 0;
insn = addend;