On Thu, Nov 21, 2002 at 02:10:33PM +0900, Akira TAGOH wrote: > >>>>> On Tue, 19 Nov 2002 16:55:54 +0100, > >>>>> "BA" == Bill Allombert <[EMAIL PROTECTED]> wrote: > > BA> Anyway, if it is a bug in dlopen() or in some Makefile, then it is not a > bug > BA> in policy. > > it seems that it's ELF spec by rights. basically > dynamic-linked programs/libraries has Procedure Linkage > Table, and the undefined symbols are resolved with it by > dynamic linker. however -static'ed programs has no PLT. so > dynamic linker has no way to know whether -static'ed > programs has the symbols or not. thus, in this case, when > dynamic linker is trying to resolve libfoo.so's symbols > which is needed by loaded modules.so, it's not referred from > -static'ed programs, and dynamic linker has loaded > libfoo.so.
Thanks for this explanation. So you cannot link programs using dlopen() fully static (because they will loose the PLT), but you can still link them partially static with a static library as in the previous example, so static libraries are still useful even if they use dlopen(). Cheers, -- Bill. <[EMAIL PROTECTED]> There is no record of the [EMAIL PROTECTED] package, and no bugs have been filed against it.