summaryrefslogtreecommitdiff
path: root/bfd/elf32-mep.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-07-04 14:23:22 +0000
committerNick Clifton <nickc@redhat.com>2007-07-04 14:23:22 +0000
commit3587d387d977ad7a8fde6f37318fdf4614d2204e (patch)
tree170713a4b0d5af595c29fe3e08c8cca7e74be96e /bfd/elf32-mep.c
parent5690b058396216a168100dccc548c4a7bb8640a6 (diff)
downloadbinutils-redhat-3587d387d977ad7a8fde6f37318fdf4614d2204e.tar.gz
* elf32-mep.c (mep_final_link_relocate) [R_MEP_HI16S]: Correctly compensate
for high bit set in R_MEP_LOW16.
Diffstat (limited to 'bfd/elf32-mep.c')
-rw-r--r--bfd/elf32-mep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elf32-mep.c b/bfd/elf32-mep.c
index 0bba7e5010..d1ee6a9695 100644
--- a/bfd/elf32-mep.c
+++ b/bfd/elf32-mep.c
@@ -333,6 +333,8 @@ mep_final_link_relocate
byte[3^e2] = ((u >> 16) & 0xff);
break;
case R_MEP_HI16S: /* ----------------vutsrqponmlkjihg */
+ if (s & 0x8000)
+ s += 0x10000;
byte[2^e2] = ((s >> 24) & 0xff);
byte[3^e2] = ((s >> 16) & 0xff);
break;