* Al <[email protected]> wrote:

> 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.

Note that this only applies to certain platforms (mostly GNU/glibc
based ones). There might be completely different approaches.
It all depends on how your platform (in glibc-/gcc-world it is the
ld-stub) handles shared library loading. Some platforms might do
it directly in the process loader (I guess on native Windows it's
done by the kernel, not userland).
 
> But it also writes that dlopen() is specific for Linux and Solaris.
> There would be alternatives:

Depends on the libc you're using (btw: on GNU/Linux it has nothing
to do with the Linux kernel, but all done by glibc) For example,
the Windows API provides methods for loading shared libraries and
retrieving entry points - this can be used for an dlopen() 
implementation (of course, the in-depth semantics, eg. symbol
visibility and linking orders could vary here).

>  1.) The glib library

Glib essentially bridges to the underlying OS API (for GNU platforms,
it calls glibc's dlopen(), on Windows it calls the DLL loader API).
For that case, there's nothing a proper libc could also do. Take a
sane libc and you don't need glib here.

>  2.) libltdl, which is part of GNU libtool

I doubt you really want to go into libtool hell ... ;-o

> 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?

It doesnt have anything to do with Gentoo (or any other distro),
instead it's a purely package specific issue. Gentoo just happens
to be based (mainly) on GNU libc, which provides dlopen().
 
> 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.

Obviously they have a different lookup mechanism. The actually
library loading of course is Windows-specific (I doubt it would
be possible to support GNU-style ELF libraries entirely from 
userland alone).


cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: [email protected]
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------

Reply via email to