summaryrefslogtreecommitdiffstats
path: root/contrib/binutils
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-12-29 15:23:03 +0000
committerian <ian@FreeBSD.org>2015-12-29 15:23:03 +0000
commita1f07058d3891f919d489b5df7301fc543d88dd9 (patch)
tree5728b8e8758319ae67ea090abd5f00112dcf5e03 /contrib/binutils
parent20013eeacdd584031166ed7273622e198f91407a (diff)
downloadFreeBSD-src-a1f07058d3891f919d489b5df7301fc543d88dd9.zip
FreeBSD-src-a1f07058d3891f919d489b5df7301fc543d88dd9.tar.gz
Correct the code for sign-extending a 16 bit value. As near as I can tell
this is effectively a no-op -- the addend term in MOVT/MOVW relocations always seems to be zero. But this is correct and the old code wasn't.
Diffstat (limited to 'contrib/binutils')
-rw-r--r--contrib/binutils/bfd/elf32-arm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/binutils/bfd/elf32-arm.c b/contrib/binutils/bfd/elf32-arm.c
index ca40eac..753cdcc 100644
--- a/contrib/binutils/bfd/elf32-arm.c
+++ b/contrib/binutils/bfd/elf32-arm.c
@@ -5800,7 +5800,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
if (globals->use_rel)
{
addend = ((insn >> 4) & 0xf000) | (insn & 0xfff);
- signed_addend = (addend ^ 0x10000) - 0x10000;
+ signed_addend = (addend ^ 0x8000) - 0x8000;
}
value += signed_addend;
OpenPOWER on IntegriCloud