aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-user/i386/signal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c
index 8701774..841cd19 100644
--- a/linux-user/i386/signal.c
+++ b/linux-user/i386/signal.c
@@ -436,13 +436,13 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
#ifndef TARGET_X86_64
env->regs[R_EAX] = sig;
- env->regs[R_EDX] = (unsigned long)&frame->info;
- env->regs[R_ECX] = (unsigned long)&frame->uc;
+ env->regs[R_EDX] = frame_addr + offsetof(struct rt_sigframe, info);
+ env->regs[R_ECX] = frame_addr + offsetof(struct rt_sigframe, uc);
#else
env->regs[R_EAX] = 0;
env->regs[R_EDI] = sig;
- env->regs[R_ESI] = (unsigned long)&frame->info;
- env->regs[R_EDX] = (unsigned long)&frame->uc;
+ env->regs[R_ESI] = frame_addr + offsetof(struct rt_sigframe, info);
+ env->regs[R_EDX] = frame_addr + offsetof(struct rt_sigframe, uc);
#endif
cpu_x86_load_seg(env, R_DS, __USER_DS);