summaryrefslogtreecommitdiff
path: root/bfd
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
commit4d421096e0d5a63190fa79e721a06c4e943f599f (patch)
tree7eee2b51d5ab57a62118266cdc3eac41f4c96c56 /bfd
parentd2420a8c62dad7bebc81cac5684829ee73d16517 (diff)
downloadbinutils-gdb-4d421096e0d5a63190fa79e721a06c4e943f599f.tar.gz
* elf32-v850.c (v850_elf_perform_relocation): Fix overflow
handling of R_V850_HI16_S relocation.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-v850.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 554227f2b4e..5c5e01bccf9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-11 Nick Clifton <nickc@redhat.com>
+
+ * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
+ handling of R_V850_HI16_S relocation.
+
2010-01-11 Alan Modra <amodra@gmail.com>
PR 11103
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 2965e290dd6..d7aaed49f7d 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;