From c656a6a2b74d17320d9d5b78d1bef38b2a9ff5b9 Mon Sep 17 00:00:00 2001 From: SashegDev Date: Fri, 11 Sep 2026 07:37:30 +0000 Subject: [PATCH] maze: [S+4] fn ptr -> STUB (0x801b72e blx jumped 0) --- qemu/saimaa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu/saimaa.c b/qemu/saimaa.c index 51bb914..5d104ea 100644 --- a/qemu/saimaa.c +++ b/qemu/saimaa.c @@ -434,6 +434,9 @@ static void saimaa_machine_init(MachineState *machine) * to 0x08062200 for post-mortem, then movs r0,#0; bx lr. */ w = S + 8; cpu_physical_memory_write(S, &w, 4); + /* [struct+4] is another fn ptr (e.g. 0x801b72e ldr r3,[r0,#4] + * with r0 = maze S via POOLS redirect); point at STUB too */ + cpu_physical_memory_write(S + 4, &STUB, 4); cpu_physical_memory_write(S + 8, &STUB, 4); { /* from qemu/maze.S: movw/movt r12; str lr/sp; movs; bx */