From patchwork Wed Jun 25 22:01:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 1744 Received: (qmail 29333 invoked by alias); 25 Jun 2014 22:01:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 29320 invoked by uid 89); 25 Jun 2014 22:01:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 From: Roland McGrath To: "GNU C. Library" Subject: [PATCH roland/nptl-mips] MIPS: Consolidate NPTL/non versions of vfork Message-Id: <20140625220124.0BD4F2C39D4@topped-with-meat.com> Date: Wed, 25 Jun 2014 15:01:24 -0700 (PDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=VTURk6eojBYA:10 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=aEshAOjPLV2YZVMyAnAA:9 a=CjuIK1q_8ugA:10 Not tested at all. It looks to me like MIPS calls don't use a PLT per se, but always load from the GOT and then do a proper tail call via register. So I think the generic pt-vfork.c is safe even without IFUNC, but you tell me. Thanks, Roland 2014-06-25 Roland McGrath * sysdeps/unix/sysv/linux/mips/clone.S: Deconditionalize the code that was previously under [RESET_PID]. * sysdeps/unix/sysv/linux/mips/nptl/clone.S: File removed. diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S index d3fd80f..286a6b9 100644 --- a/sysdeps/unix/sysv/linux/mips/clone.S +++ b/sysdeps/unix/sysv/linux/mips/clone.S @@ -23,9 +23,7 @@ #include #define _ERRNO_H 1 #include -#ifdef RESET_PID #include -#endif #define CLONE_VM 0x00000100 #define CLONE_THREAD 0x00010000 @@ -69,9 +67,7 @@ NESTED(__clone,4*SZREG,sp) PTR_SUBU a1,32 /* Reserve argument save space. */ PTR_S a0,0(a1) /* Save function pointer. */ PTR_S a3,PTRSIZE(a1) /* Save argument pointer. */ -#ifdef RESET_PID LONG_S a2,(PTRSIZE*2)(a1) /* Save clone flags. */ -#endif move a0,a2 @@ -134,13 +130,11 @@ L(thread_start): SAVE_GP (GPOFF) /* The stackframe has been created on entry of clone(). */ -#ifdef RESET_PID /* Check and see if we need to reset the PID. */ LONG_L a0,(PTRSIZE*2)(sp) and a1,a0,CLONE_THREAD beqz a1,L(restore_pid) L(donepid): -#endif /* Restore the arg for user's function. */ PTR_L t9,0(sp) /* Function pointer. */ @@ -158,7 +152,6 @@ L(donepid): jal _exit #endif -#ifdef RESET_PID L(restore_pid): and a1,a0,CLONE_VM li v0,-1 @@ -170,7 +163,6 @@ L(gotpid): INT_S v0,PID_OFFSET(v1) INT_S v0,TID_OFFSET(v1) b L(donepid) -#endif END(__thread_start) diff --git a/sysdeps/unix/sysv/linux/mips/nptl/clone.S b/sysdeps/unix/sysv/linux/mips/nptl/clone.S deleted file mode 100644 index 80c265b..0000000 --- a/sysdeps/unix/sysv/linux/mips/nptl/clone.S +++ /dev/null @@ -1,2 +0,0 @@ -#define RESET_PID -#include