libc/1818: pthread problem with dlcose()

Ulrich Drepper drepper@redhat.com
Tue Jul 18 17:17:00 GMT 2000


Mark Kettenis <kettenis@wins.uva.nl> writes:

> Isn't it possible to let libpthread, if it's dlopen()'ed (or loaded as
> a dependency of a dlopen()'ed object) modify the link map such that it
> appears as a dependency of the main executable?
> 
> I'd be willing to look into it if Ulrich thinks it possible and would
> accept a patch that implements it.

This would be an ugly hack which pollutes the otherwise quite clean
code.  And I don't think it's worth it.  Applications which are using
thread, possibly through modules, should be linked against the thread
library.

Solaris solves the problem (they also don't allow unloading the thread
library) is by having the flag DF_1_NODELETE set in the FLAGS_1 word
of the thread library.  This is a much more worthwhile way to handle
this.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


More information about the Libc-hacker mailing list