pthread_atfork on ppc64
David Woodhouse
dwmw2 at infradead.org
Sat Jun 2 12:01:44 UTC 2012
On Sat, 2012-06-02 at 12:39 +0100, Richard W.M. Jones wrote:
>
> So I can change OCaml to include the static copy of pthread_atfork in
> dllthreads.so, since I guess this library will only be loaded once, so
> there should be only one static copy of this function.
>
> But does anyone have any insight in what's going on here? Why does
> this symbol only need to be statically copied into every executable,
> but it's only this way on powerpc?
I'm confused; the dynamic symbol ought *not* to be present for other
architectures either, surely? There's pthread_atfork at GLIBC2.0 for the
benefit of old executables, but you can't link a *new* executable
against pthread_atfork() in the dynamic library. There's no
pthread_atfork@@ANYTHING symbol (the @@ means a default, so that you can
actually link against it when building).
How does this work anywhere else? It *should* be just the same, surely?
I'm guessing that there's a reason it has to be statically linked rather
than dynamic (glibc version control history may enlighten), and if
you're managing to somehow include a version in your own library on
other platforms then you are already buggy there. And PPC64 has done you
a favour by highlighting the error :)
--
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6171 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/ppc/attachments/20120602/31514177/attachment.bin>
More information about the ppc
mailing list