From 9567e059de67d251db5f0feed23880d139fae7e7 Mon Sep 17 00:00:00 2001 From: Mark McCaskey Date: Thu, 13 May 2021 13:24:56 -0700 Subject: [PATCH] Use usize in relocation --- lib/engine-jit/src/link.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/engine-jit/src/link.rs b/lib/engine-jit/src/link.rs index bd1348a0641..93d22820f73 100644 --- a/lib/engine-jit/src/link.rs +++ b/lib/engine-jit/src/link.rs @@ -51,7 +51,7 @@ fn apply_relocation( }, RelocationKind::X86CallPCRel4 => unsafe { let (reloc_address, reloc_delta) = r.for_address(body, target_func_address as u64); - write_unaligned(reloc_address as *mut u32, reloc_delta as _); + write_unaligned(reloc_address as *mut usize, reloc_delta as _); }, RelocationKind::X86PCRelRodata4 => {} kind => panic!(