This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH roland/nptl-mips] MIPS: Consolidate NPTL/non versions of vfork
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Wed, 25 Jun 2014 22:21:18 +0000
- Subject: Re: [PATCH roland/nptl-mips] MIPS: Consolidate NPTL/non versions of vfork
- Authentication-results: sourceware.org; auth=none
- References: <20140625220124 dot 0BD4F2C39D4 at topped-with-meat dot com>
On Wed, 25 Jun 2014, Roland McGrath wrote:
> 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.
> 2014-06-25 Roland McGrath <email@example.com>
> * 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.
This appears to be a copy of the clone patch, not a vfork patch....
The generic pt-vfork.c gives a #error for the non-IFUNC case. The AArch64
version (which I now notice is returning void not pid_t, which looks
suspicious to me) won't work for MIPS n32/n64 - for the 64-bit ABIs, gp
($28) is callee-saved, and so the attempt at a tail call involves saving
the caller's value and computing a new value, then restoring the old value
of gp after the non-tail call before returning. It might work for o32,
but it seems simpler just to #include the alpha version for all three
Joseph S. Myers