pthread_atfork on ppc64

Steven Munroe munroesj at linux.vnet.ibm.com
Mon Jun 4 19:20:43 UTC 2012


On Sat, 2012-06-02 at 12:39 +0100, Richard W.M. Jones wrote:
> As explained at length here:
> 
> http://ryanarn.blogspot.co.uk/2011/07/curious-case-of-pthreadatfork-on.html
> 
> on ppc64, 'pthread_atfork' is in a separate static library called
> libpthread_nonshared.a, and libpthread.so is a linker script that
> links both libpthread.so.0 (dynamically) and libpthread_nonshared.a
> (statically).
> 

Well Ryan is the current PPC platform maintainer in GLIBC so I will let
him answer for himself. But as the previous platform maintainer, I can
think of several good reasons to do this, ie to avoid nasty deadlocks
between fork/at_fork and the ld64.so PLT resolver.

Also note that the PPC64 Linux ABI is very different from both the PPC32
ABI and the Darwin ABI. Assuming that they are the same or even similar
will just lead to problems.

So read up on
http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html

which should help with important background info

I have asked Ryan to provide URLs to other important material you might
find useful.

> 



More information about the ppc mailing list