Skip to content

Commit

Permalink
Re-install CFI in x86/x86_64 clone
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schwab committed Nov 24, 2009
1 parent 1476362 commit b127b85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sysdeps/unix/sysv/linux/i386/clone.S
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ L(pseudo_end):
ret

L(thread_start):
cfi_startproc;
/* Clearing frame pointer is insufficient, use CFI. */
cfi_undefined (eip);
/* Note: %esi is zero. */
movl %esi,%ebp /* terminate the stack frame */
#ifdef RESET_PID
Expand Down Expand Up @@ -152,6 +155,7 @@ L(nomoregetpid):
jmp L(haspid)
.previous
#endif
cfi_endproc;

cfi_startproc
PSEUDO_END (BP_SYM (__clone))
Expand Down
4 changes: 4 additions & 0 deletions sysdeps/unix/sysv/linux/x86_64/clone.S
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ L(pseudo_end):
ret

L(thread_start):
cfi_startproc;
/* Clearing frame pointer is insufficient, use CFI. */
cfi_undefined (rip);
/* Clear the frame pointer. The ABI suggests this be done, to mark
the outermost frame obviously. */
xorl %ebp, %ebp
Expand All @@ -113,6 +116,7 @@ L(thread_start):
/* Call exit with return value from function call. */
movq %rax, %rdi
call HIDDEN_JUMPTARGET (_exit)
cfi_endproc;

cfi_startproc;
PSEUDO_END (BP_SYM (__clone))
Expand Down

0 comments on commit b127b85

Please sign in to comment.