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.
This commit is contained in:
Ian Lepore 2015-12-29 15:23:03 +00:00
parent f9e8f40d28
commit 5dbfbb1512

View file

@ -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;