librt.so issues
H . J . Lu
hjl@lucon.org
Sun Sep 9 17:19:00 GMT 2001
On Sun, Sep 09, 2001 at 07:44:26PM -0400, Roland McGrath wrote:
> > So isn't the librt.so linker script the right solution then? I mean the
> > fact that -lrt uses -lpthread for its job is its implementation detail.
>
> For that very reason I don't think the linker script is right. The
> librt.so binary could very well be replaced with a fully ABI-compatible one
> that does not use libpthread in its implementation.
>
> Ideally librt.so.1's dependency on libpthread.so.0 would make this work out
> right. But I guess it doesn't because the program's own breadth-first
> dependency order will put libc before libpthread.
Can we add DF_1_INITFIRST to librt.so.1? What will ld.so do for DSOs
with DF_1_INITFIRST on the DT_NEEDED list?
>
> It seems to me that for this sort of thing to really work properly,
> all of libc's definitions that might be overridden by libpthread must be weak.
I don't think it is a long time solution since ld.so will treat weak
as strong one day.
H.J.
More information about the Libc-hacker
mailing list