about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
index 32fc47c3f3..a7b0a18108 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
@@ -129,6 +129,10 @@ L(noparms):
      the cpu link stack used to predict blr return addresses.  */
   bcl	20,31,L(gotexitcodeaddr);
 
+  /* End FDE now, because while executing on the context's stack
+     the unwind info would be wrong otherwise.  */
+  cfi_endproc
+
 	/* This is the helper code which gets called if a function which
 	   is registered with 'makecontext' returns.  In this case we
 	   have to install the context listed in the uc_link element of
@@ -157,6 +161,11 @@ L(do_exit):
 #endif
 	b    L(do_exit)
 
+  /* Re-establish FDE for the rest of the actual makecontext routine.  */
+  cfi_startproc
+  cfi_offset (lr, FRAME_LR_SAVE)
+  cfi_adjust_cfa_offset (128)
+
   /* The address of the exit code is in the link register.  Store the lr
      in the ucontext as LNK so the target function will return to our
      exit code.  */