summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorChen Gang2016-03-29 16:13:45 +0200
committerRiku Voipio2016-05-27 13:50:40 +0200
commit166c97edd682878943f496f1a3cbed49e096d43b (patch)
tree5bdca32b4b6f5fd9445896cf46a6b188b11cbf6a /linux-user
parentlinux-user/signal.c: Generate opcode data for restorer in setup_rt_frame (diff)
downloadqemu-166c97edd682878943f496f1a3cbed49e096d43b.tar.gz
qemu-166c97edd682878943f496f1a3cbed49e096d43b.tar.xz
qemu-166c97edd682878943f496f1a3cbed49e096d43b.zip
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 <gang.chen.5i5j@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/signal.c3
1 files changed, 2 insertions, 1 deletions
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 */