>> How does a program in Gentoo know, where to look for shared libraries?
>
> The program doesn't know.  But the runtime linker does.  And those paths are
> in /etc/ld.so.conf.  This file gets updated automatically by portage when
> needed.
>
> But... sometimes the program also knows and can link against libraries long
> after it has started up using a dlopen() call:
>
> http://linux.die.net/man/3/dlopen
>

Thank you Nikos. I did read obout this in the Linux HOWTO:

http://www.faqs.org/docs/Linux-HOWTO/Program-Library-HOWTO.html#DL-LIBRARIES

But I was woundering if the /etc/ld.so.conf was only historical stuff.
O.K. is not it's up-to-date. Good to know this.

But it also writes that dlopen() is specific for Linux and Solaris.
There would be alternatives:

 1.) The glib library
 2.) libltdl, which is part of GNU libtool

Now I was woundering, which way would Gentoo choose or if that is not
package specific at all. Are you sure dlopen() is used as a general
approach on Gentoo?

Also I installed a few libries with Prefix Gentoo on Cygwin. On Cygwin
there is no /etc/ld.so.conf. Yet the libraries are found somehow. I
still have to find out how it works in that environment.

Al

Reply via email to