=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: ntdll: Respect the 8-bit part in the ARM relocation.
Alexandre Julliard
julliard at winehq.org
Mon Apr 15 13:09:41 CDT 2013
Module: wine
Branch: master
Commit: e187c4aec2f8c5d3720fcfa5d2d7c52f8c7a417f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e187c4aec2f8c5d3720fcfa5d2d7c52f8c7a417f
Author: André Hentschel <nerv at dawncrow.de>
Date: Fri Apr 12 23:19:46 2013 +0200
ntdll: Respect the 8-bit part in the ARM relocation.
---
dlls/ntdll/loader.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 271907f..9642f62 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2180,7 +2180,7 @@ IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock( void *page, UINT count
{
DWORD inst = *(INT_PTR *)((char *)page + offset);
DWORD imm16 = ((inst << 1) & 0x0800) + ((inst << 12) & 0xf000) +
- ((inst >> 20) & 0x0700) + ((inst >> 16) & 0x000f);
+ ((inst >> 20) & 0x0700) + ((inst >> 16) & 0x00ff);
if ((inst & 0x8000fbf0) != 0x0000f240)
ERR("wrong Thumb2 instruction %08x, expected MOVW\n", inst);
@@ -2191,13 +2191,13 @@ IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock( void *page, UINT count
*(INT_PTR *)((char *)page + offset) = (inst & 0x8f00fbf0) + ((imm16 >> 1) & 0x0400) +
((imm16 >> 12) & 0x000f) +
((imm16 << 20) & 0x70000000) +
- ((imm16 << 16) & 0x0f0000);
+ ((imm16 << 16) & 0xff0000);
if (delta > 0xffff)
{
inst = *(INT_PTR *)((char *)page + offset + 4);
imm16 = ((inst << 1) & 0x0800) + ((inst << 12) & 0xf000) +
- ((inst >> 20) & 0x0700) + ((inst >> 16) & 0x000f);
+ ((inst >> 20) & 0x0700) + ((inst >> 16) & 0x00ff);
if ((inst & 0x8000fbf0) != 0x0000f2c0)
ERR("wrong Thumb2 instruction %08x, expected MOVT\n", inst);
@@ -2209,7 +2209,7 @@ IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock( void *page, UINT count
((imm16 >> 1) & 0x0400) +
((imm16 >> 12) & 0x000f) +
((imm16 << 20) & 0x70000000) +
- ((imm16 << 16) & 0x0f0000);
+ ((imm16 << 16) & 0xff0000);
}
}
break;
More information about the wine-cvs
mailing list