[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: library loading roadblock
From:       George Staikos <staikos () kde ! org>
Date:       2001-05-09 22:57:20
[Download RAW message or body]

On Wednesday 09 May 2001 18:18, Waldo Bastian wrote:
> On Wednesday 09 May 2001 14:30, George Staikos wrote:
> > I seem to have hit a roadblock in trying to dynamically load OpenSSL and
> > I'm not sure what to do.  I need to open libssl.so and libcrypto.so.
> > Apparently libssl depends on ilbcrypto and won't load without having
> > access to it's symbols.  dlopen() uses a flag RTLD_GLOBAL to provide
> > access to this I believe.  However I see no way to do this with ltdl.  Am
> > I SOL here?
>
> No, I can bail you out I think.
>
> First of all, you can't unload a module after it gets loaded with
> RTLD_GLOBAL because you don't know which other libs pick up symbols from
> it. I believe this is actually being solved in linux-ld.so (it does
> dependency tracking) recently, but we can't depend on that I'm afraid.

   That's fine.  If this gets loaded, it will stay loaded until we exit.  

> Second, you can set lt_dlopen_flag (a KDE addition to libltdl), don't
> forget to reset it after you are done with loading. The bad part is that
> this only works with dlopen, so platforms that use something else might not
> work.
>
> (But maybe we can adjust for that in libltdl if they have similair
> functionality)

   Sounds like that will need a spinlock someday too.

    I saw that lt_dlopen_flag but what exactly do I set this to?  Am I 
missing some documentation somewhere?  I looked around but found ltdl to be 
very light on the docs. 

  Now if dlopen() is the only one this works with, we might be SOL anyways.  
I doubt those other platforms will be pleased if SSL no longer works there.  
Perhaps they use something like RTLD_GLOBAL by default anyways?  *shrug*  I 
can perhaps test HP-UX and IRIX next week.

-- 

George Staikos

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic