From: Chen Gang Date: Tue, 29 Mar 2016 14:13:45 +0000 (+0800) Subject: linux-user/signal.c: Use target address instead of host address for microblaze restorer X-Git-Tag: v2.7.0-rc0~161^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=166c97edd682878943f496f1a3cbed49e096d43b;p=thirdparty%2Fqemu.git linux-user/signal.c: Use target address instead of host address for microblaze restorer The return address is in target space, so the restorer address needs to be target space, too. Signed-off-by: Chen Gang Reviewed-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- diff --git a/linux-user/signal.c b/linux-user/signal.c index a072fa6efd0..c75fb489533 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -3573,7 +3573,8 @@ static void setup_frame(int sig, struct target_sigaction *ka, /* Return from sighandler will jump to the tramp. Negative 8 offset because return is rtsd r15, 8 */ - env->regs[15] = ((unsigned long)frame->tramp) - 8; + env->regs[15] = frame_addr + offsetof(struct target_signal_frame, tramp) + - 8; } /* Set up registers for signal handler */