diff options
author | Tor Egge <tegge@FreeBSD.org> | 2001-02-26 14:15:28 +0000 |
---|---|---|
committer | Tor Egge <tegge@FreeBSD.org> | 2001-02-26 14:15:28 +0000 |
commit | 5f887dac56d5f351b43215f090e8158de2716e2b (patch) | |
tree | b9ea7e5bd3246ea4910c193fe8199e8077c493d0 /devel/linuxthreads | |
parent | 3c409910e0d82a36e449baabacb67f0a799e3068 (diff) | |
download | ports-5f887dac56d5f351b43215f090e8158de2716e2b.tar.gz ports-5f887dac56d5f351b43215f090e8158de2716e2b.zip |
Notes
Diffstat (limited to 'devel/linuxthreads')
-rw-r--r-- | devel/linuxthreads/files/clone.S | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/devel/linuxthreads/files/clone.S b/devel/linuxthreads/files/clone.S index 7a868b2becc5..50ded5356a1e 100644 --- a/devel/linuxthreads/files/clone.S +++ b/devel/linuxthreads/files/clone.S @@ -32,6 +32,7 @@ ENTRY(_clone) pushl %ebp movl %esp, %ebp pushl %esi + PIC_PROLOGUE /* * Push thread info onto the new thread's stack @@ -51,7 +52,7 @@ ENTRY(_clone) * Prepare and execute rfork */ pushl 16(%ebp) - pushl %esi + pushl $0 /* fake return address */ leal SYS_rfork, %eax KERNCALL @@ -64,6 +65,7 @@ ENTRY(_clone) cmpl $0, %edx jnz 1f addl $8, %esp + PIC_EPILOGUE popl %esi movl %ebp, %esp popl %ebp @@ -101,10 +103,21 @@ ENTRY(_clone) .stabd 68,0,5 2: addl $8, %esp + PIC_EPILOGUE popl %esi movl %ebp, %esp popl %ebp - jmp PIC_PLT(HIDENAME(cerror)) + PIC_PROLOGUE + /* Copy of libc .cerror since libc .cerror must be called from libc */ + pushl %eax + /* The caller must execute the PIC prologue before jumping to cerror. */ + call PIC_PLT(CNAME(__error)) + popl %ecx + PIC_EPILOGUE + movl %ecx,(%eax) + movl $-1,%eax + movl $-1,%edx + ret .stabs "_clone:f67",36,0,6,CNAME(_clone) Lfe1: |