Ove Kaaven wrote:
[snip code]
> > Where ELF_do_dlopen() will search the EXTRA_LD_LIBRARY_PATH for you.
> 
> Isn't this almost the case? If not quite, then close enough to make it
> possible to easily do it when/if it becomes necessary.

No. The ELFDLL_dlopen call is abused by the builtin stuff. It was never
intended for that use.
 
[snip]
> That's not "removing the dependencies" at all. And isn't the whole point
> of EXTRA_LD_LIBRARY_PATH so you wouldn't need LD_LIBRARY_PATH or changing
> ld.so.conf? So that clean RPMs and DEBs can be built that places the libs
> in a separate directory without needing the user to change anything?
> 
> I think I'll just submit the patch...

The EXTRA_LD_LIBRARY_PATH was never intended to work with builtin dlls.
Note that there also is a naming difference between builtins and
elfdlls: libwhatever.so and whatever.so. This is introduced to prevent
the elfdll library from being used in elf-style linking (during
compiler-time; using non-hack-ish commandlines).

The builtin dlls are *pure* ELF-libraries. For these all the normal ELF
rules apply. Thus, when you use ELF-style linking (i.e. explicit
linking), then you *must* use ELF-style loader features (i.e.
LD_LIBRARY_PATH and ld.so.conf). There is no other "Right Way" because
the underlying operating system does not support it otherwise. Using
RTLD_LAZY and "hope that the dependency gets loaded" (i.e. implicit
linking) is basically a bad hack and preprogrammed problems (e.g. the
program just aborts).

Greetings Bertho

Reply via email to