From 166c97edd682878943f496f1a3cbed49e096d43b Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 29 Mar 2016 22:13:45 +0800 Subject: 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 --- linux-user/signal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux-user') diff --git a/linux-user/signal.c b/linux-user/signal.c index a072fa6efd..c75fb48953 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 */ -- cgit v1.2.3