[PATCH] ntdll: Handle IMAGE_REL_BASED_DIR64 for arm64 in the same way as for x86_64

Martin Storsjo martin at martin.st
Fri Jul 7 05:39:23 CDT 2017


If binaries aren't loaded at their base address and need to be relocated,
we need to handle this relocation for arm64.

Signed-off-by: Martin Storsjo <martin at martin.st>
---
 dlls/ntdll/loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 518a99f..3b784bf 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2476,7 +2476,7 @@ IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock( void *page, UINT count
         case IMAGE_REL_BASED_HIGHLOW:
             *(int *)((char *)page + offset) += delta;
             break;
-#ifdef __x86_64__
+#if defined(__x86_64__) || defined(__aarch64__)
         case IMAGE_REL_BASED_DIR64:
             *(INT_PTR *)((char *)page + offset) += delta;
             break;
-- 
2.7.4




More information about the wine-patches mailing list