1 |
* Al <oss.elmar@××××××××××.com> wrote: |
2 |
|
3 |
> But I was woundering if the /etc/ld.so.conf was only historical stuff. |
4 |
> O.K. is not it's up-to-date. Good to know this. |
5 |
|
6 |
Note that this only applies to certain platforms (mostly GNU/glibc |
7 |
based ones). There might be completely different approaches. |
8 |
It all depends on how your platform (in glibc-/gcc-world it is the |
9 |
ld-stub) handles shared library loading. Some platforms might do |
10 |
it directly in the process loader (I guess on native Windows it's |
11 |
done by the kernel, not userland). |
12 |
|
13 |
> But it also writes that dlopen() is specific for Linux and Solaris. |
14 |
> There would be alternatives: |
15 |
|
16 |
Depends on the libc you're using (btw: on GNU/Linux it has nothing |
17 |
to do with the Linux kernel, but all done by glibc) For example, |
18 |
the Windows API provides methods for loading shared libraries and |
19 |
retrieving entry points - this can be used for an dlopen() |
20 |
implementation (of course, the in-depth semantics, eg. symbol |
21 |
visibility and linking orders could vary here). |
22 |
|
23 |
> 1.) The glib library |
24 |
|
25 |
Glib essentially bridges to the underlying OS API (for GNU platforms, |
26 |
it calls glibc's dlopen(), on Windows it calls the DLL loader API). |
27 |
For that case, there's nothing a proper libc could also do. Take a |
28 |
sane libc and you don't need glib here. |
29 |
|
30 |
> 2.) libltdl, which is part of GNU libtool |
31 |
|
32 |
I doubt you really want to go into libtool hell ... ;-o |
33 |
|
34 |
> Now I was woundering, which way would Gentoo choose or if that is not |
35 |
> package specific at all. Are you sure dlopen() is used as a general |
36 |
> approach on Gentoo? |
37 |
|
38 |
It doesnt have anything to do with Gentoo (or any other distro), |
39 |
instead it's a purely package specific issue. Gentoo just happens |
40 |
to be based (mainly) on GNU libc, which provides dlopen(). |
41 |
|
42 |
> Also I installed a few libries with Prefix Gentoo on Cygwin. On Cygwin |
43 |
> there is no /etc/ld.so.conf. Yet the libraries are found somehow. I |
44 |
> still have to find out how it works in that environment. |
45 |
|
46 |
Obviously they have a different lookup mechanism. The actually |
47 |
library loading of course is Windows-specific (I doubt it would |
48 |
be possible to support GNU-style ELF libraries entirely from |
49 |
userland alone). |
50 |
|
51 |
|
52 |
cu |
53 |
-- |
54 |
---------------------------------------------------------------------- |
55 |
Enrico Weigelt, metux IT service -- http://www.metux.de/ |
56 |
|
57 |
phone: +49 36207 519931 email: weigelt@×××××.de |
58 |
mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 |
59 |
---------------------------------------------------------------------- |
60 |
Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme |
61 |
---------------------------------------------------------------------- |