From a16a8679c577b1a5f754fe0b18b95b5580263bb3 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 20 Jan 2019 00:18:55 +0000 Subject: [PATCH] Fix read/write_compiled_closure_target offsets. --- src/microcode/cmpintmd/aarch64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/microcode/cmpintmd/aarch64.c b/src/microcode/cmpintmd/aarch64.c index 61f267263..4ec526ede 100644 --- a/src/microcode/cmpintmd/aarch64.c +++ b/src/microcode/cmpintmd/aarch64.c @@ -125,7 +125,7 @@ start_closure_relocation (SCHEME_OBJECT * scan, reloc_ref_t * ref) insn_t * read_compiled_closure_target (insn_t * start, reloc_ref_t * ref) { - insn_t * addr = (start + CC_ENTRY_HEADER_SIZE); + insn_t * addr = (start + CC_ENTRY_PADDING_SIZE + CC_ENTRY_HEADER_SIZE); insn_t * base = (tospace_to_newspace (addr)); /* If we're relocating, find where base was in the oldspace. */ if (ref) @@ -143,7 +143,7 @@ read_compiled_closure_target (insn_t * start, reloc_ref_t * ref) void write_compiled_closure_target (insn_t * target, insn_t * start) { - insn_t * addr = (start + CC_ENTRY_HEADER_SIZE); + insn_t * addr = (start + CC_ENTRY_PADDING_SIZE + CC_ENTRY_HEADER_SIZE); (((int64_t *) addr)[-1]) = (target - ((insn_t *) (tospace_to_newspace (addr)))); } -- 2.25.1